cancel
Showing results for 
Search instead for 
Did you mean: 

Cell Selection & ALV Table (SALV_WD_TABLE)

Former Member
0 Kudos

Hi Experts,

is it possible to select more than one cell (not row!) in an ALV Table?

I changed the cell editor to cl_salv_wd_uie_input_field and set the whole table editable.

Now I am able to select one cell, but what about multiple selections? In the Java world I found this one: TableSingleMarkableCell

Sounds good - what about ABAP?

And if there is no way with the ALV Table, how I might get the functionality with other components?

Thanks for your help, have a great week!

Hendrik

Edited by: Gedicke, Hendrik on Jul 28, 2008 11:06 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

nowadays there is a better solution for this problem?

Best Regards,

Manuel

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

We have the same TableSingleMarkableCell in Web Dynpro ABAP:

http://help.sap.com/saphelp_nw70/helpdata/EN/a5/b8fa41c915da6fe10000000a1550b0/frameset.htm

It doesn't appear that this special cell variant is exposed via the ALV. Only the standard cell variant appears to work in ALV (CL_SALV_WD_CV_STANDARD), but it should work just fine in a normal table just like in WDJ.

Former Member
0 Kudos

Hi Thomas,

I tried the cell variant with a standard table but it doesn't seem to work. In my oppinion the result of this is:

Currently there is no way to select multiple cells in wd 4 abap.

Regards,

Hendrik

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I believe that this works the same in both Web Dynpro ABAP and Java using the TableSingleMarkableCell. There is a single markedData attribute on which the binding must be identical for all TableSingleMarkableCells of an entire table. So this does mean that you can only have one cell selected at a time. However after triggering a server event, you can retreive the current value of markedData, change some value in the context to denote that this item is marked, change the cellDesign on that cell and in effect have more than one marked cell at a time. It is just that the application developer is responsible for keeping track of the multiple marked cells.

Former Member
0 Kudos

I am sorry - it works but you don't have the chance to mark more than one cell at the same time. The work around with the "manual painting" is interesting...

FYI: There is a sample Component which shows the SingleMarkableCell: WDR_TEST_TABLE

Thanks & Regards,

Hendrik

Former Member
0 Kudos

Hi Thomas,

I tried to integrate the cell variant TableSingleMarkableCell. But I think the ALV table does not support this cell variant, or am I wrong? The runtime class is .CL_WD_TABLE_SNGL_MARK_CELL

(see http://help.sap.com/saphelp_nw70/helpdata/EN/a5/b8fa41c915da6fe10000000a1550b0/frameset.htm)

I will try to explain:

When you want to use a cell variant, it is necessary to "add" it to a column. Therefore you can use the public method "ADD_CELL_VARIANT" of the class "CL_SALV_WD_COLUMN".

This method has got a "value" import parameter which is a referencing the class "CL_SALV_WD_CV".

The thing is that the only sub class of "CL_SALV_WD_CV" is "CL_SALV_WD_CV_STANDARD" and this means that the TableSingleMarkableCell is not supported.

Or did I made a mistake? This is my last chance to use a cell selection with the alv component.

Thanks & Regards,

Hendrik

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

No as I stated earlier, I don't believe this will work in the ALV:

It doesn't appear that this special cell variant is exposed via the ALV. Only the standard cell variant appears to work in ALV (CL_SALV_WD_CV_STANDARD)

The ALV Cell Variants (and UI elements) have their own special classs that all begin with CL_SALV_WD*. Since there appears to only be one of these classes for the cell variants, I'm afriad that functionality isn't exposed via the ALV.

Former Member
0 Kudos

Hi comunity,

it is possible to "select" multiple cells if you write your own selection functions. But the algorithm is quiet complex, the usability is bad (because a click on a cell doesn't fire an event, the user needs to press the enter key in my solution) and the STRG or SHIFT-Keys are not used. Instead of the known keyboard shortcuts the user has du work with the function buttons in the table header.

But perhaps you want to get an impression of how it could be implemented:

http://www.gedicke.de/files/public/sap/wd_alv_extension.pdf

Again thanks for your help,

Hendrik