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

Invoking multiple reports from a single report

Former Member
0 Likes
1,189

Hi all ,

I have a requirement like this . I have these reports which will produce PDF forms . The selection screen of all these is same . Now they say we will modify the selection screen to include three radio buttons and specify the form names . So that in the program we will call the program based on the form name and execute the program to generate forms .

I know this can be done with SUBMIT but I am looking at the best way of doing this .

Can anyone drop your ideas as what is the best way to achieve that ?

Thanks,

Daniel .

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
805

Hi,

Perhaps you can use/call dynamic external subroutine.


PERFORM (subrname) IN PROGRAM (progname).

Regards,

Ferry Lianto

Hi all ,

I have a requirement like this . I have these reports which will produce PDF forms . The selection screen of all these is same . Now they say we will modify the selection screen to include three radio buttons and specify the form names . So that in the program we will call the program based on the form name and execute the program to generate forms .

I know this can be done with SUBMIT but I am looking at the best way of doing this .

Can anyone drop your ideas as what is the best way to achieve that ?

Thanks,

Daniel .

3 REPLIES 3
Read only

Former Member
0 Likes
806

Hi,

Perhaps you can use/call dynamic external subroutine.


PERFORM (subrname) IN PROGRAM (progname).

Regards,

Ferry Lianto

Read only

suresh_datti
Active Contributor
0 Likes
805

>>I know this can be done with SUBMIT but I am looking at the best way of doing this .

can't think of a better option.. even if you tie the report to a Tcode & call that Tcode or put the report inside a function module & make a function call, you will ultimately have to execute the report..

I would go with the SUBMIT option.

~Suresh

Read only

Former Member
0 Likes
805

Here is an example of what you could do to create the forms based on your radiobutton selection:

SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME.

PARAMETERS: p_form1 RADIOBUTTON GROUP rad1 DEFAULT 'X'.

PARAMETERS: p_form2 RADIOBUTTON GROUP rad1.

PARAMETERS: p_form3 RADIOBUTTON GROUP rad1.

SELECTION-SCREEN END OF BLOCK b01.

START-OF-SELECTION.

IF p_form1 = 'X'.

SUBMIT zprogram1 USING SELECTION-SET variant1.

ELSEIF p_form2 = 'X'.

SUBMIT zprogram2 USING SELECTION-SET variant2.

ELSE.

SUBMIT zprogram3 USING SELECTION-SET variant3.

ENDIF.

END-OF-SELECTION.

Just save all of the selection screen criteria for each of the form programs in a variant, which you use in the above code. I hope this helps.

- April King