10-13-2008 7:41 AM
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
10-13-2008 7:44 AM
Hi,
Try uploading by giving a blank space like :
(A Tab delimited)
KK1-KK3-KK4-DD1- -DD3-DD4
Thanks & Regards,
Navneeth K.
10-13-2008 7:47 AM
Yep that's true Navneeth
but its not a correct way for end users, isnt it?
10-13-2008 7:51 AM
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.
10-13-2008 7:56 AM
Dear Nav
can you please give me a any clue for regarding importing Headers
otherwise definitely move to that solution
10-13-2008 8:01 AM
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.
10-13-2008 8:13 AM
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
10-13-2008 8:13 AM
10-13-2008 8:56 AM
10-13-2008 9:40 AM
Dear Nav
do you leave out me??
please help me to create header fields.
10-13-2008 9:55 AM
Hi Nelson,
I will check out the "Header" import parameter and if possible provide you some sample code.
10-13-2008 7:48 AM
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..