‎2008 Oct 22 12:12 PM
hi
i have flat file like bellow
12358|FHDYDT2|122244002| | |00003
how can i up load to internal table ,
here delimeter is 'I' (pipe line )
which function module i have to use for it.
and specify which parameter i have to pass
‎2008 Oct 22 12:25 PM
Hi
Jus read the data and later split it using SPLIT AT | Statement.
Cheers,
Hakim
‎2008 Oct 22 12:17 PM
Just search with the search term "GUI_UPLOAD", you will find lot of threads.
‎2008 Oct 22 12:17 PM
Hi,
You can use FM GUI_UPLOAD.
use Parameter - HAS_FIELD_SEPARATOR = 'X'
‎2008 Oct 22 12:19 PM
‎2008 Oct 22 12:27 PM
Hi ,
While upload , need to split and pass into the internal table.
Regards,
Bharani
‎2008 Oct 22 12:40 PM
how can i split and uplode to internal table
pls give one example
‎2008 Oct 22 12:25 PM
Hi
Jus read the data and later split it using SPLIT AT | Statement.
Cheers,
Hakim
‎2008 Oct 22 2:30 PM
Hi,
Before posting its always better to search in SDN.
Lots and lots of threads on this issue.
Also split may be like this
SPLIT file AT '|' INTO <c1>... <cn> INTO TABLE <itab>
Check these.
[https://forums.sdn.sap.com/click.jspa?searchID=17789952&messageID=6013362]
[https://forums.sdn.sap.com/click.jspa?searchID=17789952&messageID=6273913]
If not solved please revert back. Will help you.
Rhea.
Edited by: rhea on Oct 22, 2008 3:33 PM
‎2008 Oct 23 3:34 AM
Hi Saimedha
You can first upload the file as 1 column table.
After you populated the data into that 1 column internal table,
you can loop the internal table, split the field at '|' into the designed column
of another internal table.
Your code might be like this:
"lt_string is internal table with 1 column. Column name let say zdata.
LOOP AT lt_string INTO lwa_string.
SPLIIT lwa_string-zdata
AT '|'
INTO gwa_data-field1
gwa_data-field2
gwa_data-field3
gwa_data-field4
gwa_data-field5
gwa_data-field6
gwa_data-field7
APPEND gwa_data TO gt_data.
ENDLOOP.
"gt_data is your table with let say 7 field.Have a nice try