on 08-28-2007 8:33 AM
Hi Experts,
it is possible to enable in the first row of an ALV a button and
in the second one to disable the button of an ALV and in the next one enable and so on?
If it is possible how can I do this?
Thanks in advance!
Hi,
Yeah you can do it. First set the cell editor of your column as a button, I assume you have done that already. Then create a context attribute button_enabled in the SAME node, of type char01. When you set the cell editor using a button reference, say lr_button of type cl_salv_wd_uie_button, bind the enabled property to the context attribute button_enabled. Do this by
lr_button->set_enabled_fieldname( 'BUTTON_ENABLED' ).
When you populate the internal table to display in the ALV, loop thru the table and set button_enabled = abap_true and abap_false alternatively. Or whatever depending on your logic. The rows for which the field is false will be disabled and others will be enabled. Hope it is clear.
Regards
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
Yes it is possible, you need to define cell variants for your column. One cell variant should have a button that is enabled and other cell variant should have a button that is disabled.
Now in your context, you need an attribute selectedVariant (string). This will hold the value of the variantKey for each cell.
Regards,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.