Application Development 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: 

gui_upload

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

abdul_hakim
Active Contributor
0 Kudos

Hi

Jus read the data and later split it using SPLIT AT | Statement.

Cheers,

Hakim

8 REPLIES 8

Former Member
0 Kudos

Just search with the search term "GUI_UPLOAD", you will find lot of threads.

Former Member
0 Kudos

Hi,

You can use FM GUI_UPLOAD.

use Parameter - HAS_FIELD_SEPARATOR = 'X'

0 Kudos

hi sujith

in my flat file delimeter is "I" pipe line .

0 Kudos

Hi ,

While upload , need to split and pass into the internal table.

Regards,

Bharani

0 Kudos

how can i split and uplode to internal table

pls give one example

abdul_hakim
Active Contributor
0 Kudos

Hi

Jus read the data and later split it using SPLIT AT | Statement.

Cheers,

Hakim

Former Member
0 Kudos

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

Former Member
0 Kudos

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