Register Login

Selected Row in a screen table

Updated May 18, 2018

Problem:
I have created a screen in full screen editor and added a screen table. I have populated this table with data, but I don't know how to check wether arow was selected or not. I know that I should perform check on this little field (in table's field-list) that represents selection column ( 'X' -selected, ' ' - not selected), but don't know how to transfer it's value from the screen to a module in ABAP. Could someone please help me?


Solution:
Try this code ...
Screen flow logic for screen having the screen table .
****************
PAI module
PROCESS AFTER INPUT.

Related: Attach Search Help to Selection Screen Field in ABAP

LOOP .
FIELD CHK MODULE GET_DATA. "Chk is the Chk box in the screen table
ENDLOOP.

MODULE USER_COMMAND_0100.

****Module get_data ****

MODULE GET_DATA INPUT.
IF CHK = 'X' .
LINE = ITEM-CURRENT_LINE . "ITEM is the Table Control
********
********ANY OTHER LOGIC AS REQUIRED
********
ENDIF.

ENDMODULE. " GET_DATA INPUT

Note that what i have mentioned above is for a module pool ( Dialog programming). Let me know if you need any more details.

Read Here for More SAP ABAP Tutorials


Comments

  • 19 Jun 2009 7:05 am Guest
    I WANT TO DISPLAY THE SELECTED TABLE ROWS IN A TABLE CONTROL IN ANOTHER SCREEN. cAN YOU GUIDE ME.

    THANKS IN ADVANCE.
    HARISH

×