Code: Alles auswählen.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
* delanfrep = 'X'
jobname = v_jobnam
IMPORTING
jobcount = v_jobcount
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc <> 0.
e_error = true.
ELSE.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
authcknam = v_uname
jobcount = v_jobcount
jobname = v_jobnam
report = v_report
variant = v_varian
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10.
IF sy-subrc <> 0.
e_error = true.
ELSE.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
* EVENT_ID = IC_WWI_WORKPROCESS_EVENT
* EVENT_PARAM = V_EVENTPARM
* EVENT_PERIODIC = 'X'
jobcount = v_jobcount
jobname = v_jobnam
strtimmed = 'X'
IMPORTING
job_was_released = v_flg_released
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.