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 have an a transaction code ZABW and a program under this transaction ZBW_SAM, now I want to create a function module, and i want to call the above program/report by the function module. is it possible? , if yes, guide me and give me suitable code.....

thanks in advance

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

You can use the SUBMIT Option.

7 REPLIES 7

former_member188685
Active Contributor
0 Kudos

You can use the SUBMIT Option.

matt
Active Contributor
0 Kudos

CALL TRANSACTION

matt

Former Member
0 Kudos

Hi,

try this FM.

create a FM in SE37.

IN CODING write the code.

CALL TRANSACTION 'TCODE'.

Regards,

Morris Bond.

Reward Points if Helpful.

Former Member
0 Kudos

Hi,

Yes you can call report using

SUBMIT {rep|(name)} [selscreen_options]

[list_options]

[job_options]

[AND RETURN].

*reward points if useful

Thanks,

Suman

Former Member
0 Kudos

Hi,

whenever you want to run program there use below syntax.

Call program from FM

SUBMIT demo_program_submit_rep1 AND RETURN

OR

SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN

WITH paramet eq 'Selection 1'

WITH selecto IN seltab

WITH selecto ne 3

AND RETURN.

Former Member
0 Kudos

U can use

Submit pogram name.

or u can include that program inside of ur functon module. But for this ur program should be include type.

or u can create one transaction for ur program and call that transaction inside of ur FM.

venkat_o
Active Contributor
0 Kudos

Hi Jaya, Yes. It is possible to call ur custom program using SUBMIT statement. 1. If u have data to pass then build table type RSPARAMS and use below statement.


data:
      rspar_tab  TYPE TABLE OF rsparams, 
      rspar_line LIKE LINE OF rspar_tab,
SUBMIT report1 WITH SELECTION-TABLE rspar_tab 
               AND RETURN.
1. If u want to create variant to the program and use that. use the below statement .
SUBMIT report1 USING SELECTION-SET 'VAR1' "variant 
               AND RETURN.
Regards, Venkat.O