2008 Dec 30 9:37 AM
hi,
my requirement is to upload file from presentation server.
that file is .txt file.
the file contains field names in the first row and from second row actual data will be..
if the columns of the file interchanges the program shuld work as it is..i.e based on the field name we hav to move that value under that field name to the corresponding work area......
how to do it?
can any one help me in this....
hi,
my requirement is to upload file from presentation server.
that file is .txt file.
the file contains field names in the first row and from second row actual data will be..
if the columns of the file interchanges the program shuld work as it is..i.e based on the field name we hav to move that value under that field name to the corresponding work area......
how to do it?
can any one help me in this....
2008 Dec 30 9:43 AM
2008 Dec 30 10:02 AM
2008 Dec 30 10:10 AM
Hi,
Do as I have explaine.
1) Upload the contents of the flat file in your application server into your internal table. The internal table structure must contain a single field of string type.
2) After getting the contents of the flat file into internal table. Use subsrting operation to segrigate the values that is the field name and its values.
Assign the internal table to a Field Symbol of Table Type say <TAB>.
FIELD-SYMBOLS: <fs1>.
Loop at <TAB> assigning <fs>.
Assign component 'F1' of structure <fs> to <fs1>.
wa_struct-F1 = <fs1>.
Assign component 'F2' of structure <fs> to <fs1>.
wa_struct-F2 = <fs1>.
.
.
.
append wa_struct to it_struct.
clear wa_struct.
endloop.
Hope this helps you.
Murthy.
2008 Dec 30 10:34 AM
is there any possibility to use case statement with the function module TEXT_CONVERT_XLS_TO_SAP
let itab be the table into which the xl data is coming..
i.e based on column can we move data like
case col-name
when indicator.
wa_input-poind = itab -poind.
when company code.
wa_input-bukrs = itab-bukrs.
endcase.
append wa_input to it_input.
2008 Dec 30 10:29 AM
Hi.
No need to keep the field name in first row,remove it and use with actual data.
Regards.
Jay
2008 Dec 30 10:36 AM
my requirement is if the fields get interchanged in the file,then also corresponding data shuld be moved to corresponding work area based on the field name.
2009 Jan 12 4:10 AM
Hi,
I have the same requirement as yours. If you have solved your problem , Please let me know the solution.
Thanks and regards,
Parvatha Reddy
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |