One-Click Actions handling in List UIBB
The link One-Click Actions in List UIBB shows how to design a list uibb with one click actions( row edit and row delete actions).This post is an extension to show how to handle the visibility of the row action buttons in the list uibb.
We have the OVP with list uibb with one click row actions as below. The requirement is like to enable the row actions may be its visibility or live-ability.
The list feeder class.
Check the et_row_actions referring table type and structure.
Here we have two field – visible_ref & enabled_ref which can help us to achieve the above requirement.
Our feeder class list table type.
We have to add two more fields for the visibility ref by which we can manipulate its show or hiding and similar for the enable ref.
Here we added to fields.
In the list feeder class – GET_DEFINITION we added a visibility ref field to the ROW_EDIT action.
Test the application. Here in all row the ROW_EDIT action are hidden.
In the list feeder class GET_DATA method, we have the below code.
Just make a few lines of code. For even row we make the RWO_EDIT action visible by setting the reference field value set to ‘X’.
Test the application. .Now we have ROW_EDIT action visible in some row and hidden in some row.
Now test the enable/disable of row actions. in the feeder class GET_DEFINITION method, for the row action ROW_DELETE provide enable ref field as ‘ROW_ACT_ENABLE’ .
Test the application Here in all row the ROW_DELETE action is disabled.
In GET_DATA method put the highlighted code, which will enable ROW_DELETE action in odd number rows and disable in even number rows.
Test the application.
Details check the link – One-Click Actions handling in List UIBB | SAPCODES