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 multiple Report programs with submit

Former Member
0 Likes
759

Hi all,

I am scheduling a job with job open. Then i am calling a report program with sumbit and passing the jobname and jobcount as parameters to this report program. Like...

*************************************************

<b>Program name : WRAP.</b>

Job_Open

Submit X with p_name = lv_jobname

with p_count = lv_jobcount

and return.

Job _close

************************************************

<b>Program 'X':</b>

In program X i have two submit statements.

Submit Y with p_run = 'TEST'

via job lv_jobname number lv_jobcount and return.

Submit Z with p_date = '20070101'

via job lv_jobname number lv_jobcount and return.

************************************************

According to the above case , i will call the program X ,and in turn X will call the program Y and Z.so that the report output of Y and Z are available to program WRAP.But incase inside the program X the program Y fails i dont want to continue with next program Z.I want to say this staus to program WRAP.

How can i achieve this....

Points will be rewarded!!!

2 REPLIES 2
Read only

Former Member
0 Likes
448

Check sy-subrc after the SUBIMIT Y & put in a hard error message.

Arya

Read only

Former Member
0 Likes
448

Hi Hemavathi,

For this to happen,either you can check for the value of sy-subrc after the Submit statement for the Program Y has been completed.If it is anything else apart from ZERO,then you can display an Error message or whatever functionality you want to include in that.

OR

You must be expecting some return values from Program Y.If in case some variable's value is initial which should not be,then you can stop further processing of your report and stop there.

In case you have any further clarifications,do let me know.

Regards,

Puneet Jhari.