Hi Experts,
I am trying to schedule a report B via BG job from report A using SUBMIT AND RETURN along with using FM JOB_OPEN and JOB_CLOSE. The program runs fine in foreground, but when we try to schedule report B as BG job from program A, it is not getting executed. i have debugged and found that the program is not going to START-OF-SELECTION but validating selection screen events.
My submit statement looks like below:
SUBMIT REPORT2 WITH paramters_in_B = parameters_in_A
WITH selectoptions_in_B IN selectoptions_in_B
USER 'XXXX'
VIA JOB 'JOBNAME'
NUMBER 'XXXX' AND RETURN
Request clarification before answering.
Yes, at the time of the SUBMIT (my remark is about before JOB_CLOSE is executed, i.e. not during the background job, although it's executed at that moment too), it always go through the selection-screen validation : if there's an error and the submission runs in dialog mode, then the SUBMIT VIA JOB displays the selection screen along with the error message (yes, during the job submission). Anyway, your question is more about the job NOT being launched.
BUT did you check the return codes of JOB_OPEN, SUBMIT and CLOSE, and is the job really NOT scheduled in SM37 -> don't forget to also display the jobs with a missing start condition, i.e. planned/preliminary status)?
If everything is fine, then check the SAP notes, and if you find nothing then open a ticket at SAP support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In fact, the füll behavior is explained here:
Especially, see step 1 ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jyothir,
Also implement the below code in your submit statement regarding SAP link.
USING SELECTION-SCREEN dynnr
https://help.sap.com/http.svc/rc/abapdocu_752_index_htm/7.52/en-US/abapsubmit_interface.htm
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Roberto,
thanks for your reply. Apparently, I do not want to run the 2nd program in the foreground but in background. Using the above it is taking me to Selection screen of 2nd program where i could see a button to schedule in background.
Once gain thanks for the reply.
Regards,
Aditya
Hi Jyothir,
Check if the USER has authorization - object S_BTCH_NAM.
"USING SELECTION-SCREEN dynnr" works fine considering yours submit via JOB (background).
Below SAP explain.
Addition 1
... USING SELECTION-SCREEN dynnr
Effect
This addition defines which selection screen is called. dynnr is a data object that must contain the dynpro number of a selection screen defined in the called program when the statement SUBMIT is executed.
Addition 2
... VIA SELECTION-SCREEN
Effect
If this addition is specified, the selection screen is "displayed" on the screen. Otherwise, background selection screen processing takes place. In background selection screen processing, the selection screen events are raised without the selection screen being displayed.
Regards,
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.