09-17-2008 2:58 PM
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
10-08-2014 9:23 AM
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