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.

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.