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

Program Execution in Background

Former Member
0 Likes
1,225

Hi gurus,

I have Implemented on enhancement point in program RFEBKA00 . this is for FF.5 tcode. Now I want to execute this program in background every time. so which system fields or parameters should i check in the conditon. so that my code will execute only when it is matching the condition. currently I have used following code which is working in foreground but not working in background.

if sy-tcode eq 'FF.5'.

clear bankl.

endif.

Please suggest to correct condition so that code will execute only for FF.5 Tcode.

thanks in advance.

Vinod

1 ACCEPTED SOLUTION
Read only

Former Member
864

Hi,

You can schedule a job using program name not with TCODE. that why SY-TCODE is not getting populated when u schedule the program in background job.

instead you can use SY-REPID = 'RFEBKA00' to set condition.

If SY-BATCH = 'X' it means program runs in background you can also use this variable.

Regards,

Shanmugavel chandrasekaran

2 REPLIES 2
Read only

venkat_o
Active Contributor
0 Likes
864

Hi, <li>Use sy-batch system field to use in condition like below.


If sy-batch eq 0. 
 "Code ------It is executed when you run program in background. 
endif.
Thanks Venkat.O

Read only

Former Member
865

Hi,

You can schedule a job using program name not with TCODE. that why SY-TCODE is not getting populated when u schedule the program in background job.

instead you can use SY-REPID = 'RFEBKA00' to set condition.

If SY-BATCH = 'X' it means program runs in background you can also use this variable.

Regards,

Shanmugavel chandrasekaran