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

Automate running batch session

Former Member
0 Likes
603

Hi,

Anyone know how to automate running the batch session generated in SM35?

Maybe like write a program to run the batch session? or got other way to do it?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
566
Hi

  You can use below statement within your program after successfully creating the session, which submits to execute the session immediately:

SUBMIT RSBDCSUB TO SAP-SPOOL WITHOUT SPOOL DYNPRO
       WITH IMMEDIATELY = SPACE
       WITH MAPPE = G_SESS
       WITH VON   = SY-DATUM
       WITH BIS   = SY-DATUM
       WITH Z_VERARB    = 'X'
       WITH FEHLER      = SPACE
       AND  RETURN.

Note: G_SESS is the session name.

Kind Regards
Eswar

Hi,

Anyone know how to automate running the batch session generated in SM35?

Maybe like write a program to run the batch session? or got other way to do it?

Thanks.

3 REPLIES 3
Read only

Former Member
0 Likes
566

Hi,

You need to create a background job which can run the program that creates the session & run it, this can be scheduled,

Rgds,

Read only

dani_mn
Active Contributor
0 Likes
566

HI,

look into this program, shedule this program in SM36 in background with required session name.

<b>RPIEWT04</b>

Regards,

HRA

Message was edited by: HRA

Read only

Former Member
0 Likes
567
Hi

  You can use below statement within your program after successfully creating the session, which submits to execute the session immediately:

SUBMIT RSBDCSUB TO SAP-SPOOL WITHOUT SPOOL DYNPRO
       WITH IMMEDIATELY = SPACE
       WITH MAPPE = G_SESS
       WITH VON   = SY-DATUM
       WITH BIS   = SY-DATUM
       WITH Z_VERARB    = 'X'
       WITH FEHLER      = SPACE
       AND  RETURN.

Note: G_SESS is the session name.

Kind Regards
Eswar