Error in triggering background job
HI, I've been facing an error which a background job is being scheduled. The scenario is something like this ...
1) A third party schedulling system triggers a SAP job and monitors the progress
2) In SAP, the master job is been copied with a different user name and then released for processing.
3) There are multiple jobs which get triggered but there is one job which is causing a problem.
4) The job makes a copy an stays in a scheduled status without getting released. While i try to manually release the job it give me an error that cannot create record in the database.
5) Upon checking the system log it gives me this - Error: INSERT background sched. table(job $$$$).
There is already an entry for the specified job in the table TBTCS.
6) While checking the TBTCS table i've found multiple entries out there. Should this table be empty or have information about the runtime of this job.
Please help as this background job is causing concerns in archiving processess defined.
Thankx in advance for your help.
Arvind.
the earlier problem of background job was solved by changing the output device assigned to user wf-batch .
regarding the transport request :
when i was trying to execute the step : "Schedule bakgrd for missed deadlines " MANUEL it was giving me an option of SAVE AND SCHEDULE . which was creating the transport request . but when i executed it automatically it worked fine without asking a request to me ... i don't know why )-: ... probablly we can specify a different interval then the standard of three minutes and which will be transported (it's just a guess) . i have executed it automatically ...
well thanks all for u r help
Similar Messages
-
Internal error occurs in background job scheduling
Hi Experts,
We are facing an error message "Internal error occurs in background job scheduling" while trying to execute a custom report(Z report) in background in SA38.
Please find the following observation on our side on this message.
1) This message is not coming for only one report not for others.
2) SU53 screen shot shows that SE38 check is failed, but the weird thing is not happening for other report.
3) Persons having SE38 auhtorization are able to run this report.
Please advise.
Thanks in advance,
VivenWhat is the message ID and number? Have you tried OSS search and debugging?
What does this program do, in a nutshell? -
Error while scheduling Background Job for User/Role Full Synchronization
Hi all,
We have installed RAR 5.3 Component and uploaded the authorization data & established the connectors to the backend system.
We have performed all the post installation activities and everything is complete.
When we have scheduled User -Full Synchronization with the Back End system as a part of Post Installation Activity we are receiving the below error message
"Error while executing the Job:Cannot assign an empty string to host variable 2."
Also the VIEW LOG/ Terminate Job buttons are disabled in this screen.
Can somebody please help us in resolving the above issue
Thanks and Best Regards,
Srihari.KHi,
We are copy pasting the error log (Part as it is huge) below here. We could able to do Full Synch for Roles and also for Profiles. Only for User Synch we are getting this error and none of the users are sychronized to RAR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user WILSONA of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user WINDC of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user WLADICHJ of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user WUK of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user ZENGS of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: Update user ZHENGL of HL2-QAHR
Jan 13, 2009 12:34:27 AM com.virsa.cscext.dao.CSCDAO populateGenObjUser
INFO: All System Flag:false=====Last Batch Flag:true
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.BatchRiskAnalysis loadUserData
INFO: @@@ User sync completed for params true: Syskey List is [HL2-QAHR]
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.BgJob run
WARNING: *** Job Exception: Cannot assign an empty string to host variable 2.
com.sap.sql.log.OpenSQLException: Cannot assign an empty string to host variable 2.
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:85)
at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Syslog.java:124)
at com.sap.sql.types.VarcharResultColumn.setString(VarcharResultColumn.java:57)
at com.sap.sql.jdbc.common.CommonPreparedStatement.setString(CommonPreparedStatement.java:511)
at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.setString(PreparedStatementWrapper.java:355)
at com.virsa.cscext.dao.CSCDAO.updateIgnoredUserData(CSCDAO.java:1388)
at com.virsa.cscext.dao.CSCDAO.populateGenObjUser(CSCDAO.java:1169)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.populateGenObj(BatchRiskAnalysis.java:868)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.insertBAPIUserData(BatchRiskAnalysis.java:142)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.loadUserData(BatchRiskAnalysis.java:390)
at com.virsa.cc.xsys.bg.BatchRiskAnalysis.performBatchSyncAndAnalysis(BatchRiskAnalysis.java:1275)
at com.virsa.cc.xsys.bg.BgJob.runJob(BgJob.java:402)
at com.virsa.cc.xsys.bg.BgJob.run(BgJob.java:264)
at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.scheduleJob(AnalysisDaemonBgJob.java:240)
at com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob.start(AnalysisDaemonBgJob.java:80)
at com.virsa.cc.comp.BgJobInvokerView.wdDoModifyView(BgJobInvokerView.java:436)
at com.virsa.cc.comp.wdp.InternalBgJobInvokerView.wdDoModifyView(InternalBgJobInvokerView.java:1225)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java:78)
at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java:337)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doModifyView(ClientComponent.java:481)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doModifyView(WindowPhaseModel.java:551)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:148)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:319)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.BgJob setStatus
INFO: Job ID: 13 Status: Error
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.BgJob updateJobHistory
FINEST: --- @@@@@@@@@@@ Updating the Job History -
2@@Msg is Error while executing the Job:Cannot assign an empty string to host variable 2.
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.bg.dao.BgJobHistoryDAO insert
INFO: -
Background Job History: job id=13, status=2, message=Error while executing the Job:Cannot assign an empty string to host variable 2.
Jan 13, 2009 12:34:27 AM com.virsa.cc.xsys.riskanalysis.AnalysisDaemonBgJob scheduleJob
INFO: -
Complted Job =>13----
Please let us know how to resolve this error
Thanks and Best Regards,
Srihari.K -
Error in Schedule Background Job for Deadline Monitoring of swu3
While Auto Customization swu3 i am getting error message 'Output device "" not known' in 'Schedule Background Job for Deadline Monitoring'
Please advice what could be cause of itthe earlier problem of background job was solved by changing the output device assigned to user wf-batch .
regarding the transport request :
when i was trying to execute the step : "Schedule bakgrd for missed deadlines " MANUEL it was giving me an option of SAVE AND SCHEDULE . which was creating the transport request . but when i executed it automatically it worked fine without asking a request to me ... i don't know why )-: ... probablly we can specify a different interval then the standard of three minutes and which will be transported (it's just a guess) . i have executed it automatically ...
well thanks all for u r help -
Write the Error log from background Job to the Spool request
Hi ,
I have a situation where in i need to capture the error log of a Z program which runs as a background job and write that log into the spool request. My Z program calls runs RSEINB00 program using the SUBMIT statement. When this Job fails the error log can be seen in SM37. But i need this error log to be sent in to a spool.
I can read the error log using the BP_JOBLOG_READ FM and can also create a spool using the RSPO_SPOOL_OPEN FM.
The problem is, when the Submit statement executes, due to internal valdation in the RSEINB00 program the program terminates. Due to this it is not able to perform the SY-SUBRC Check and thus doesn't read the log.
Can anybody suggest me how to overcome this problem. I am attaching the code for your refernece.
SUBMIT RSEINB00
USING SELECTION-SET 'TEST2'
TO SAP-SPOOL
LIST NAME 'LOCL'
IMMEDIATELY space
KEEP IN SPOOL 'X'
AND RETURN.
<b>If sy-subrc <> 0.</b>
CALL FUNCTION 'BP_JOBLOG_READ'
EXPORTING
CLIENT = SY-MANDT
JOBCOUNT = i_tbtco-jobcount
JOBLOG = i_tbtco-joblog
JOBNAME = i_tbtco-jobname
TABLES
JOBLOGTBL = l_joblog
IF SY-SUBRC <> 0.
else.
message i002 with l_joblog-msgv1.
ENDIF.
<b>
ENDIF.</b>
Rgds,
Kewal
P.S. : any other approach to solve this problem will be appreciated too and the points will be rewarded suitably.If I select a job in SM37 and I click on "spool" I get a list with separate spool entries for each of the steps, e. g.
Programmname/Kommand Programmtyp Spoolliste
Z_MM_STAT_UPDATE_WERK ABAP 1707445
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_WERK ABAP 1707459
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_MARA ABAP 1721423
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_WERK ABAP 1721437
Z_MM_STAT_UPDATE_MARA ABAP 1721446
Z_MM_STAT_UPDATE_WERK ABAP 1721447
Z_MM_STAT_UPDATE_VKORG ABAP 1721471
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_VKORG ABAP 1721521
ZSLEEP Ext. Kommando
Z_MM_STAT_UPDATE_VKORG ABAP 1721816
It's in German but I'm sure you get the idea. For each Z_MM_STAT_UPDATE and variant I have a separate spool list that I can display.
Markus -
Error messege in Background Job(SM37) - Please enter a valid date
Hi all,
background job which is scheduled in sm37 is giving error for dated 01.01.2009 to 30.01.2009.
But before 31.12.2008 it was working fine
error messege-
This is happening in Production and developement client.
While running the report it showing the error messege- Please enter a valid date
One function module is used in the report for geting fiscal year from date.
it is showing the following error messege for perticular date range- 01.01.2009 to 30.01.2009.
GM_GET_FISCAL_YEAR
Error
Fiscal year variant V3 not defined or maintained for date 01.01.2009
Thanks
SusantaHi,Because this datein the past
-
What is the best solution to trigger background jobs within user exits?
Currently the method I am using is quite cumbersome.
1. Create user event in SM62
2. Create background job attached to this user event.
3. Within user exit call function module BP_EVENT_RAISE using user event.
The problem I have with this approach is that in the program I have to add a 15 - 20 sec delay to handle record locking. Lets say I am in a user exit in MM02, triggering this event without the delay can lead to no records been processed.
What are other ways of implementing this solution?
Can I do a SUBMIT report VIA JOB
or CALL FUNCTION IN UPDATE TASK.Try this way also.
In the userexit update a custom table with document number + flag (pending for process)
Create standalone program that to be scheduled like every 5 minutes (as you like ) search for this table and get all open documents (with flag eq space ) and process one by one.( Calling jobs)
This will reduced number of repetative background jobs
Say User A edit document 100 at 10.00 am and saves at 10.01 am and user B edit document 100 at 10.02 am and save it
10.03 am ( so every save if you trigger a backgound job, unncessary create jobs for same document number 10 )
a® -
Triggering background job event from Unix script
Hi all,
I am having one question regarding triggering of background job in SAP using Events from Unix script. Is this possible? If so, can anyboy provide some sample code related to Unix script and how do we communicate to SAP from Unix system. Actually, here the backend of R/3 system is MSSQL. I am having a program in R/3 system which is scheduled as a background job based upon event trigger. I want to trigger that even from the unix script.
Appreciate for your help in advance.
Thanks,
Adithya KHi,
Check if this can help you
http://help.sap.com/saphelp_sm32/helpdata/en/fa/096e6b543b11d1898e0000e8322d00/content.htm
Regards,
Atish -
Error in active background jobs
Hi All,
i facing problem while cosing the job
i have written the code
IF NOT p_imm IS INITIAL.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = l_f_jobcount
jobname = l_f_jobname
strtimmed = l_flg_start_sofort
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
COMMIT WORK .
and it is not showing any error and it should finished the job in sm37 but i am always getting the ststus active rather than finished.
please suggest what could be the reason
Thanks,
Madhuhi all,
please help me on this..
when there is no data then background job finish the job and in the job log it shows thst no valid data for selection. but if there si any data ... the job status stil active and it never get finished.... and finaly it get cancelled.
even while dubugging it never shows sy-subrc value other than 0. even when i run the background job manually for the submit sdt program it finish the job. I don't understand the reason why it is in active stage while executing id dialog.
Please mention if there is any parameter value missing ..
my code as follows..
do n times. "n muber of jobs
Start Immediately
IF NOT p_imm IS INITIAL.
l_flg_start_sofort = 'X'.
(1)Open the job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = l_f_jobname
IMPORTING
jobcount = l_f_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE e032(sxmsf) WITH l_f_jobname.
ENDIF.
(2)Report start under job name
SUBMIT (g_c_prog_c1_lo)
WITH s_partn IN r_partn
WITH s_parro IN s_parro
WITH s_grvsy IN s_grvsy
WITH s_lgreg IN s_lgreg
WITH p_updab = p_updab
WITH p_updbi = p_updbi
WITH p_enqal = p_enqal
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
VIA JOB l_f_jobname NUMBER l_f_jobcount AND RETURN.
*(3)Job closed when starts Immediately
IF NOT p_imm IS INITIAL.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = l_f_jobcount
jobname = l_f_jobname
strtimmed = l_flg_start_sofort
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
COMMIT WORK .
ADD 1 TO g_cnt_job.
l_r_tbtcjob-jobcount = l_f_jobcount.
l_r_tbtcjob-jobname = l_f_jobname.
l_r_tbtcjob_previous = l_r_tbtcjob.
IF NOT l_flg_first_job IS INITIAL.
g_v_tbtcjob_first = l_r_tbtcjob.
ENDIF.
CLEAR: l_flg_first_job.
ENDDO.
thanks -
Error handling in background jobs
Dear All,
I have a program to update certain tables which I schedule as a background job.
I need to find a way to handle errors and communicate the update status to the administrator/ job monitor.
Some of the methods I can think of are:
1. Use write statements in the program to write the status. Admin/ Job monitor can look up the job spool in SM37 and get the status.
2. Store the status against each updated table in a custom table. Admin / Job monitor can check thru SE16.
Is there any other way to communicate the job status.
Thanks and Regards,I used the option :
Use write statements in the program to write the status. Admin/ Job monitor can look up the job spool in SM37 and get the status. The same has been implemented in production by now.
Cheers.
Ashwin -
ORA-20000 error when executing background jobs in BI System
Hello Experts,
We newly installed NW2004s System. Few BI related background jobs are showing Error no: 4 or Error no: 3 in SM50. Also few BI related background jobs are giving error "ORA-20000 occurred when executing SQL statement (parse error offset=0)". Please let me know what does Error 4 or 3 mean in SM50 and how to resolve Ora-20000 error?
ThanksThis may be to do with insufficient authorization for the user (for creating statistics for example). Check OSS note 963760.
-
Error occured in background job......
Hi,
SUDDENLY ALL THE BACK GROUND JOBS STATUS ARE SHOWING CANCELLED. WHAT CAN BE REASONS?
ashutoshsir,
Actually what happend, all background job automatic showing their status been canceld due to unknow problem.
what's should be the reasons?
ASHUTOSH -
Print error scheduling a background job
HI
I am using
Transaction F110 Automatic Payment.
When I am scheduling job for printing in background,I am getting error
The error <Status Text in spool > states front end unavailable.
Any inputs asap plsYou are getting the error because, the printer selected to print the output trying to use front end default printer. You might have selected LOCL as the printer. Chage the printer.
Regards
Sridhar -
Error in TLB background job"Version does not exist"
Hi Gurus,
We are getting error of "Version does not exist " in TLB background run..The T-lane is between 2 DCs .we have checked everything but unfortunately
we are not able to detect the root cause for the error.
Your help will be appreciated.
Thanks in advance
SuyashHi Suyash,
I hope than your planning version is active!
I also suppose than you have maintained mean of transport and products at Tr.Lanes level.
I think that you have some master data inconsistency in the version.
Please run the reports; /SAPAPO/OM17, /SAPAPO/TSCONS, /SAPAPO/TSLCREORGSNP
You can also run Model Consistency check (t.code /SAPAPO/CONSCHK). First you have to define the Model (t.code /SAPAPO/SCC07) and the Profile (t.code /SAPAPO/CONSPRF).
Thanks, Marius -
Create background job triggered by another job
Hi experts,
I want to run FCHU in background everytime I finished run F110.
I'm thinking to use background job creation SM36 - triggered by job. But the problem is, job created from F110 the job name is not fixed.
Please anyone can give better idea ??
Thanks,
MelissaHi melissa,
The suggestion given by Prem is perfectly Ok.
I would suggest you to create an event by sm62 and then create an event triggered background job which will run the FCHU in Back ground.
So you need to get an enhancement point in F110 and put the code of triggering the event .
If there is no enhancement then you can create a program which will call the Transaction F110 by using CALL TRANSACTION statement and after F110 processing the control will get back to your program and you can write a code for triggering the event by using the FM SWE_EVENT_CREATE.
I hope this will help you
Maybe you are looking for
-
Getting an "unknown publisher" error when downloading itunes
I am trying to download the latest version of Itunes. I keep getting an "Unknown Publisher" message from Internet Explorer. I went through the troubleshooting and removed all apple apps. Now I am stuck. Any ideas?
-
Hello Friends, I have created a simple approval workflow with 2 stages for a document library. User A will approve and then the approval has to go to User B User A is receiving a mail and editing the document and saving it. User A then goes to his ma
-
Adding a Timer (Automatic Transition)
Hello I'm new to this forum so I hope someone may be able to help me. I'm trying to add an automatic transition to this Image Gallery that uses and XML data file. I have everything the way I like it, but now I need to have the images and the dynamic
-
Saving Pages, Keynote and Numbers files so they're compatible to open on PC
How do I save files from pages, keynote and numbers so I can open them on a PC?
-
Installation completed though some option components failed to install correctly
When I went to Install Premiere Pro from the Creative cloud I got a message saying "Installation failed Installation completed though some optional components failed to install correctly. (6)" There's a "More information" button that linked me to thi