cancel
Showing results for 
Search instead for 
Did you mean: 

ALV - Export to Excel - Columns with cell variants not getting exported

Former Member
0 Kudos
197

Hi,

When we try to 'Export to Excel' from the ALV, the column's assigned with cell variants are not getting exported. It throws an error saying "Column <Name> contains cell variants and cannot be exported". It displays Message No. SALV_BS_MSG201

Note 1399946 (WD ABAP ALV: column with cell variants is not exported) says "No solution available". We are using SAP NetWeaver 7.00 and on which Support Package 20 is installed, which made this option to be disabled.

Can this be achieved by uninstalling support package 20 ? If so, what will be the impact on other objects/components ? Any workaround possible ?

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

ChrisPaine
Active Contributor
0 Kudos

Hello,

seems like you're pretty stuck with the problem - reversing out a support pack is only going to work for a certain time, as you will eventually need to patch.

An alternate solution (apart from not using cell variants in the first place) is to develop your own export to Excel. You could add your own buttons, calling your own functions to do the export. You can take advantage of the ALV model to do most of the work for you - just create a node which has a text representation of all the columns that have cell variants so that in this node has just texts. Then call the ALV export routines to export the text node instead of your ALV table.

It's a pain - but it may be you don't have much choice if you really need to have cell variants. I've done much the same thing for a complex table I have created in an application - it was too complex for ALV usage - but I needed export to Excel - so I built a text only node and filled it with all the data in a text only representation and then passed this node through the ALV functionality to build the excel file for output to user. (I'm intending to write a blog about this soon). It was relatively simple, but obviously not as simple as just using the SAP functionality (which has been disabled).

Hope this helps,

Chris

ChrisPaine
Active Contributor
0 Kudos

Refer to this blog

[Using WD ABAP ALV export - the hacked way|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/19646] [original link is broken];

for details.

Former Member
0 Kudos

Dear Chris,

the hack doesn't seem to work on a 7.30 system due to the fact that the class CL_SALV_WD_C_TABLE has been set to Protected instead of Public..

I have implemented this on one of my customers systems.. The customer has performed an upgrade to 7.30 and is now facing this error..

Can you help me here?

Thanks

Johannes