‎2010 Jan 09 11:55 AM
hi,
is it possible to call a tcode while clicking on a cell of table control in module pool?
‎2010 Jan 09 12:01 PM
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.
‎2010 Jan 09 12:01 PM
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.
‎2010 Jan 09 12:09 PM
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.
‎2010 Jan 09 12:34 PM
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.