cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any class similar to CL_GUI_FRONTEND_SERVICES for WD4A?

Former Member
0 Kudos

Hi SDN.

I am want to give same functionality i.e. present in CL_GUI_FRONTEND_SERVICES such as create directory, create folder file etc in a web dyn pro.

Is there any class similar to CL_GUI_FRONTEND_SERVICES for WD4A?

If there no similar class then please tell me the alternative way for solving above problem.

This is would be of great help.

Regards,

Rahul.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

To download a file on desktop you can use method of class" cl_wd_runtime_services"

cl_wd_runtime_services=>attach_file_to_response( ). I have provided a code to download a file to desktop.It may help you to gain a good understanding.



  call transformation ('ID') source tab = itab_sflight[] result xml xml_out.


  CALL FUNCTION 'CRM_IC_XML_STRING2XSTRING'
    EXPORTING
      INSTRING         = xml_out
*
  IMPORTING
     OUTXSTRING       = content.

  conv_out = cl_abap_conv_out_ce=>create( encoding = 'UTF-8'  ).


  DATA: lv_filename TYPE string.


* attach the first file
  conv_out->convert( exporting data = xml_out IMPORTING buffer = content  ).
  cl_wd_runtime_services=>attach_file_to_response(
    i_filename  = 'Sales_order_release.xls'
    i_content   = content
    i_mime_type = 'application/msexcel'
    i_in_new_window = i_in_new_window
    i_inplace       = i_inplace ).

Former Member
0 Kudos

thankx for the prompt reply,

i am already able to download a single file using the FileDownload UI element.

But now i am having more than one file with me & i want to download them in one shot.

If you have done similar thing then please send me that.

Regards,

Rahul

SergioFerrari
Active Contributor
0 Kudos

Rahul, which is your requirement?

Have you seen something similar to your expectation working in Internet environment?

If I guess well you'll need to ZIP and download it (there is an ABAP class to zip everything you want).

Sergio

Former Member
0 Kudos

Thanks a lot Sergio for giving me such a great idea........!

But i think SAP will do a great job if they manage to create a class similar to CL_GUI_FRONTEND_SERVICES .....

SergioFerrari
Active Contributor
0 Kudos

WD4A application runs in a Browser where security does not allow a lot of things...

So what you can do is upload or download; no way to execute a command or browse the PC filesystem.

You should find what you are looking for in the following pages:

http://help.sap.com/saphelp_nw04s/helpdata/en/09/a5884121a41c09e10000000a155106/content.htm

http://help.sap.com/saphelp_nw04s/helpdata/en/b3/be7941601b1d09e10000000a155106/content.htm

http://help.sap.com/saphelp_erp2005/helpdata/en/13/a1764299d76255e10000000a155106/content.htm

Sergio