2008 May 15 9:51 PM
Hello,
I have a internal table displayed on a screen using Table control wizard. Now, when user selects a particular line and double clicks it, I want to write a query based on the line user selected. How can this be achieved ?
Regards,
Rajesh.
Hello,
I have a internal table displayed on a screen using Table control wizard. Now, when user selects a particular line and double clicks it, I want to write a query based on the line user selected. How can this be achieved ?
Regards,
Rajesh.
2008 May 15 10:04 PM
Assign a function code to F2 in your status and do the coding:
PROCESS PAI.
LOOP AT ITAB.
MODULE GET_CURSOR.
ENDLOOP.
MODULE USER_COMMAND.
MODULE GET_CURSOR.
GET CURSOR FIELD ws_field LINE ws_line.
ENDMODULE.
MODULE USER_COMMAND.
CASE OK_CODE.
WHEN 'PICK'.
WS_LINE = <TABLE CONTROL>-TOP_LINE + WS_LINE - 1.
READ TABLE ITAB INDEX WS_LINE.
---> Show details
ENDMODULE.
2008 May 15 10:16 PM
When I try to use Get Cursor as you said, system says "GET" cursor statement not defined.
PROCESS AFTER INPUT.
*&spwizard: pai flow logic for tablecontrol 'TABABA'
loop at IT_ROLES.
chain.
field WA_ROLES-ROLE.
endchain.
MODULE GET_CURSOR.
endloop.
*&spwizard: module TABABA_change_tc_attr.
*&spwizard: module TABABA_change_col_attr.
MODULE USER_COMMAND_2000.
Module GET_CURSOR.
GET CURSOR GET CURSOR FIELD wa_roles LINE wa_roles.
ENDMODULE.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |