ABAP Certification, Smartform, Sapscripts, BAPI, JAVA, Visual Basic Programming Books
WS_UPLOAD functions to upload data from PC to SAP

* Declare upload format
DATA: BEGIN OF ITAB OCCURS 0,
                  PLANT(2)               TYPE C,
                  MATERIAL(18)       TYPE C,
DATA: END OF ITAB.

PARAMETERS:  F-FILE LIKE RLGRAP-FILENAME DEFAULT 'C:\TEMP\FILE.TXT'..

* FILETYPE ->    'BIN' OR 'DAT' OR 'ASC' OR 'IBM' OR 'WK1' OR 'DBF' OR  'SPL' OR 'TRU'.
call function 'WS_UPLOAD'
  EXPORTING
    FILENAME                      = F-FILE
    FILETYPE                      = 'DAT'
  tables
    data_tab                      = ITAB
  EXCEPTIONS
    FILE_OPEN_ERROR               = 1
    FILE_READ_ERROR               = 2
    NO_BATCH                      = 3
    GUI_REFUSE_FILETRANSFER       = 4
    INVALID_TYPE                  = 5
    OTHERS                        = 6.

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

(c) www.sap-basis-abap.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.sap-basis-abap.com is in no way affiliated with SAP AG.
Any unauthorised copying or mirroring is prohibited.