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

Row selection without user action in table control

Former Member
0 Likes
1,493

Hi all,

I have two table controls TC1 and TC2. When I select row in TC1 , i need to display records in TC2 without any user action. I know this is not possible. So, I have added push button in TC1 and user press that button automaticaaly data is displaying .. but problem is .. i have to select that row in TC1 and press another push button to perform another action. In that case i need to select records high light similar to the standard selection..

please help me if any thing we can do for highlighting the records...

thanks,

reddyyy

5 REPLIES 5
Read only

former_member848108
Active Participant
0 Likes
804

Hi Chandra,

Let's assume, you are picking lines from TC1 by using check-boxes. Go to screen painter, double-click on the check-box field, and enter a value in the FctCode field in the opening window (Screen-painter: Attributes window). This will trigger the module TC1_ITEMS_modify, where you can do the necessary coding to highligt lines of TC2. Hope it helpds, good luck!

Ozcan.

Read only

Former Member
0 Likes
804

Hi,

For a table control there is a standard property called check or mark in its properties check that. And in the program declare a variable with same name and type C. this will serve as check box . from this we can track which row has been selected.

regards,

Raghu

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
804

Instead of The default selection column in table control,

try filling a column with button and then select the row so that the events gets triggered.

Read only

Former Member
0 Likes
804

Hi,

Check this Thread also, Dont worry he didn't identiy the Correct one but this works fine.

In Screen Painter select mulitple line selection.
" Just incase you are selecting the data in PBO then restrict it to once only so that data updated in Itab wont get refreshed.
" If your purpose is already served Close this Thread
In TOP include
 
DATA : BEGIN OF itab OCCURS 0, " 
       mark.
        INCLUDE STRUCTURE sflight.
DATA END OF itab.
 
In PBO.
module highlight.
loop at itab with control tc.
module show.
endloop.
 
in program.
module show.
loop at screen.
if itab-mark = 'X'.
modify screen.
endif.
endloop.
endmodule.
 
module highlight.
case ok_code.
when 'SEL'.
LOOP AT ITAB.
ITAB-MARK = 'X'.
MODIFY ITAB INDEX SY-TABIX. " This is a tested code in my system
ENDLOOP.
    WHEN 'DES'.
      LOOP AT itab.
        CLEAR  itab-mark.
        MODIFY itab INDEX sy-tabix.
      ENDLOOP.
endcase.
endmodule.

Cheerz

Ram

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
804

Hi get the current cursor line in PAI and modify the line in internal table in PAI.