06-29-2015 6:51 PM
Hi Experts,
I am facing weird problem while calling the submit program (e.g.
ZREPORT_BG) from actual program (e.g.ZREPORT). Actually I have requirement to
create an activity group in background by selecting background check box in the
selection screen.
But when I am calling submit program ZREPORT_BG, I have few
issues as below.
Please let me know if I am missing anything while calling
program.
Thanks,
Siva
06-30-2015 3:57 PM
Hi siva,
By default, the Initialization event will be called in the calling program.
If the calling program(ZREPORT_BG) have selection screen, then after the selection screen triggered and executed only, the start of selection and end of selection event will be called.
If the issue is occurring only in background, Kindly debug the program in background using the background option in SE38.
Regards
Rajkumar Narasimman
07-03-2015 3:28 PM
Hi Raj,
Actually my issue with the submit statement.
In the below submit program, if I don't use the statements "WITH SELECTION-TABLE lt_sel_tab USER sy-uname VIA JOB lv_job_name NUMBER lv_job_nr" I am able to go to start of selection and end of selection in the submitted program.
if I call just program SUBMIT zmmapi12_bg AND RETURN, I am able to go inside the start of selection and end of selection. please let me know If I am missing any thing.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_job_name
IMPORTING
jobcount = lv_job_nr
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF syst-subrc = 0.
SUBMIT zmmapi12_bg WITH SELECTION-TABLE
lt_sel_tab
USER sy-uname
VIA JOB lv_job_name NUMBER lv_job_nr
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_job_nr
jobname = lv_job_name
strtimmed = 'X'