‎2008 Jun 06 6:57 AM
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
‎2008 Jun 06 7:47 AM
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
‎2008 Jun 06 7:47 AM
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
‎2008 Jun 06 9:23 AM
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.
‎2008 Jun 06 9:42 AM
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