cancel
Showing results for 
Search instead for 
Did you mean: 

Webdynpro ALV - Column contains cell variants cannot be exported

Former Member
0 Kudos

Hi,

Our Webdynpro application contains a ALV table.

One of the column contains cell variants because the text in it can become a hyper link when certain condition is met.

However, because of this, when user click the built-in Export button to export table contents into Excel, the column that contains cell variants cannot be exported, and a warning message is displayed.

Is there a way to export the text content of the column that contains cell variants?

Any suggestion is appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

We cannot export ALV to file with cell variants: check the help here: Exporting to Microsoft Excel - UI Technologies in ABAP - SAP Library and this SAP Note 1399946

You can check this doc if it helps you:

Regards,

Kiran

Former Member
0 Kudos

Thanks, Kiran.

I think you are right. We'll have figure out a work around then.

I'll try the example in your second link.

Or, I'm thinking creating a separate column for displaying link only and have the original link column display as plain text so that when user export, they don't miss useful data.

Thanks for the help.

Jing

former_member184578
Active Contributor
0 Kudos

Hi,

For hyper link, you don't have to use Cell variants. You can change the cell editor to Link to Action UI and bind the enabled property to attribute of type wdy_boolean. Then based on condition set the attribute to abap_true / abap_false to have Hyper Link( enabled mode) or Text( disabled mode).

Hope this helps,

Regards,

Kiran

Former Member
0 Kudos

Thanks for the suggestion, Kiran.

My problem is that we have two different type of hyper links for the same column, one with image, one without, and each type direct the link to a different location, one internal on SAP server, one external to a third party web application. I'm using the variant key to have the ALV dynamically decide which type of link is set to the cell.

I'll look into the option of binding enabled property to an attributed. I guess to solve the link image issue, I can also bind the image source to variable, and when the variable is empty, no image will be displayed?

Thanks,

Jing

Answers (1)

Answers (1)

Former Member
0 Kudos

Just want to provide a quick update on my final solution to this...or say the client's preferred solution.

Two options to solve the issue of column with variant cannot be exported:
1. Change current column with variant to be using only Link to Action editor (without variant) and only enable the link when needed.  (Thanks to Kiran for this solution)

  Pros: no layout change

  Cons: when link is not enabled, the row text is displayed as grey since it is actually a disabled link instead of pure text.

2. Create a separate column solely for the link and using an image icon for the link. (Image source can be bound to a table field using set_image_source_fieldname(), so that the link icon will only appear for a row that has a link available).

  Pros: The text column of concern is displayed properly (with no grey out)

  Cons: table layout change, an extra column.

Client preferred option 2 (i.e. using an extra column without greying out the original text column).