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 Transaction

Former Member
0 Likes
1,290

Hi,

How to call the transaction( Any transaction ex:VA03) from ALV Report. Where should I write the code?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
941

hi check this..

http://www.sap-basis-abap.com/abap/to-call-transaction-in-alv.htm

You need to pass the user command form name in the Function call, then write the dynamic perform as mentioned below.

code

form user_command using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when '&IC1'. "for double click

if rs_selfield-fieldname = 'VBELN'.

set parameter id 'AUN' field rs_selfield-value.

call transaction 'VA02' and skip first screen.

endif.

endcase.

endform. "USER_COMMAND

\code

regards,

venkat .

Hi,

How to call the transaction( Any transaction ex:VA03) from ALV Report. Where should I write the code?

5 REPLIES 5
Read only

Former Member
0 Likes
941

I understand that you are busy preparing for some interview.

Please search the forum before posting generic queries.

All the questions you have asked have answers posted in some thread or the other.

Please close the threads that you have already opened.

Regards,

Ravi

Read only

Sm1tje
Active Contributor
0 Likes
941

have a look at sample report BCALV_TEST_GRID_EVENTS.

For example, when clicking the Hotspot, in that event, you can call your transaction...

Read only

Former Member
0 Likes
942

hi check this..

http://www.sap-basis-abap.com/abap/to-call-transaction-in-alv.htm

You need to pass the user command form name in the Function call, then write the dynamic perform as mentioned below.

code

form user_command using r_ucomm like sy-ucomm

rs_selfield type slis_selfield.

case r_ucomm.

when '&IC1'. "for double click

if rs_selfield-fieldname = 'VBELN'.

set parameter id 'AUN' field rs_selfield-value.

call transaction 'VA02' and skip first screen.

endif.

endcase.

endform. "USER_COMMAND

\code

regards,

venkat .

Read only

GauthamV
Active Contributor
0 Likes
941

hi,

u can do it in user command.

ex: set parameter id 'aun'.......

call transaction 'va03'.

reward if hlpful.

Read only

Former Member
0 Likes
941

Hi

In the User command you have to write the code similar to this

FORM user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.

CASE r_ucomm.

WHEN 'PICK'. " Double click line

  • Check field clicked on within ALVgrid report

IF rs_selfield-fieldname = 'VBELN'.

  • Read data table, using index of row user clicked on

READ TABLE t_disp_tab INTO wa_item_tab INDEX

rs_selfield-tabindex.

  • Set parameter ID for transaction screen field

SET PARAMETER ID 'AUN' FIELD wa_item_tab-vbeln.

CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.

ENDIF.

endcase.

endform.

Here is the link which will have the example program

http://www.sap-basis-abap.com/abap/to-call-transaction-in-alv.htm

Regards

Kiran Sure