Application Development 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: 

call Z transaction from report

Former Member
0 Kudos

Hi SDN's

I need to call a Z Transaction from a report and come back to the report once i press back of the Z Tcode.

Can any body guide me in knowing which is the best way that can be followed. Is that an Classic Report or ALV or OO ALV? I am comfortable with ALV, but not with OO ALV(being interactive). So can some one give a sample code if possible?

And also how do is pass the parameters from the report to the transaction.

Thanks & Regards

Pratyusha

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You can call any transaction using below syntax:

CALL TRANSACTION tcod [AND SKIP FIRST SCREEN] [USING itab].

For more info, refer below link:

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9da935c111d1829f0000e829fbfe/frameset.htm

Check this link for sample coding for BDC Call Transaction:

http://www.erpgenie.com/abap/bdc.htm

You can call from any type of report.

Thanks,

Santosh

10 REPLIES 10

Former Member
0 Kudos

Hi Pratyu,

You can use call transaction 'tcode'.

Pls reward if found useful.

Thanks

Shyam

Former Member
0 Kudos

You can call any transaction using below syntax:

CALL TRANSACTION tcod [AND SKIP FIRST SCREEN] [USING itab].

For more info, refer below link:

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9da935c111d1829f0000e829fbfe/frameset.htm

Check this link for sample coding for BDC Call Transaction:

http://www.erpgenie.com/abap/bdc.htm

You can call from any type of report.

Thanks,

Santosh

0 Kudos

I know this, but am not sure of the event to be used. So i meant to ask the event for making it interactive.

Thanks

Pratyusha

0 Kudos

When do you want to call the transaction? If you want to call based upon the user's action on your list, then you may use AT LINE-SELECTION event.

For more info on ABAP Reporting Events, check this link:

http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9a1435c111d1829f0000e829fbfe/frameset.htm

Hope this is what you are looking for.

Thanks,

Santosh

0 Kudos

Hi Sanotsh,

Thank u for the info.

Can u plz confirm me if we can use the same event in case of ALV List and ALV Grid also.

If you have any idea of the OO ALV can u please send a sample code?

Thanks

Pratyu

0 Kudos

You cannot use above event in ALV as it is a LIST event.

ALV has its own events. Check below link:

http://www.sap-img.com/abap/what-are-the-events-in-alv.htm

Check this link which also contains sample coding:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d97...

And for OO ALV, refer below link:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/acdefb13-0701-0010-f1a2-8ee...

Thanks,

Santosh

Former Member
0 Kudos

Hi,

Check this link for a very good documentation on OO ALV..

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf

Thanks,

Naren

0 Kudos

Thnk U all for the information,

one last doubt.

i use the set parameter id in the report before calling the transaction. and use the statemetn get parameter in the PBO of the custom tcode screen. but once i save the tcode it shud clear off the parameter ID.

so tht i go back to the list and again select a new list item and go the tcode with the new parameter.

And not only that when i run the transaction individually i get the parameter by default. how do i avoid this and how do i differentiate the tcode when it being called from the report or individually?

Regards

Pratyu

Former Member
0 Kudos

Hi pratyu usha ,

am unable to intrepret what exactly u are looking for but

if u are looking to clear the field value once saved u can refresh the fields/list before the next value pops-up, in the sense u can free or clear itab/ddic structure.

hope this helps,

all the best,

sampath

*mark helpful answers

Former Member
0 Kudos

solved