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: 

Background job not getting released ABAP

AbhishekSharma
Active Contributor
0 Kudos
520

Hi Experts,

I am using below syntax for Submitting one standard tcode MB52 program by using another simple ZProgram.

SUBMIT RM07MLBS USING SELECTION-SET 'MB52_LX02_AB' AND RETURN VIA JOB JOBNAME NUMBER JOBCOUNT.

When I am scheduling this ZProgram as batch JOB it executes on specified time successfully but I am not seeing any spool getting generated..

But when I Execute this ZProgram using se38 (F8) and release from SM37 Spool is getting generated..

Please guide me how can I achieve this requirement.

Thanks-

Abhishek

Let's learn together as much as possible...
CodeInMins
3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos
101

More analysis needed: use SP01 to make sure there is really no spool (a job may generate secondary list spool(s) - can be viewed by different menu entry in SM37 or SP01). Use ok code "jdbg" on the job in SM37 to run it in dialog, and check in SP01 again. Did you detect any error after JOB_OPEN, JOB_CLOSE and SUBMIT?

Tomas_Buryanek
Active Contributor
0 Kudos
101

How are you calling JOB_OPEN and JOB_CLOSE (with which parameters)?

-- Tomas --

raymond_giuseppi
Active Contributor
101

Did you set the print parameter and pass the result to the SUBMIT of the step?

CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    archive_mode           = '1'
  IMPORTING
    out_parameters         = print_parameters
    valid                  = valid_flag
  EXCEPTIONS
    invalid_print_params   = 1
    OTHERS                 = 2.
* check valid flag and return code
SUBMIT rm07mlbs
  USING SELECTION-SET 'MB52_LX02_AB'
  TO SAP-SPOOL SPOOL PARAMETERS print_parameters
               WITHOUT SPOOL DYNPRO
  VIA JOB jobname NUMBER jobcount
  AND RETURN.

Regards,
Raymond