on 10-25-2013 9:37 AM
Hi,
I have an ALV table and in one of the columns I have ALV link to action the requirement now is to make few rows as link to action and few as text view depending on the conditions.
I tried to do it using Cell Variant, but i am getting complete link to action or complete text view.
Kindly let me know if any possible solutions are there.
REgards,
Ramesh.
Hi,
you can achieve this using cell variant. Check this document which suits your requirement : Cell Variant for WDA ALV
hope this helps u.,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramesh,
You don't need to change the cell editor from LinkToAction to TextView. You can use LinkToAction for all rows and simply set the LinkToAction's enabled property for each row to true or false (as Ismail has demonstrated). When LinkToAction.enabled is true, the link is click-able. When LinkToAction.enabled is false, the link will appear as text and not be click-able (it will appear just like a TextView).
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
try this:
if you already have Link_to_action (LTA) for all fields of your column, you have something like this where you assign the cell editor to your column:
data: lr_DRG_STAT_lta type ref to CL_SALV_WD_UIE_link_to_action.
create OBJECT lr_DRG_STAT_lta.
lr_DRG_STAT_ICON_clmn->SET_CELL_EDITOR( exporting value = lr_DRG_STAT_lta ).
you just need to do this:
Create one more column in your context-node. Lets call it COL_ENABLED of type WDY_BOOLEAN, in which you write ABAP_TRUE for LTA enabled, and ABAP_FALSE for LTA disabled (depending on your conditions for each row).
And then you just need to add following line to your code.
Method SET_ENABLED_FIELDNAME of CL_SALV_WD_UIE_link_to_action enables or disables LTA depending on value given in COL_ENABLED.
data: lr_DRG_STAT_lta type ref to CL_SALV_WD_UIE_link_to_action.
create OBJECT lr_DRG_STAT_lta.
lr_drg_STAT_lta->SET_ENABLED_FIELDNAME( 'COL_ENABLED' ).
lr_DRG_STAT_ICON_clmn->SET_CELL_EDITOR( exporting value = lr_DRG_STAT_lta ).
This should work, me myself didn't try it. Please inform about success..
Regards
ismail
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If i am not wrong, you can handle this in field_catalog specification.
Can you try that
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.