cancel
Showing results for 
Search instead for 
Did you mean: 

File download in CRM WEB UI

Former Member
0 Kudos

Hi ,

I am using web ui .

I have a requirement of converting an internal table to xml file & download it to application server .

I have converted the file to xml but not able to save the file to application server .I am currently using CL_CRM_FRONTEND_SERVICES=>GUI_DOWNLOAD method to download on application server , but it is throwing an exception of "flush" but at the same time if i am calling this method from a report through SE38, it is working fine .

Is there any other method that is to be used for CRM WEB UI to download a file on desktop / application server .

Manish

Accepted Solutions (0)

Answers (3)

Answers (3)

dulal_mondal
Discoverer
0 Kudos

Hi Manish I have similar requirement can u plz share how did you solve?

Former Member
0 Kudos

solved

Former Member
0 Kudos

Hi mithal how did u resolved this................

dhruv_mehta
Active Contributor
0 Kudos

Hi Manish i have similar requirment can u plz share how did u solve?

Former Member
0 Kudos

Hi Dhruvin,

I have similar requirement can you please tell me how did you resolve it?

Regards,

Vikash

dhruv_mehta
Active Contributor
0 Kudos

Actually there are many places in standard where u can debug and fetch the code. one is export to excel in result list.

second is attachment component gs_cm. Right now all I can tell is this I will definitely try and will paste the code once I am free

CarstenKasper
Active Contributor
0 Kudos

GUI DOWNLOAD will not work in WebClient, as it is a completely different technology. You will have to use some kind of technology that uses HTTP. Just like in the Internet.

When you have got your content ready, maybe it is an option for you to transform it to XSTRING. There are some function modules in FM Group SCMS_CONV. Once you have got the XSTRING you can set it on a response object of class CL_HTTP_RESPONSE. Create a new one.

Now declare yourself an URL. In your viewcontroller you have got access to the variable RUNTIME.

concatenate runtime->application_url '/234234234.xml' into lv_url'

when you have both you can upload the content to the server cache:

cl_http_server=>server_cache_upload( url = lv_url response = lr_response ).

now you can access the content under the created URL lv_url.

On the BSP page you could for instance do this using javascript:


window.open( lv_url ).

This should open a dialog for the user with save option.

cheers Carsten

Former Member
0 Kudos

Hi Carsten,

Thanks for the reply.

Actually my requirement is that , when user click on a button , in the background i have to convert the internal table into XML file and save it on the application server .

Now i have the part of converting internal table to XSTRING but i am not able to save the file on application server .The solution you have suggested will give an popup for the user to open/save file .

My req is to save the file without this popup , directly to application server.

Please help

Manish

Former Member
0 Kudos

Hi Carsten,

Can you provide a more detailed code, I'm not very clear your post, thank you very much.

former_member210642
Participant
0 Kudos

Hi Carsten,

I had a requirment to download excel file to Local Server (Desktop) From Transaction launcher.

Please eloborate the method explained above.

I need to write it in SE38 program.bcoz we are using SE38 program in Transaction Launcher.

Please help me on this Issue.

Thanks,

Subrahmanyam.