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

To run a program in batch mode

Former Member
0 Likes
2,664

I have to creaet a program to run in batch mode to update anln1 and anln2.

selection screen : company and cost center.

I have to read z table

update anln1 and anln2 ( from table anla )

Can anybody help me how to write a program in batch mode and update....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,365

Schedule the program using a variant to run in background from transaction SM36.

Regards,

Joy.

3 REPLIES 3
Read only

Former Member
0 Likes
1,365

Hi

SY-BATCH

X if the ABAP program is running in the background, otherwise space

Batch Input

SY-BINPT

X while a batch input session is running and when an ABAP program is called using

CALL TRANSACTION USING, otherwise space.

OPTIONS FROM in the CALL TRANSACTION USING statement can set SY-BINPT to space either for

the entire duration of the program, or at the end of the BDC data.

SY-BINPT is always space during a CATT procedure.

Regards

Divya

Read only

Former Member
0 Likes
1,366

Schedule the program using a variant to run in background from transaction SM36.

Regards,

Joy.

Read only

0 Likes
1,365

Hi,

Write the entries logic with the condidtion like below.

after selecting the required data,

if sy-batch = 'X'.

  • Now update the required table.

endif.

Even you can put the select statement also after if condition.

now go to SM36 and define the Job with Program name or any other name.

Under Job condition select the execution mode/time of your program.

As you have mentioned the sy-batch condition , your program will work only for Back ground mode.

Hope it helps you.

Kind Regards,

Ravi Sankar.Z