Download ztable to the dataset

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'.

More Function Module
Functions / SAP Script / ALV

Tables
Database Table

ABAP Books List
ABAP/4 Certification, Programming, Smartforms, Sapscripts and Object Oriented Programming Books

Smart Forms
SAP Smartforms

ABAP Menu:
ABAP Example Hints and Tips

Return to Index:-
SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.  The site www.gotothings.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.