Skip to Content

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

uploading data using 'GUI_UPLOAD' ....

Hi Experts,

i ve a problem i.e here am uploading a flat file but am not getting proper output,

could anyone see this peace of code.

DATA: BEGIN OF ITAB OCCURS 1,

BRANCH(1) TYPE C,

XRE_TTY(18) TYPE C,

ORIG_CURR(3) TYPE C,

COB(3) TYPE C,

TTY_TYPE(1) TYPE C,

END OF ITAB.

DATA: WA_ITAB LIKE ITAB.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'C:\ACCUPLOAD\input'

FILETYPE = 'DAT'

HAS_FIELD_SEPARATOR = '|'

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

DATA_TAB = ITAB

  • EXCEPTIONS .

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT ITAB .

WRITE:/20 ITAB-BRANCH,

ITAB-XRE_TTY,

ITAB-ORIG_CURR,

ITAB-COB,

ITAB-TTY_TYPE.

ENDLOOP.

my input file is (here seperator is (pipe) | ).

S|S-FFF-P-96-0193-96|AED|FFF|P

S|S-FNM-P-96-0194-96|USD|FNM|P

S|S-EEB-P-92-0365-92|PKR|EEB|P

S|S-EEB-P-92-0365-93|PKR|EEB|P

S|S-EEB-P-92-0365-94|PKR|EEB|P

S|S-GGA-P-92-0006-96|PKR|GGA|P

but am getting output is only single char. like.

S

S

S

S

S

S

WHAT is the wrong here plz..

Thanks in advance..

sudharsan.

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