2008 May 10 12:20 PM
Hi,
How to call the transaction( Any transaction ex:VA03) from ALV Report. Where should I write the code?
2008 May 10 3:16 PM
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?
2008 May 10 12:26 PM
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
2008 May 10 12:27 PM
have a look at sample report BCALV_TEST_GRID_EVENTS.
For example, when clicking the Hotspot, in that event, you can call your transaction...
2008 May 10 3:16 PM
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 .
2008 May 10 5:36 PM
hi,
u can do it in user command.
ex: set parameter id 'aun'.......
call transaction 'va03'.
reward if hlpful.
2008 May 11 7:16 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |