Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

table control dynpro

Former Member
1,687

how do I figure out which multiple rows are selected? there is an attribute of the table control?

3 REPLIES 3
Read only

Sandra_Rossi
Active Contributor
1,537

In the attributes of the table control, you enter the name of the selection column of the table control (of the internal table) which contains if the row is selected. The field of the internal table has to be one character long, and will have value 'X' (selected) or ' ' (not selected).

For more information, please have a look at the documentation of "Table controls" in "Classic screen programming".

Read only

0 Likes
1,537

but the internal table flag how do I figure out when to put it at x

Read only

0 Likes
1,537

If you assign the selection column to the one-character component SELECTED of your internal table, here is an example dynpro with table control and program.

Dynpro flow logic:

PROCESS BEFORE OUTPUT.
 LOOP AT itab WITH CONTROL tabctrl INTO wa.
   MODULE pbo_line.
 ENDLOOP.

PROCESS AFTER INPUT.
 LOOP AT itab INTO wa.
   MODULE pai_line.
 ENDLOOP.
 MODULE action.

Program:

MODULE action INPUT.
  IF ucomm = 'EXECUTE'.
    LOOP AT itab INTO wa WHERE selected = abap_true.
      " process the line which is selected
    ENDLOOP.
  ENDIF.
ENDMODULE.

See also demo programs:

  • DEMO_DYNPRO_TABCONT_LOOP
  • DEMO_DYNPRO_TABCONT_LOOP_AT