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

calling a report from function module

Former Member
0 Likes
1,012

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
Read only

Former Member
0 Likes
841

You can use the SUBMIT Option.

7 REPLIES 7
Read only

Former Member
0 Likes
842

You can use the SUBMIT Option.

Read only

matt
Active Contributor
0 Likes
841

CALL TRANSACTION

matt

Read only

Former Member
0 Likes
841

Hi,

try this FM.

create a FM in SE37.

IN CODING write the code.

CALL TRANSACTION 'TCODE'.

Regards,

Morris Bond.

Reward Points if Helpful.

Read only

Former Member
0 Likes
841

Hi,

Yes you can call report using

SUBMIT {rep|(name)} [selscreen_options]

[list_options]

[job_options]

[AND RETURN].

*reward points if useful

Thanks,

Suman

Read only

Former Member
0 Likes
841

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.

Read only

Former Member
0 Likes
841

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.

Read only

venkat_o
Active Contributor
0 Likes
841

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