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
450

hi,

I have one tab delimited tab file in presentation server.

frist i was declared one internal table like this.

BEGIN OF IT_tab OCCURS 0,

REC(256),

END OF IT_tab.

now i upload this flat file data using ws_upload F.M.

now i want split this data and send to new internal table according to fields.(total 14 fields).

can any one please give the solution.

thanks in advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
428

1/ loop at table.

2/ split the fields value and move to corresponding/appropriate fields of work area.

3/ Append it ti int, table.

Note, you should know where to split/cut the values in int. table.Length of each field is the key factor for this.Also, take care of missing leading zeros and spaces.

- Sonal

3 REPLIES 3
Read only

Former Member
0 Likes
429

1/ loop at table.

2/ split the fields value and move to corresponding/appropriate fields of work area.

3/ Append it ti int, table.

Note, you should know where to split/cut the values in int. table.Length of each field is the key factor for this.Also, take care of missing leading zeros and spaces.

- Sonal

Read only

Former Member
0 Likes
428

Hi,

you are having a tab delimited file means each fields are seperated with tab.

the internal table in which you want to pass the file's data ,just pass that internal table to the function module ws_upload . The data will auto matically go into the corresponding fields.

Instead taking data into an internal table which is of character type.

Just declare the internal table structure with field sequence same as there in your file.

If you follow this method you will reduce ur coding efforts.

Read only

Former Member
0 Likes
428

Hi,

You can upload the tab delimited data using GUI_UPLOAD. where you have to pass 'X' has _any delimiter.

or

Otherwise you read each record into a string and then use the following syntax.

SPLIT REC at ',' into wa_field1 wa_field2 wa_field3 .........

Hope this is clear for you,

Thanks and regards