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: 

calling a report from function module

Former Member
0 Kudos

hi friends,

I am a new one for this field. my requirement is create a datasource from a report program.I think we can create a datasource by using a function module and call this report program by this function module. but I could not know how to call this program into function module. for ex. I got a report progam ZSAMPLE from a transaction ZTR1 . I need how to call this report program into a function module.

I need step by step procedure to call this.. any step by step document relevant for this .......It will be best when you give me from starting to end with code(if necessary )

with full of hopes

JD

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Inside the FM

U write call Transaction ZTR1.

or,

SUBMIT report_name AND RETURN.

Regards

Sandipan

3 REPLIES 3

Former Member
0 Kudos

Hi,

Inside the FM

U write call Transaction ZTR1.

or,

SUBMIT report_name AND RETURN.

Regards

Sandipan

Former Member
0 Kudos

you kan call report by using SUBMIT statement......but there is no sense to call report from function module......

Rewards If satisfy......

Former Member
0 Kudos

Hi,

You can call executable programs from other ABAP programs using the following statement:

SUBMIT prog|(field) [AND RETURN] [options].

You can either specify the name of the program you want to call statically by entering the program name in the code of the calling program, or dynamically by specifying the name of a field (in parentheses) containing the name of the program. If the system cannot find the specified executable program when trying to execute the SUBMIT statement, a runtime error occurs.

If you omit the AND RETURN addition, all data and list levels of the calling program (the entire internal session) are deleted. After the called executable program has finished, control returns to the level from which you started the calling program.

If you use AND RETURN, the system stores the data of the calling executable program and returns to the calling after processing the called program. The system resumes executing the calling program at the statement following the call.

Refer this link this will be helpful to you.

[http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9dd035c111d1829f0000e829fbfe/content.htm]

Regards

Sourabh