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

Question on line selection in table control in dialog programming....

Former Member
0 Likes
434

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.

2 REPLIES 2
Read only

Sm1tje
Active Contributor
0 Likes
415

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.

Read only

Former Member
0 Likes
415

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.