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

Call tcode while clicking on a cell in table control

Former Member
0 Likes
660

hi,

is it possible to call a tcode while clicking on a cell of table control in module pool?

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
575

In pf status assign a function name( ex:PICK) for F2.

then in pai check the ok_code = PICK

Then get the values using the statement

GET CURSOR FIELD lv_field LINE lv_line OFFSET lv_offset.

lv_field will have the field name

lv_line the line selected

lv_offset will hold the offset.

Based on lv_line read the internal table using index.

read table itab index lv_line into wa.

Then use a call transaction statement using the value of the itab.

3 REPLIES 3
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
576

In pf status assign a function name( ex:PICK) for F2.

then in pai check the ok_code = PICK

Then get the values using the statement

GET CURSOR FIELD lv_field LINE lv_line OFFSET lv_offset.

lv_field will have the field name

lv_line the line selected

lv_offset will hold the offset.

Based on lv_line read the internal table using index.

read table itab index lv_line into wa.

Then use a call transaction statement using the value of the itab.

Read only

0 Likes
575

Thanks dude.

Can you please also suggest me how we pass selected cell value to tcode field.

for eg. cell contains SO & i want to pass it VA03.

Read only

0 Likes
575

Read table itab index lv_line into wa.

if sy-subrc = 0.

if lv_field = 'ITAB-VBELN'.

SET PARAMETER ID 'AUN' FIELD wa-vbeln.

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

endif.

endif.

For more details check f1 Help.