Skip to end of metadata
Go to start of metadata

* CALL FUNCTION 'WS_UPLOAD'

 

*   EXPORTING

 

 

*          codepage            = 'IBM'

*          filename            = file

*          filetype            = 'DAT'

*          headlen             = space

*          line_exit           = space

*          trunclen            = space

*          user_form           = space

*          user_prog           = space

*     TABLES

 

 

 

*         data_tab           = data_tab

*     EXCEPTIONS

 

 

*              conversion_error    = 1

*              file_open_error     = 2

*              file_read_error     = 3

*              invalid_table_width = 4

*              invalid_type        = 5

*              no_batch            = 6

*              unknown_error       = 7.

DATA : lv_filename type STRING.

 

lv_filename = file.

 

 

CONSTANTS: LV_FILETYPE TYPE CHAR10 VALUE 'ASC'.

CALL FUNCTION 'GUI_UPLOAD'

 

 

EXPORTING

 

 

 

   FILENAME              = lv_filename

   FILETYPE                 = 'DAT'

   CODEPAGE                 = 'IBM'

TABLES

 

 

 

 

   DATA_TAB                 = data_tab

EXCEPTIONS

 

 

 

   FILE_OPEN_ERROR               = 1

   FILE_READ_ERROR               = 2

   NO_BATCH                      = 3

   GUI_REFUSE_FILETRANSFER       = 4

   INVALID_TYPE                  = 5

   NO_AUTHORITY                  = 6

   UNKNOWN_ERROR                 = 7

   BAD_DATA_FORMAT               = 8

   HEADER_NOT_ALLOWED            = 9

   SEPARATOR_NOT_ALLOWED         = 10

   HEADER_TOO_LONG               = 11

   UNKNOWN_DP_ERROR              = 12

   ACCESS_DENIED                 = 13

   DP_OUT_OF_MEMORY              = 14

   DISK_FULL                     = 15

   DP_TIMEOUT                    = 16

   OTHERS                        = 17.

file = lv_filename.

 

 

  • No labels