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

Error while using the z t-code

Former Member
0 Likes
1,587

Hi ,

We have created a z t-code and when we enter that we are getting an error msg that "Please schedule the program in background" . The program that was created is scheduled to run in back ground but we are getting this message when we execute the t-code itself. Can someone suggest what could be the problem ?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,340

Hi,

You would have written the code in the initialization. If you want to avoid this, write in some other event.

Regards

Srini

8 REPLIES 8
Read only

Former Member
0 Likes
1,341

Hi,

You would have written the code in the initialization. If you want to avoid this, write in some other event.

Regards

Srini

Read only

Former Member
0 Likes
1,340

Hi Balaji ,

I think that the prog has been writeen so as to throw the message when it is executed in foreground .

Check the prog first it seems that this message has been thrown deliberately .

Thanks

Sahil

Read only

0 Likes
1,340

Hi Sahiil ,

I checked the code , the person who has created the program has written the coding part for scheduling the job in backgroung under the event Start-of-Selection but he has not concluded the event with End-of-Selection , could the problem be because of this ?

thanks and best regards ,

Balaji

Read only

Former Member
0 Likes
1,340

Hi Balaji,

Also check the program code itself....check and see if any code is wriiten to give a message as mentioned...since there are ways to identify if a job is background or not,an abaper can easily write code ,give message and exit the program...

Hope it helps

Regards

Byju

Read only

0 Likes
1,340

Hi Byju ,

I checked the code , the person who has created the program has written the coding part for scheduling the job in backgroung under the event Start-of-Selection but he has not concluded the event with End-of-Selection , could the problem be because of this ?

thanks and best regards ,

Balaji

Read only

0 Likes
1,340

Hi,

Search for the keyword 'SY-BATCH' in the program. Check if it is checked for 'X'. If it is checked, eventhough when you run the Ztcode, it takes you to the program so if the program is restricted to Background only the same properties apply to the Ztcode for which the program is assigned.

Regards,

Shailaja

Read only

Former Member
0 Likes
1,340

HI.

You have to check the SY-BATCH eq 'X' for background job.

Eg:

if it_report3[] is not initial and sy-batch ne 'X'.

perform alv_report (Write your logic here)

endif.

Reagrds.

Jay

Read only

Former Member
0 Likes
1,340

Hi Balaji ,

Check for the code "Please schedule the program in background" in ur pgm and you can find why tht error is displaying,

Might be the code is checking for sy-batch , if so it is throwing tht message.

Debugg ur program thoroughly, it helps you a lot.

Regards,

Aby