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

Uploading DAT FIle.

Former Member
0 Likes
1,206

Hi all ,

Please guide me how to upload a DAT file with pipe delimiter to an Itab.

thanks.

5 REPLIES 5
Read only

former_member188829
Active Contributor
0 Likes
644

use FM:GUI_UPLOAD

Read only

Former Member
0 Likes
644

Hi,

Use WS_UPLOAD and read the entire line as a single string into an internal table.

Thenuse the SPLIT stmt to read into separate variables.

Eg:

data: begin of itab occurs 0,

line(132),

end of itab.

Use WS_UPLOAD to read into this internal table.

then use: SPLIT itab at '|' into v1 v2 v3 ...

Regards

Subramanian

Read only

rahulkavuri
Active Contributor
0 Likes
644

use GUI_UPLOAD, in filetype give it as 'DAT' and field seperator give '|'

by the way when u are passing the filename into FM take care that the filename is in format of string

Read only

0 Likes
644

HI RAHUL,

in gui_upload please tell me to which parameter i should pass the field separator '|'

Read only

0 Likes
644

u have this commented default when u call the FM, uncomment it

HAS_FIELD_SEPARATOR = '|'