‎2008 Dec 23 9:55 AM
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 ?
‎2008 Dec 23 10:00 AM
Hi,
You would have written the code in the initialization. If you want to avoid this, write in some other event.
Regards
Srini
‎2008 Dec 23 10:00 AM
Hi,
You would have written the code in the initialization. If you want to avoid this, write in some other event.
Regards
Srini
‎2008 Dec 23 10:08 AM
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
‎2008 Dec 23 10:15 AM
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
‎2008 Dec 23 10:09 AM
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
‎2008 Dec 23 10:23 AM
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
‎2008 Dec 23 10:29 AM
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
‎2008 Dec 23 10:35 AM
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
‎2008 Dec 23 1:18 PM
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