cancel
Showing results for 
Search instead for 
Did you mean: 

SALV_WD_TABLE, DropDownByKey and Export to Excel

Former Member
0 Kudos

Hi together,

we are working with a WD4A-Application with components (own development) which reuses the SALV_WD_TABLE-Component! Some of the columns contain DropDownByKeys. The value sets are filled manually (but that shouldn't care). When I export the content of the table, only the key of the currently selected value of a ddk will be exported. Is there a easy way to change this behavior and to see the text afterwards in the export!?

It really would be hard to use DropDownByIndex as I would have to change the whole data model... (and I only assume that this would work)!

Thanks & best regards,

Stefan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Stefan,

Why don't you create an extra attribute for the text and create a little method to populate that attribute with the text (a case encase will do) every time a value is selected in the drop down?

After downloading to Excel just use the column for this attribute and delete the one for drop down?

Cheers,

Arpan

Former Member
0 Kudos

Hm, as there is no built-in solution to solve my problem, I will create additional columns for the export and delete them afterwards...

Thanks & best regards,

Stefan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You have used the DropDownByKeys, by which the context attributes captures the Key values only.

I would suggest you to use the Fixed Domains rather than using the manual filling so that retrieving and maintainence will easier.

Regards

Vikranth

Former Member
0 Kudos

Hi Vikranth,

but for fixed domain values also only the keys will be exported! I think that this is a general problem for DDKs in the ALV! Is there anywhere a interface which can be implemented to change the keys into text!?

Best regards,

Stefan

Former Member
0 Kudos

If you want the Texts for the keys for the Fixed Domains , you can use the DD_DOMVALUE_TEXT_GET to get the texts for the Fixed Domains

Regards

Vikranth

Former Member
0 Kudos

Of course, but how can I get "inline" in the excel-export of the ALV!?

Former Member
0 Kudos

Hi,

Otherway as said , define your own export to excel funcionality and pass the desired internal table to it.

like

call function 'SCMS_STRING_TO_XSTRING'

exporting

TEXT = TEXT

importing

BUFFER = XTEXT. WDR_TASK=>CLIENT_WINDOW->CLIENT->ATTACH_FILE_TO_RESPONSE(

**path to the word file

I_FILENAME = 'WDP.xls'

  • String Variable

I_CONTENT = XTEXT

  • File Type

I_MIME_TYPE = 'EXCEL' ).

Regards

Vikranth