REPORT ZPHYEXP1.
* ZBISEG is a transparent table. The structure copy from BISEG_MDE.
TABLES: ZBISEG,
RLGRAP.
SELECT-OPTIONS: S_WERKS FOR ZBISEG-WERKS,
S_LGORT FOR ZBISEG-LGORT.
*
s_matnr for ZBISEG-matnr.
DATA: BEGIN OF ITAB OCCURS 100.
INCLUDE STRUCTURE BISEG_MDE.
DATA: END OF ITAB.
SELECT * FROM ZBISEG WHERE WERKS IN S_WERKS AND
LGORT IN S_LGORT.
* matnr in s_matnr.
MOVE-CORRESPONDING ZBISEG TO ITAB.
MOVE '1' TO ITAB-BSTAR.
APPEND ITAB.
ENDSELECT.
OPEN DATASET '/usr/sap/trans/data/phyinvmde' FOR OUTPUT IN TEXT MODE.
LOOP AT ITAB.
TRANSFER ITAB TO '/usr/sap/trans/data/phyinvmde'.
ENDLOOP.
CLOSE DATASET '/usr/sap/trans/data/phyinvmde'.
Return to SAP Hints and Tips on Configuration and
ABAP/4 Programming