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: 

submit RSEOUT00 as background job

Former Member
0 Kudos

Hi all,

Here is my requirement.There is a Z program from which RSEOUT00 program has to be called , so that it will change the Idoc status to '03'. I tried using Submit RSEOUT00..and return and also tried JOB_open and then SUBMIT rseout00 WITH docnum EQ p_idocno user sy-uname via job jobname number jobcount and return and then JOB_CLOSE .I checked SM37 also where i can see this job as finished..

I tried COMMIT WORK statement and also WAIT statement .

But still the idoc status wont change to '03' .

Can anyone plase advise on how to correct this .

Regards,

Sudheer

1 REPLY 1

Hi,

I have created background job for RSEOUT00 and written the below code. It worked.

DATA: w_number           TYPE tbtcjob-jobcount,
           w_name              TYPE tbtcjob-jobname VALUE 'ZTEST_JOB'.


   CALL FUNCTION 'JOB_OPEN'
     EXPORTING
       jobname          = w_name
     IMPORTING
       jobcount         = w_number
     EXCEPTIONS
       cant_create_job  = 1
       invalid_job_data = 2
       jobname_missing  = 3
       OTHERS           = 4.

   IF sy-subrc = 0.

     SUBMIT rseout00  VIA JOB w_name NUMBER w_number AND RETURN.

     IF sy-subrc = 0.

       CALL FUNCTION 'JOB_CLOSE'
         EXPORTING
           jobcount             = w_number
           jobname              = w_name
           strtimmed            = '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
           OTHERS               = 8.

       IF sy-subrc <> 0.

       ENDIF.

     ENDIF.

   ENDIF.



Thanks,

Appanaboina