2007 Mar 22 4:58 PM
Hi,
I have internal table structure with 58 fields like that
Data:Begin of i_download occurs 0,
f1 type char25,
f2 type char25,
f3 type char25,
f4 type char25,
f5 type char25,
f6 type char25,
..............
...............
f58 type char25,
end of i_download.
record in internal table is something like this
10 20 30 40......................
11 22 33 44......................
12 23 34 45......................
But I would like to download these record at application server with
<b>comma separated</b> as follows..
10;20;30;40;......................
11;22;33;44......................
12;23;34;45......................
I am aware of simple download
Open data set
... then Loop at i_download
transfer i_donload to l_file.
endloop.
close data set.
Please suggest the logic to convert the downlad data format of i_downlaod.
Thanks
PK
Hi,
I have internal table structure with 58 fields like that
Data:Begin of i_download occurs 0,
f1 type char25,
f2 type char25,
f3 type char25,
f4 type char25,
f5 type char25,
f6 type char25,
..............
...............
f58 type char25,
end of i_download.
record in internal table is something like this
10 20 30 40......................
11 22 33 44......................
12 23 34 45......................
But I would like to download these record at application server with
<b>comma separated</b> as follows..
10;20;30;40;......................
11;22;33;44......................
12;23;34;45......................
I am aware of simple download
Open data set
... then Loop at i_download
transfer i_donload to l_file.
endloop.
close data set.
Please suggest the logic to convert the downlad data format of i_downlaod.
Thanks
PK
2007 Mar 22 5:01 PM
decalre a table for download wilike following -
f1 type char25,
c1 type c,
f2 type char25,
c2 type c,
f3 type char25,
c3 type c,
f4 type char25,
c4 type c,
f5 type char25,
c5 type c,
f6 type char25,
c6 type c,
and so on.
assign comma to all Cn fields.
And download the table.
Regards,
Amit
reward all helpful replies.
2007 Mar 22 5:01 PM
Hi,
Use the Function module SAP_CONVERT_TO_TEX_FORMAT to have semi colon separated by passing I_FIELD_SEPERATOR = ';' also to convert the internal table to text internal table..
Then use the text internal table to download it to application server...
Thanks,
Naren
2007 Mar 22 5:01 PM
Just before TRANSFER statement, you use CONCATENATE statement with SEPARATED BY ',' option to concatenate all your record fields into a big string variable and transfer that variable instead of your internal table record.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |