Hallo,
ich habe folgendes Coding und möchte damit von einem Report aus ein anderes report im Hintergrund SOFORT
ausführen lassen. Der Job wird nur geplant, wird aber nicht sofort ausgeführt.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = g_repid
tables
selection_table = selection_table
EXCEPTIONS
NOT_FOUND = 1
NO_REPORT = 2
OTHERS = 3
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = p_name
IMPORTING
jobcount = jnumb
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 99.
IF sy-subrc EQ 0. "Job_open OK
submit ZTT__JOBPS WITH SELECTION-TABLE selection_table and return.
IF sy-subrc EQ 0. "submit OK
CLEAR jobrele.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = jnumb
jobname = p_name
strtimmed = abap_true
SDLSTRTDT = ' '
SDLSTRTTM = ' '
IMPORTING
job_was_released = jobrele
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 = 99.
ENDIF.
ENDIF.
Danke für Hilfe!