cancel
Showing results for 
Search instead for 
Did you mean: 

Download data

Former Member
0 Kudos

Hi Experts,

Could anyone tell me how to donload data of an internal table to a local file in WD ABAP.

I tried FM GUI_DOWNLOAD also but it gives "CONTROL_FLUSH_ERROR" for FILETYPE = 'BIN' and "UNKNOWN_ERROR" for FILETYPE = 'ASC'.

could anyone please tell me how to download data ASAP.

Regards,

Vishal.

FULL points would be rewarded.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vishal

Use the static method ATTACH_FILE_TO_RESPONSE of class CL_WD_RUNTIME_SERVICES.

regards

Naresh

Former Member
0 Kudos

Thanks NAresh,

I tried this. But it did not work for me.

Do u have some samle code for this.

Regards,

Vishal.

Former Member
0 Kudos

Hi Vishal

You can use the method like this


CALL METHOD CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE
  EXPORTING
    I_FILENAME      = 'test.xls'
    I_CONTENT       = lv_name
    I_MIME_TYPE     = 'XLS'

Here parameter i_content should be of type XSTRING

Regards

Naresh

Former Member
0 Kudos

Thanks Naresh.

its working with little change. Do u have any idea how can I save the file in backgriund.

Points Rewarded.

Regards,

Vishal.

Edited by: VISHAL GUPTA on May 28, 2008 5:09 PM

Sm1tje
Active Contributor
0 Kudos

Why in background? Web dynpro is not something you would normally use in background?