on 12-20-2012 1:10 AM
HI experts,
I am having trouble with my background jobs some of them take 43,000secs then they cancel. I checked sm21 there seems to be a job failing authorization check. Can this cause the delay of all the background jobs? and upon further checking a job being run by a user WF-BATCH has the longest time. I am wondering is this the job that causes the bottleneck. Any response would be much appreciated.
Don Ariola
check in Development client and Download Excel Sheet
Process how to Download
1) Go to Sm 21
2) Execute the Code
3)click on System logs right side on top Scree
Thanks In Advance .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello
WF-BATCH is system user used for workflow purposes.
This user is created when you configure Work Flow - Tx SWU3
If a particular job is running for 43000 seconds and gets cancelled, I will check the job log and also the relevant work process trace file.
What does the job log and trace file say the reason for the cancellation ?
I am not sure whether the job can run that long and fail due to authorisation issue.
The WF-BATCH user can also use Dialog work processes in case of RFC calls.
So when the jb is being executed I suggest you to closely monitor the work processes from Tx SM50
You can also check the tables being called by the program and check the statistics are up to date and also whether the right indexes are being used by the database during the execution.
Cheers
RB
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rosendo !!!
U can use this code it’s help full I hope
*****************************************************************
DATA : new_jobname TYPE tbtcp-jobname ,
jobcount TYPE tbtcjob-jobcount,
print_parameters TYPE pri_params,
user_name TYPE sy-uname,
default_language TYPE sy-langu,
rc(4) TYPE c,
info_msg(125) TYPE c,
l_variant TYPE raldb-variant VALUE 'SAP&CONNECTINT'.
new_jobname = 'SENDMAIL'.
print_parameters-pdest = sy-pdest.
print_parameters-primm = sy-primm.
print_parameters-prnew = sy-prnew.
WAIT UP TO 1 SECONDS.
user_name = sy-uname.
default_language = sy-langu.
*-- CREATE THE JOB
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = new_jobname
IMPORTING
jobcount = jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = sy-uname
jobcount = jobcount
jobname = new_jobname
language = default_language
priparams = print_parameters
report = 'RSCONN01'
variant = l_variant
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10.
IF sy-subrc EQ 4.
MESSAGE s000(38) WITH 'User cancelled the action'.
ELSEIF sy-subrc <> 0.
MOVE sy-subrc TO rc.
CONCATENATE 'Job Submit Failed. sy-subrc:' rc INTO info_msg
SEPARATED BY space.
MESSAGE w208(00) WITH info_msg.
ELSE.
MESSAGE 'Background Job Scheduled Successfully' TYPE 'I'.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jobcount
jobname = new_jobname
strtimmed = 'X'
* targetserver = 'ctecpci_ECP_02'
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 ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
LEAVE PROGRAM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.