Application Development and Automation 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: 
Read only

download at Application Server

Former Member
0 Likes
535

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

3 REPLIES 3
Read only

amit_khare
Active Contributor
0 Likes
507

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.

Read only

Former Member
0 Likes
507

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

Read only

Former Member
0 Likes
507

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.