2009 Sep 07 4:13 PM
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
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
2009 Sep 07 4:52 PM
2009 Sep 07 4:56 PM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |