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

How to run batch programs using SUBMIT command without any interaction need

Former Member
0 Likes
1,284

Hello ABAP gurus,

I have created a batch program in SE38 which calls many other SE38 Programs (Reports).

I have used the command SUBMIT to call the sub programs. There are about 15 sub programs that this main batch program is calling.

It works fine, but after calling each subprogram it stops and I have to manually click on 'Back Button' in green on the sap screen to run the next program in the list. Like this I have to do 15 times to run all the programs in the batch.

Is there a way to avoid this manual intervention and make the program run all the sub programs on its own.

Your feedback will be highly appreciated.

Thanks

Ram

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,069

Are there any WRITE statements in the called reports, if yes, use a EXPORTING LIST TO MEMORY or a TO SAP-SPOOL <print-parameters> option so the report does not display the spool.

Regards,

Raymond

4 REPLIES 4
Read only

former_member191735
Active Contributor
0 Likes
1,069

Use AND RETURN with submit command.

Syntax

SUBMIT {rep|(name)} [selscreen_options]

[ list_options ]

[ job_options]

[AND RETURN].

Read only

0 Likes
1,069

Thanks Sampath for the response.

Yes I am using the option "AND RETURN". So it is coming out of each sub program, and it is at this stage it waits for me to click on 'backward green arrow' to continue to the next.

Here is the code I have used

SUBMIT Z_AS_BI_F0005_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_DIVISION_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_COMPANY_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_CUSTOMER_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_BRANCH_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_BUS_UNIT_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_ADDRESS_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_CUSTOMER_GROUP_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_GROUP_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_PMT_TERMS_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_REGION_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

SUBMIT Z_AS_BI_TERRITORY_EXTRACT WITH S_DATE IN S_DATE WITH P_TEST = 'N' AND RETURN.

Any other suggestions or feedback will be appreciated.

Tks

Ram

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,070

Are there any WRITE statements in the called reports, if yes, use a EXPORTING LIST TO MEMORY or a TO SAP-SPOOL <print-parameters> option so the report does not display the spool.

Regards,

Raymond

Read only

0 Likes
1,069

WOW!!! That solved my problem. Yes there were write statements :).

Thanks a lot for the help. I appreciate it.

Ram