cancel
Showing results for 
Search instead for 
Did you mean: 

export data from table or extended ALV to excel/Pdf using WD4A..

ArtiBhat
Associate
Associate
0 Kudos

Hi All,

I want to export data from table or extended ALV to excel/Pdf in WD4A..

Could you plz suggest me some suitable solution for it.

Thanks and Regards,

Arti.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

sometimes I have the the problem. I'm clickling on the export button but nothing happens.

Best regards

Marcus

Former Member
0 Kudos

Hello Arti,

IF you have created an extended ALV in the WD4A . There is option in ALV export export to spreadsheet when we get the ALV in the webpage.So you can directly import the data in the excel from there.

Assign Points for helpful answer..

Regards

Aashish Garg

ArtiBhat
Associate
Associate
0 Kudos

Hi Ashish,

Thanks for the reply. The Button to export the data is avilable but when I click it nothing happens.

I think i have to hard code this button. What do u suggest?

Regards,

Arti.

Madhu2004
Active Contributor
0 Kudos

Hai Arti ,

Normally the export on the ALV does the job for us.

if you want to export the data using some custom code follow these steps:

1) convert your output data which you have in the internal table to s satring

2)next convert this string data to XSTRING using the following function module SCMS_STRING_TO_XSTRING.

3) and use the foolowing method to export to excel or whatever is the application

 cl_wd_runtime_services=>attach_file_to_response(
     i_filename = lv_file_name
     i_content = i_content
      i_mime_type = lv_appln_type
*i_mime_type = 'x-excel/application'
     i_in_new_window = abap_false
     i_inplace = abap_false ).

Lv_appln_type is whether u want excel or word or wordpad or notepad.

Regards,

Madhu