Cannot start up background job in WOrkflow
Dear Sir,
I have the workflow in CRM and there is some trigger to run background job. but not the background job in the workflow is not run. How to start the trigger?
Please kindly advis.e
Thanks and best regards,
VImol
Hi
can you send the stack trace after "Caused By" part of exception.
Similar Messages
-
I cannot cancel a background job
Hello,
I cannot cancel a background job which is running since the last Friday. I use the SM37 transacction but it doesn't stop.
Can anybody tell me how can I get to stop this job?
Thanks in advance.
Regards.Hello friend,
I think these links will help you to stop the job running in back ground,
How to stop Active Background Jobs
http://stackoverflow.com/questions/1439033/sap-background-job-hows-it-running
If your problem still exists revert back to me i will help you.
Thanks,
Sri Hari -
Hi all,
I have a requirement in which i need to run a job only after 5th of everymonth to untill end of month in one hour gap.
So it should be like that,job start from
Nov---5th to nov 30th then
Dec---5th to Dex31th.How can i acheive this?I cannot modify the program since it is a standard program?
Apart from creating the customized program and call the standard program from there...i would like to have some other
solution than this since there are variants in the standard program.
Rgards,
Arun.Hi Arun ,
You can use Background Processing Event.
An event is a signal stating that a predefined status in the system has
been reached. The background processing system receives events and then
starts the background job/jobs that is/are linked to an event.
So in the "After Events" tab in SM36 you specify a perticular event which will be triggered on 5th of every month and you will schedule your job after that with periodicy as "every hour"
Hope this will help to you .
Regards,
Nikhil -
User started a background job 1hr before offline backup started. Now background job in SM37 shows status as active BUT when I tried to cancel job, popup message said "Job is not Active - cancellation not possible!". So next, I decided to delete job, message said "job is active. The selected function cannot be performed". In SM50, I cannot find any BGD process being used.
So, user has started new job today and that job is for sure running because it is using process type BGD.
How to I get rid of the 1st job??
Thanks;
Hudahi,
I think you already cancelled the job in SM37 and tries to cancel it mulitple times thats y it is showing job is not active.
Ok regarding the SM50, if you are not seeing any background job in SM50 that means job got cancelled already don't worry about it. It will not get updated so quickly in SM37 but I am sure that it got cancelled.
go to SM51 and check there also is there any sessions with you user id? -
Problems creating background job for program (job open, submit and close)
Hi gurus,
im trying to start a background job using the FM BP_START_DATE_EDITOR to show the start date to the job or if it's imediate. this FM it's working fine, after call it im opening a job, submiting it and call the job close FM and the job close FM creates me the job.
The problem it's when i go to the sm37 to see the job status the job has been canceled, and the job log says that i have to give a start date to the job.
What i dont understand it's either the job is imediate or i choose a date to start the job always gives me this error...
Below goes my code,
any ideas will be rewarded
CLEAR: stdt_modify_type, stdt_output.
CALL FUNCTION 'BP_START_DATE_EDITOR'
EXPORTING
stdt_dialog = 'Y'
stdt_input = stdt_input
stdt_opcode = 14
IMPORTING
stdt_modify_type = stdt_modify_type
stdt_output = stdt_output
EXCEPTIONS
fcal_id_not_defined = 1
incomplete_last_startdate = 2
incomplete_startdate = 3
invalid_dialog_type = 4
invalid_eventid = 5
invalid_opcode = 6
invalid_opmode_name = 7
invalid_periodbehaviour = 8
invalid_predecessor_jobname = 9
last_startdate_in_the_past = 10
no_period_data_given = 11
no_startdate_given = 12
period_and_predjob_no_way = 13
period_too_small_for_limit = 14
predecessor_jobname_not_unique = 15
startdate_interval_too_large = 16
startdate_in_the_past = 17
startdate_is_a_holiday = 18
startdate_out_of_fcal_range = 19
stdt_before_holiday_in_past = 20
unknown_fcal_error_occured = 21
no_workday_nr_given = 22
invalid_workday_countdir = 23
invalid_workday_nr = 24
notbefore_stdt_missing = 25
workday_starttime_missing = 26
no_eventid_given = 27
OTHERS = 28.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
MOVE 'X' TO gv_flag.
ENDIF.
DATA jobname LIKE tbtcjob-jobname.
DATA jobcount LIKE tbtcjob-jobcount.
DATA job_release LIKE btch0000-char1.
DATA job_imediate TYPE c.
CLEAR: jobname, jobcount, job_release.
CONCATENATE 'MAPAEXEC' sy-uname sy-datum
INTO jobname SEPARATED BY space.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = jobname
IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE i003(zmapas).
EXIT.
ENDIF.
SUBMIT z_mapa_execucao_orcamental
VIA JOB jobname NUMBER jobcount
WITH ano EQ ano
WITH so_perio IN so_perio
WITH so_date IN so_date
WITH so_org EQ so_org
WITH so_num IN so_num
AND RETURN.
IF stdt_output-startdttyp EQ 'I'.
CLEAR job_imediate.
job_imediate = 'X'.
ENDIF.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
calendar_id = stdt_output-calendarid
event_id = stdt_output-eventid
event_param = stdt_output-eventparm
event_periodic = stdt_output-periodic "?
jobcount = jobcount
jobname = jobname
laststrtdt = stdt_output-laststrtdt
laststrttm = stdt_output-laststrttm
prddays = stdt_output-prddays "??
prdhours = stdt_output-prdhours "?
prdmins = stdt_output-prdmins "??
prdmonths = stdt_output-prdmonths
prdweeks = stdt_output-prdweeks "?
predjob_checkstat = stdt_output-checkstat
pred_jobcount = stdt_output-predjobcnt
pred_jobname = stdt_output-predjob
sdlstrtdt = stdt_output-sdlstrtdt
sdlstrttm = stdt_output-sdlstrttm
strtimmed = job_imediate
targetsystem = stdt_output-instname
start_on_workday_not_before = stdt_output-notbefore
start_on_workday_nr = stdt_output-wdayno
workday_count_direction = stdt_output-wdaycdir
IMPORTING
job_was_released = job_release
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.
IF sy-subrc <> 0.
MESSAGE i003(zmapas).
EXIT.
ELSE.
MESSAGE i004(zmapas) WITH jobname.
ENDIF.
Thanks in advance,
Best Regards
João MartinsHello João.
In debug mode, check the value of variables you passed to parameters sdlstrtdt and sdlstrttm.
As aditional info, I usually achieve your goal without FM BP_START_DATE_EDITOR.
Check this code:
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = w_jobname
IMPORTING
jobcount = w_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
CHECK sy-subrc = 0.
CLEAR seltab_wa.
MOVE: t_jobs-param TO seltab_wa-selname,
t_processar-line+34 TO seltab_wa-low.
APPEND seltab_wa TO seltab.
seltab_wa-selname = 'P_LOJA'.
seltab_wa-low = t_processar-ficheiro+7(4).
APPEND seltab_wa TO seltab.
*** Submete o programa para o JOB
SUBMIT (t_jobs-repid)
WITH SELECTION-TABLE seltab
USER sy-uname
VIA JOB w_jobname NUMBER w_jobcount
AND RETURN.
*** Encerra o JOB
l_hora = sy-uzeit.
ADD 60 TO l_hora.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = w_jobcount
jobname = w_jobname
sdlstrtdt = sy-datum
sdlstrttm = l_hora
targetserver = w_servidor
IMPORTING
job_was_released = l_liberado
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.
Regards.
Valter Oliveira. -
Scheduling a background job using Job_Submit and Job_Close FM
Hi Guys,
I am calling a report in background using Job_Submit and Job_Close FM's.
I am not providing start time and date in the Job_close FM, in this case, when the job will be scheduled to start.
Even after an hour, job status is still scheduled.
I am not exporting variant, since I am using memory ID.
Thanks
Edited by: sapgeek007 on May 11, 2009 4:11 AMIn Job_close fm use the parameter 'STRTIMMED'
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = LV_NUMBER
jobname = LV_NAME
STRTIMMED = 'X'
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
INVALID_TARGET = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
That would start the background job immediately.
Regards,
Deepak -
Schedule Background job using transaction CATM
Hi all,
Since we cannot schedule a background job using transaction CATM, I have created a program calling the CATM transaction through batch-input.
I have done a recording and entered the coding in a Z-program. For a vendor, I have recorded time in CAT2 for multiple purchase orders.
After entering the vendor number in CATM, all the purchase orders showed up. I have clicked 'select all' and posted.
When I run the program in the background, it posts only for one purchase order.
When I run the program in the foreground, using the Select All-button it only proceeds with the first line in my list of PO's.
How to read the whole stack and post the whole stack of purchase orders?
Please help me out with this.
Thanks
Regards
Srinivasan Desingh
408 368 3837Hi,
When I run the program in the background, it posts only for one purchase order.
When I run the program in the foreground, using the Select All-button it only proceeds with the first line in my list of PO's.
See..it's a Z-program so Its difficult to answer without checking the program. But I think, you should check your BDC again from Debugging, with the help of your abaper. You will find, why its is processing only one entry.
Regards
Shishir -
Hi All,
We need to schedule a Job in background in every 30 min or 1 hr, which will monitor all the other Jobs running in background.
If any job is running more than 30000 sec, it should trigger an email.
Please guide me how to achieve this( i'm ABAPer).
Regards
VEnk@see the following t.code may be it will use
SWWCLEAR_INSERT
Workflow: Background Job 'SWWCLEAR';
Workflow: Hintergrundjob 'SWWCLEAR';
Workflow : job arr.-plan 'SWWCLEAR';
Workflow: achtergrondjob 'SWWCLEAR'
Workflow: Background Job 'SWWCLEAR'
SWWCOND_INSERT
Workflow: Background Job 'SWWCOND';
Workflow: Batchjob 'SWWCOND';
Workflow : job batch 'SWWCOND';
Workflow: achtergrondjob 'SWWCOND'
Workflow: Background Job 'SWWCOND'
SWWD
Maintain Work Item Error Monitoring;
Workitem-Fehlerüberwachung pflegen;
Gérer surveillance erreurs WI;
Workitem-foutbewaking verzorgen
Maintain Work Item Error Monitoring
Edited by: Krupaji on Feb 17, 2010 12:45 PM -
How we can done background job in web dynpro abap
Hi expert,
my requriment is how i can set background job in web dynpro .
regard's
vikashThe same way you do it in normal ABAP. There is nothing Web Dynpro ABAP specific about starting a background job.
There are API Function modules that begin with the name JOB_*. Have a look at the online help for samples:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d40543b11d1898e0000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d4d543b11d1898e0000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d67543b11d1898e0000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d74543b11d1898e0000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096d8e543b11d1898e0000e8322d00/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/fa/096ce5543b11d1898e0000e8322d00/frameset.htm -
Different Subroutines in Background jobs and Dialog jobs
Hi guys,
I want to execute some subroutines when the program is running using a background job , and some other subroutines completely different when the user use dialog job ( program -> execute in background ) . I know that sy-batch = 'X' in both cases , but, there is something else to identify them ? , any ideas .
thank you .It will be - he meant that they start the background job from SE38/SA38 not run it online.
SY-SLSET is a starter point for checking the variant used - dynamic variants are used when you don't pick one from the list. However, this would not help if the user picked a variant and then scheduled the job dynamically. Another option is to use function GET_JOB_RUNTIME_INFO in your program. Assuming your scheduled jobs are named differently, you can check for the condition by checking the name of the running job. Dynamically created jobs will have the program name as the job name. -
Background job SWFSLSDLEX cannot be scheduled (error )"
Hi All ,
i got the following error ,
when i try to customize the SWU3 " Schedule background job for dead line monitoring ".
The error is :
"Work item -: Background job SWFSLSDLEX cannot be scheduled (error )"
And the Error log says :
Refer to your workflow system administrator.
The specified error number should indicate possible reasons for the error. It is possible that the system is in an inconsistent state. The scheduled start of the specified background job must be compared with the minimum date/time of all work items in table SWWDHMIN. It may be necessary to delete the scheduled background job by hand and reschedule it by calling report RSWWDHEX.
Apparently i dont see any table SWWDHMIN.
Thanks!
Richard AThe issue is solved by adding start profile and instance profile to operation modes.
Many thanks to my BASIS Guys for solving it !
Richard A -
Start background Job when another is finished (NOT with the JobSteps)
Hi guys,
i need your help.
I've already searched here in forum, but i wasn't able to find a good solution.
I have this problem.
I have a program that create a background job with the FM FM JOB_OPEN.. SUBMIT report with parameters .. JOB_CLOSE.
I want that if i run this report again (20 secs after for example) it does:
- Check if there is an already running Job with the same name (means with state 'R') (This task is simply, with a select on TBTO table)
- If it's found, it have to create a new job with the same name that starts automatically AFTER the first running job is finished (don't care about the end-state of the first job).
I've already tried with pred_jobcount & PRED_JOBNAME parameters of the JOB_CLOSE FM but it doesen't works!
The JOB_CLOSE, creates a job in Planned state. But when the first Job is finished, the second job(Planned) doesen't start automatically.
In this scenario, i CANNOT use endless loops (wait until the first job is finished and then submit the second) Job-steps (one job that contains multiple steps) events (i have to start only one job after the predecessor is finished), because this report could be run many times and each job should be collected like a "stack" (only when the first job is finshed the second "registered" should be started and so on, until the aren't more planned jobs).
<REMOVED BY MODERATOR>
Thx a lot for your help.
Andrea
Edited by: Alvaro Tejada Galindo on Jun 12, 2008 12:19 PMHi Veda
i can tell u but ... some reward points are very appreciated ....
I'm joking (of course)
Here the question:
I have a program (called A) that submit a new program (called B) with the JOB_OPEN .. submit JOB_CLOSE. The program B should start only if another program B (called before for example) is finished.
Here the solution.
I add a parameter (with no-display clausole) to the program B. In this parameter i pass to the program, the job number returned by the JOB_OPEN function.
When i create the JOB with the function, the "jobname" parameter is set with value 'G_DELIVERY' (Here u can change the name of the job as u want : this is the jobname that u see in SM37 transaction).
In the start-of-selection of program B i put a "waiting" procedure like this :
First i save a timestamp of system-date and system-time (called for example r_date and r_time)
select from table TBTCO all the jobs called "G_DELIVERY" with jobnumber <> from the jobnumber parameter (that means exclude itselfs) with status running ('R') -> that have startdate /starttime less than the r_date and r_time <- (this is the key of the selection that solve the problem).
if it is found (means there is another running job started before this one).
wait up to 60 seconds. "for example
repeat the selection.
endif.
When the job called before ends, this one programs exits from the loop and continues. If u submit more programs "B", they'll works like a stack.
I should say to u just one thing.... I solved my problem in another way (because i've changed the logic so this problem was no more) so i didn't implemented that logic, but it should works very good.
Try it and tell me!
Bye
Andrea -
Trigger Workflow for Background Job Abort
Hi,
I want to start a workflow when a Background Job fails.
I could find the BOs BPJOB & BPJOB_SMAN and the event BPJobSchedMan.Aborted, but it is not getting triggered when a background job cancelled.
Let me know if any specific settings need to be made.
Appreciate your help. Thanks in advance.
Rgds,
KumarHi,
Did you manage to get this working? i am also using BPJOB abort even but its not getting triggered.
Thanks.
Rgds,
Pankaj -
Background job in APO does not start because of invalid user name
Hello,
I have a macro in a planning book and the /sapapo/cons_check program which a triggered via a background job. Now, I have problems with the start of the job:
At the time the job was created inside SAP, an error occured. The job contains invalid values.
The user name within the job does not exist any more.
Now, I try to change the user name of the job (via step in sm37), but the error occured again.
I have the possibility to create the invalid user name once again in su01.
But I want to change the user name of the job - does somebody know how to do it?
Thanks for your help!
Kind regards
HeinzHello Heinz, this looks surprising.
It's quite easy to change the user name in the SM37 job step, and we haven't faced issues with this.
Could you check how many jobs are in either "scheduled" or in "released" status, and change steps for all of them? May be you changed the scheduled job, but the released job wasn't changed.
Use your job name and give a search date as 1-2 years in the past, and around 1 month in the future. With this time horizon, you should most likely be able to capture all the relevant jobs having the same name that you are using.
Now change the user name in step for all the jobs received above to be fully sure.
One more trial could be to copy the current scheduled job to another job, modify the user name in this newly created job and then delete the old one.
One of the above trials might possibly help you in some way, else its very tough to understand/explain your situation.
Thanks - Pawan -
Starting Background Job from program...
Hello I am using following to create a background job.
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'METZ: INVOICING FROM SHIPMENT',
print_parameters TYPE pri_params.
data vari LIKE varid-variant.
data shipm LIKE vttk-tknum.
data use LIKE btch2170-username.
vari = '3350_1' .
shipm = p_shipment.
use = 'K5_BATCH'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT Z5L_START_INVOICING with p_shipm = shipm
with p_vari = vari
with p_submit = 'X'
USER use VIA JOB name NUMBER number
and return.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = name
strtimmed = 'X'
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.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF.
I am using the addition USER but the job gets started with user who is log on or who is using this trasaction.
It should start with user 'K5_BATCH' but it is not...........
Please help........
Edited by: Alvaro Tejada Galindo on Apr 7, 2008 1:00 PMI found the following info:
Open Job Scheduling Without Dialog (Including COMMIT WORK)
Use JOB_OPEN to create a background job. The function module returns the unique ID number which, together with the job name, is required for identifying the job.
Once you have "opened" a job, you can add job steps to it with JOB_SUBMIT and submit the job for processing with JOB_CLOSE.
I think you will first have to use the JOB_SUBMIT statement like mentioned above
Maybe you are looking for
-
How to use Property nodes?
Hi everyone, I am a beginner of LabVIEW. So I want to know about Property Node in detail. Please Please someone help me know the function of each property node...... Thank You in Advance, Solved! Go to Solution.
-
Passing Parameter to Function - ORA-00904
Hi - I wonder if anyone can help with this problem please? I have developed a function, which works fine, returning a collection as a table. It takes a single parameter, the numeric userid. I've put a report on the page, and hardcoded the userid duri
-
HT204074 Can't find "manage devices" in itunes...
I want to remove a device from itunes. Apple says: Removing an associated device or computer from an Apple ID To remove a device or computer from your Apple ID: Open iTunes. Sign in to your Apple ID by choosing Store > Sign In from the iTunes menu. C
-
I have a 4 month old T400 2764-CTO with led backlit. sometime when I start up T400 or come back from sleep mode, the backlit won't just turn on itself. I can see what it shows on the LCD somehow if the environment is not too bright. Only if I log in
-
Automate save as reader extended pdf for commenting
Does anyone know a way to create an applet or droplet that will save a PDF as a reader-extended PDF for commenting? I make lots of individual PDFs and each time I have to open the PDF and save as reader extended etc. Sometimes I forget. Can this be d