Skip to Content
0

Background job not getting released ABAP

Oct 19, 2016 at 08:26 PM

155

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Raymond Giuseppi
Oct 20, 2016 at 12:06 PM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Sandra Rossi Oct 20, 2016 at 06:50 AM
0

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?

Share
10 |10000 characters needed characters left characters exceeded
Tomas Buryanek Oct 20, 2016 at 07:41 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded