Make your own free website on Tripod.com
 

SAP ABAP Programming, Functional and Basis Components Books


WS_UPLOAD functions

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

Back to Previous

Return to SAP Hints and Tips on Configuration and ABAP/4 Programming