Application Development 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: 

capture click on table control.

Former Member
0 Kudos

Hello gurus,

I want to capture data from the line clicked on table control.the thing is ,I can select line but after selecting how to capture the line, plz advise.

thanks

2 REPLIES 2

Former Member
0 Kudos

Hello,

Check this thread :

Regards,

Pallavi

Former Member
0 Kudos

Hi

If u can select the line, it should mean u manage a MARK colunm, so u should have a field for mark.

So in your PAI

PROCESS PAI.
  
   FIELD MARK MODULE GET_SELECTED_LINE.

MODULE GET_SELECTED_LINE.
   CHECK MARK = 'X'.
* Get record index
   SEL_INDEX = <tab control>-CURRENT_LINE.
ENDMODULE.

So in your user-command u can read the line SEL_INDEX

IF u need to manage multiply selection, it should be better your to store the flag for mark in your internal table too.

MODULE GET_SELECTED_LINE.
   ITAB-MARK = 'X'.
  MODIFY ITAB LINE <table control>-current_line.
ENDMODULE.

In your user command u need to read the record where MARK is equal to X

If you want to manage the double click: u need to use GET CURSOR command:

MODULE GET_SELECTED_LINE.
   GET CURSOR LINE SEL_INDEX.
ENDMODULE.

Now u have the record of table control where the double was done, but u need to know the value of the index of internal table:

SEL_INDEX = <tab control>-top_line + SEL_INDEX - 1.

Max