Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Related to the Module Pool Programming

Hi,

I have user a Table Controls in the screen program.

Not what I want is when I click on a particular cell of a Table Control it should take me to some other screen where that details of the selected row has to be displayed.

Former Member
Former Member replied

Hello Nivash,

When you want to pick the value and take over that value to next screen, you got to make PF-STATUS, and for F2 that is Choose, type function code PICK.

And then go to PAI section of screen and provide behavior to PICK command i.e Double Click;

MODULE user_command_0200 INPUT.

ok_code = sy-ucomm.

CASE ok_code.

WHEN 'BACK'.

CALL SCREEN 100.

WHEN 'PICK'.

GET CURSOR FIELD fs_likp-vbeln LINE line_sel VALUE w_vbeln.

IF fs_likp-vbeln NE 'FS_LIKP-VB'.

MESSAGE 'Click on Delivery Number Only'(003) TYPE 'S'

DISPLAY LIKE 'E'.

fl_flg2 = 'NO'.

ELSEIF fs_likp-vbeln EQ 'FS_LIKP-VB'.

fl_flg2 = 'YA'.

ENDIF. " IF FS_LIPS-VLELN...

IF fl_flg2 EQ 'YA'.

w_tabix = t_tablecontrol-top_line + line_sel - 1 .

CALL SCREEN 300.

ELSEIF fl_flg2 EQ 'NO'. " IF FL_FLG2 EQ 'YA'

CALL SCREEN 200.

ENDIF. " ELSEIF FL_FLG2 EQ 'NO'

ENDCASE. " CASE OK_CODE

ENDMODULE. " USER_COMMAND_0200 INPUT

Moreover, declaration should be given as;

DATA:

w_vbeln type likp-vbeln, " Delivery Number

line_sel like sy-stepl, " Selected Line in Table

w_tabix like sy-tabix. " Table Index

Please check the code above, you'll definitely get solution.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question