I've two executable programs; prog A and prog B. Prog A uses a SUBMIT stmt to call the prog B.
On debugging, I found that the cursor goes to prog B but not going into the START OF SELECTION event; before that the cursor moves all of a sudden to JOB_SUBMIT stmt and triggers a dump.
The code comes like.. I mapped the internal table t_select properly.. (I belive). Please help.
*-->Open job. CALL FUNCTION 'JOB_OPEN' EXPORTING jobname = l_jobname IMPORTING jobcount = l_jobcount EXCEPTIONS cant_create_job = 1 invalid_job_data = 2 jobname_missing = 3. IF sy-subrc <> 0. MESSAGE i047(z2) WITH text-i01. LEAVE LIST-PROCESSING. ENDIF. SUBMIT zotfv01a TO SAP-SPOOL WITHOUT SPOOL DYNPRO VIA JOB l_jobname NUMBER l_jobcount WITH SELECTION-TABLE t_select AND RETURN. IF sy-subrc = 0. MESSAGE s047(z2) WITH text-s01. ENDIF. *-->Close Job. CALL FUNCTION 'JOB_CLOSE' EXPORTING jobcount = l_jobcount jobname = l_jobname strtimmed = c_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 i047(z2) WITH text-i02.
<Added code tags>
If I execute the prog B seperatly on the same variant; it works fine.
Moderator Message: Please use "code" tags to format your code snippet
Edited by: UllasU on Dec 30, 2011 6:39 AM
Edited by: Suhas Saha on Dec 30, 2011 11:12 AM