Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

gui_upload issue

Hi All,

I am using GUI_UPLOAD as shown below to upload data from from front end using an excel file,

but i am getting some junk data into the internal table,please solve this and i need to use GUI_UPLOAD only.

DATA: I_TEMP_FILE TYPE STRING.

MOVE P_FILE TO I_TEMP_FILE.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = I_TEMP_FILE

FILETYPE = 'ASC'

HAS_FIELD_SEPARATOR = 'X'

TABLES

DATA_TAB = IT_MASTER

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.

IF SY-SUBRC = 0.

ENDIF.

Thanks,

Kumar

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question