Fetching the data records of single table using single parameter entry in the selection screen
TABLES: EKKO.
PARAMETERS: PO_NO TYPE EKKO-EBELN.
TYPES: BEGIN OF ST,
EBELN TYPE EKKO-EBELN,
LIFNR TYPE EKKO-LIFNR,
BUKRS TYPE EKKO-BUKRS,
END OF ST.
DATA: WA TYPE ST.
DATA: ITAB LIKE STANDARD TABLE OF WA.
SELECT EBELN LIFNR BUKRS FROM EKKO
INTO CORRESPONDING FIELDS OF WA WHERE EBELN = PO_NO.
APPEND WA TO ITAB.
ENDSELECT.
LOOP AT ITAB INTO WA.
WRITE: / WA-EBELN,
WA-LIFNR,
WA-BUKRS.
ENDLOOP.
No comments:
Post a Comment