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: 

Application server

Former Member
0 Kudos

Hi,

I want to download the file contente from application server to excel.

Can any one sugget me how to do that.

Thanks in advance,

Deepak.

1 ACCEPTED SOLUTION

gopi_narendra
Active Contributor
0 Kudos

You can do it using the Open Dataset, Read Dataset and Close Dataset statements to move the data from application server to the internal table

and then use the GUI_DOWNLOAD function module to download to the presentation layer.

Regards

- Gopi

11 REPLIES 11

Former Member
0 Kudos

Hi Deepak

As per my understanding you need to download an EXCEL file on application server to presentation server.

If so, you can consider following options:

1. If it is one time usage, transaction CG3Y can help you transferring from application server to presentation server.

2. If it has to be done programmatically:

i) Upload the application server file into an internal table using OPEN Dataset, READ Dataset, Close Dataset Stmts.

ii) Download the internal table to presentation server using FM: GUI_DOWNLOAD.

Kind Regards

Eswar

0 Kudos

Hi,

Thanks for your reply.

Here I have a problem. In my internal table in debugging mode i can see all the fields with data. But i can see in application server only upto 200 line length.

But when i download from application server to presentation server i am getting the same fields.

I am not getting the remaining fields.

Can any 1 suggest me what to do.

Thanks,

Deepak.

0 Kudos

Hi Deepak

Can you post your code, which can help in providing better advice???

Kind Regards

Eswae

0 Kudos

Hi,

concatenate fhdr '/KPMG_accdoc_details_'

sy-datum '_' sy-uzeit '.txt' into fhdr.

open dataset fhdr for output in text mode." ENCODING DEFAULT.

if sy-subrc = 0.

clear wa_appl_title.

read table appl_title into wa_appl_title index 1.

if sy-subrc = 0.

transfer wa_appl_title to fhdr.

endif.

loop at appl_it.

transfer appl_it to fhdr.

endloop.

close dataset fhdr.

write: / text-t05.

else.

write: / text-t04.

endif.

refresh: appl_title, appl_it, out_it, bkpf_it.

clear: appl_title, appl_it, out_it, bkpf_it.

free: appl_title, appl_it, out_it, bkpf_it.

Here in APPL_IT is my internal table. I can see all the fields data in debugging mode.

But i cant see them when i do download. I mean all fields.

Upto 200 length only i am able to see data.

Let me know any thing else required.

Help me plzzz.

Thanks,

Deepak.

Message was edited by:

Deepak Kudaravalli

0 Kudos

Hi Deepak

Code seems to be OK. Btb, can you let us know what mechanism are you using to view the file contents, is it AL11???

Or maybe to make sure that you have transferred whole data, you can try use sample code opening the same file and read to a temporary internal table.

Kind Regards

Eswar

0 Kudos

Hi,

Through AL11.

from AL11 to presentation server after download i can see the same data. butnt other fields.

Yes i can see all fields and data in the internal table.

Thanks,

Deepak.

Message was edited by:

Deepak Kudaravalli

0 Kudos

Hi,

Can I know exactly that can we see the other data frpm application server.

If so how can we see the data.....Plzzzz let me know is there any way.

My line-size is 350. But i could see only upto 200 in application server.

When I download to presentation server the same data through FM i am getting all the data perfectly.

Any suggestions plzz.

Thanking you,

Deepak.

0 Kudos

Hi Deepak

We can view the data residing in application server files via AL11 transaction.

1. Go to AL11.

2. Select the directory where the data is residing. If the directory does not exist, we can configure by using CONFIGURE button on application toolbar.

3. Now when we double click on the directory, it will list the files existing in the directory.

4. Select the file, click on Display button from application toolbar.

5. Here we can view the contents of the file.

Hope this helps you.

Kind Regards

Eswar

0 Kudos

Hi,

Through AL11,you can see only 255 characters.But data will be available,if you download the same using GUI_Download FM.

Kindly reward points if it helps.

gopi_narendra
Active Contributor
0 Kudos

You can do it using the Open Dataset, Read Dataset and Close Dataset statements to move the data from application server to the internal table

and then use the GUI_DOWNLOAD function module to download to the presentation layer.

Regards

- Gopi

Former Member
0 Kudos

Hi Deepak,

After FM GUI_DOWNLOAD ,try using the FM :

<b>SAP_CONVERT_TO_XLS_FORMAT</b>

It converts data to Microsoft Excel format.

Hope it helps.

Reward if helpful.

Regards,

Sipra