01-12-2013 10:50 AM
Hi ,
I have created background job from program using JOB OPEN , SUBMIT REPORT , JOB CLOSE .
I can find my job in SM37 with 0 Duration & in debugging after job creation in submit report event
report is not submitted that's why required job does not run in background.
pls post the suitable solution...
01-15-2013 3:17 PM
Regards,
Raymond
01-12-2013 5:47 PM
I can find my job in SM37 with 0 Duration
Regards,
Raymond
01-14-2013 4:50 AM
Job is being scheduled but not executed , means sumbit report with job name and job number not triggered ......
01-14-2013 6:48 AM
Post your code for JOB_CLOSE, if you don't use start immediately, a schedule date/time or an event, the job will stay scheduled. Look at the code sample of help.sap.com at Scheduling a Job: Full-Control Method.
Regards,
Raymond
01-14-2013 9:41 AM
Thanks for your reference , but I have done following coding , but cannot submit the report for execution in background and from SM37 find my job but status became canceled....
pls help..
V_JOBNAME = 'E-recharge'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = V_JOBNAME
SDLSTRTDT = SY-DATUM
SDLSTRTTM = SY-UZEIT
IMPORTING
JOBCOUNT = V_JOBCOUNT
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
SUBMIT ZERECHARGE_CREDIT_ACCOUNTING_B
VIA JOB V_JOBNAME NUMBER V_JOBCOUNT and RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = V_jobcount
jobname = V_jobname
strtimmed = 'X'.
01-14-2013 1:24 PM
Regards,
Raymond
01-15-2013 7:11 AM
Thaks for your valuable reply ,
now job is being scheduled and status is finished with zero duration but report not submitted as i checked in debug mode. These are the following requirements for report submission..
1>when we submit report via job name and number
I need to pass select-option & parameter value to calling report and there are the same selection field as called program has.how to pass that for background processing .
2> does the selection screen of of calling program can be suppress with no-display option for BACKGROUND procesing ?
01-15-2013 7:21 AM
If the submitted report has the same parameter than its caller, you can try
Regards,
Raymond
01-15-2013 7:24 AM
Hi Samrat,
If there are any obligatory parameters on the selection screen of the report being submitted, then it is required to pass the values for those parameters. You can pass parameters while using SUBMIT statement. Please go through the syntax of SUBMIT statement, you will be able to find the answer. Also if you want to achieve the same using JOB_OPEN, JOB_SUBMIT and JOB_CLOSE function modules, then there is an option available to pass variant in the function module JOB_SUBMIT, it will be helpful. Thank you.
Regards,
Kartik
01-15-2013 10:31 AM
Hi Raymond,
Now I can pass the data by Export/Import into calling program but in job status is cancelled with following logs
Job started
Step 001 started (program ZERECHARGE_CREDIT_ACCOUNTING_B, variant &0000000000056, user name 20046
No records found as per selection criteria
"LEAVE TO TRANSACTION" is not allowed in a background job
Job cancelled.
I also check the parameter passing and changes select options into ranges in calling program but still this happend......pls help
01-15-2013 10:36 AM
Hi kartik ,
I created one itab with all selection criteria and EXPORT that before submit and in calling program IMPORT that in start-of-selection event and changes all select options into RANGES and value in being mapped properly ...but still job status is cancelled.
01-16-2013 5:40 AM
Hi raymond ,
I have already created selection table but if I submit report with selection table how does that submitted report find that selection values in backgroung processing ?
01-16-2013 6:51 AM
To check if you have correctly passed the parameters, execute SE38 or SA38, execution with variant and give the temporary variant of the background job in the first screen, not when selection-screen is displayed, I never suggested a export/import statement to pass parameter to a background job...
Regards,
Raymond
01-15-2013 3:17 PM
Regards,
Raymond
01-16-2013 5:34 AM
Hi Raymond ,
I have been using EXPORT/IMPORT TO/FROM database index not SHARED MEMORY still the result is same...
Regards ,
SAMRAT
01-17-2013 6:26 AM
Hi raymond ,
Thanks for your valuable referenced .
Problem is solved finally. I export selection table to database index and import it from submitted report in background and working fine. There was some function issue that Vendor was not mapped with company code .....
Regards ,
Samrat