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 fm with importing headers

Former Member
0 Kudos

Dear Friends,

i have z table and I'm using GUI_UPLOAD Fm to upload data

as my requirement i have to change uploading structure

suppose my ztable fields are follows

KEY1

KEY2

KEY3

KEY4

DAT1

DAT2

DAT3

DAT4

in my text file i mention records with out header fields

KK1-KK2-KK3-KK4-DD1-DD2-DD3

its working properly even without DAT4 field also

as my requirement i want upload as follows

KK1-KK3-KK4-DD1-DD3-DD4

then values are taken for wrong fields

can i use header field names with GUI_UPLOAD or is there any possibility to solve my problem.

hope, my question is clear for you.

Thanks in advance.

Nelson

11 REPLIES 11

Former Member
0 Kudos

Hi,

Try uploading by giving a blank space like :

(A Tab delimited)

KK1-KK3-KK4-DD1- -DD3-DD4

Thanks & Regards,

Navneeth K.

0 Kudos

Yep that's true Navneeth

but its not a correct way for end users, isnt it?

0 Kudos

But it has to be given this way, in order to be compatible with your internal table format. Or else then you have write some complex logic , do change data format and all.

The best option is to ask enduser to give a space.

0 Kudos

Dear Nav

can you please give me a any clue for regarding importing Headers

otherwise definitely move to that solution

0 Kudos

Incase you want to also include header field names into the file,

then what i would suggest is

1. create a internal table of the foll format,

data: begin of wa,

data(255) type c,

end of wa.

data: itab like standard table of wa with header line.

2. Upload the data into this internal table.

3. Ensure that first record in the file is field names.

4. Read first record of the itab and check what all fields present,

then accordigly do Loop and Read operations to populate the main internal table.

0 Kudos

Dear Vav

where i want mention that 1st record is the header field, against the bulk record set,

how can i use IMPORTING part HEADER in GUI_UPLOAD FM

0 Kudos

Is the solution clear ??

0 Kudos

no dear

can you give me a small sample

0 Kudos

Dear Nav

do you leave out me??

please help me to create header fields.

0 Kudos

Hi Nelson,

I will check out the "Header" import parameter and if possible provide you some sample code.

madan_ullasa
Contributor
0 Kudos

Hi,

i believe you file will have a delimiter... If it is a tab delimited, just and see if you can place 2 delimiters where there is no value for a column.. If the delimiter is say a character like ' ; ' then just leave it as ; ; .... This is the usual practice....

regds,

Madan..