Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SUBMIT stmt.

ullas_u2
Explorer
0 Kudos

Hi All,

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

5 REPLIES 5

SuhaSaha
Advisor
Advisor
0 Kudos

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.

You've submitted the program as a Job, so the program B will start as a background process & you cannot debug it in the same session! Did you check in SM37 the status of the job?

... triggers a dump

Post the details of your dump for better analysis.

BR,

Suhas

Former Member
0 Kudos

Hi friend,

I think this is because the sequence of executions,

The sequence is as follows,

Job_Open

Job_Submit

Job_close

To be more clear about this please see the below link,

<link-farm removed>

If your problem still exists please revert back to me i will help you.

Thanks,

Sri Hari

Edited by: Suhas Saha on Dec 30, 2011 11:33 AM

0 Kudos

Yes the background job is getting triggered but ends with the status CANCELLED because of a dump which comes like..

Short text

Internal error in the spool system.

What happened?

Error in the SAP kernel.

The current ABAP "SAPLKKBL" program had to be terminated because the

ABAP processor detected an internal system error.

What can you do?

Note which actions and input led to the error.

For further help in handling the problem, contact your SAP administrator

.

You can use the ABAP dump analysis transaction ST22 to view and manage

termination messages, in particular for long term reference.

Error analysis

When calling the SAP spool system, an (unspecified) internal

error occurred.

More detailed description of error: "spool overflow "

Further information:

See below under "Spool error information".

NB:-

Since the dump states some SPOOL error; I made the SUBMIT stmt like..

SUBMIT zotfv01a

VIA JOB l_jobname NUMBER l_jobcount

WITH SELECTION-TABLE t_select

AND RETURN. but still the program ends up in dump.

Edited by: UllasU on Dec 30, 2011 7:00 AM

0 Kudos

Hello Ullas,

Please note that none of us have access to your system to know what the dump is! Neither do we have any crystal ball to look into as well

So try to provide as much info as possible. In this case, you could have mentioned the details of the dump when you use this code:


SUBMIT zotfv01a
VIA JOB l_jobname NUMBER l_jobcount
WITH SELECTION-TABLE t_select
AND RETURN. 

Hope you get the idea.

Thanks,

Suhas

0 Kudos

Ullas,

its a spool overflow, contact your basis team.

they will delete the old spools and things will be fine i think,