Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

data upload

Former Member
0 Likes
370

Hi experts,

Iam working on 4.0B.

I have a data some thing like this in a notepad.

P5ON P5ID P5LI P5PN PLWH

342691 P 1 T351-2032-001 02

342692 P 2 T351-2032-001 02

how can i upload this data using WS_UPLOAD.

Could you pls give me with example??

While iam uploading data i am getting only first column.

Where iam doing wrong??

DATA : BEGIN OF it_dummy OCCURS 0,

DUMMY(1000) TYPE C,

END OF it_dummy.

CALL FUNCTION 'WS_UPLOAD'

EXPORTING

filename = p_file

filetype = 'DAT'

TABLES

data_tab = it_dummy.

2 REPLIES 2
Read only

Former Member
0 Likes
350

Hi,

Your code is correct only..I am getting all the 3 records...I think, u missed loop..endloop.

REPORT ZM_TEST12.

PARAMETERS: P_File LIKE RLGRAP-FILENAME OBLIGATORY.

DATA : BEGIN OF it_dummy OCCURS 0,

DUMMY(1000) TYPE C,

END OF it_dummy.

  • Uploading flat file data into the internal tables

CALL FUNCTION 'WS_UPLOAD'

EXPORTING

filename = p_file

filetype = 'DAT'

TABLES

data_tab = it_dummy.

loop at it_dummy.

write: it_dummy.

endloop.

Regards,

Maha

Read only

Former Member
0 Likes
350

Why haven't t you declared your internal table with the same structure as your file???

Rob