SAP ABAP: How to capture Check box event on Table Control in Dialog Programming?

Capturing checkbox event on table control quite tricky as I've found numerous inquiries on the web.

And here's my solution;


Step 1. Add a screen and create Table Control. Upon selecting the internal table, insert the Check Box on the table control you've just created.


Step 2. Double click the check box and on the check box attributes, put 'CHK' on the function code. This will trigger event on the PAI whenever user SEL/UNSELECT the check box column on the Table Control.



Step 3. On the PAI Module,
*/------------------------------------------------------------
  MODULE pai_0100 INPUT.
*/------------------------------------------------------------
  CASE SY-UCOMM.
    WHEN 'CHK'.
         ""your logic goes here..
  ENDCASE.

ENDMODULE.               " End of PAI_0100  INPUT
*/====================================

Hoping this will bring help to some trouble souls out there.

Mabuhay, Philippines!

Comments

  1. Hi Thanks a lot man this saved me was struggling a lot for this one.

    ReplyDelete
  2. Capturing checkbox events in SAP ABAP involves defining a suitable event handler. By assigning the event handler to the checkbox, you can respond to user interactions. Watch Youtube Vpn Appreciating the flexibility this approach offers.

    ReplyDelete

Post a Comment

Popular posts from this blog

SAP ABAP: Capturing CHECK BOX event in FM REUSE_ALV_GRID_DISPLAY / Cell Editing

SAP ABAP: Smartforms/SAPscript formatting

SAP ABAP: Adding leading zero to char or string.