BASIS Function module Used the same way in S/4HANA

JOB_CLOSE Close and Release Background Job

Sets the start condition of a background job whose steps have been added (immediately, date/time, event, predecessor job, period) and releases the job. It is the last step, called after JOB_OPEN and JOB_SUBMIT. Pass STRTIMMED = 'X' to start immediately; without release authorization the job stays scheduled, so check JOB_WAS_RELEASED.

Function group
BTCH
Remote-enabled (RFC)
No
Type
Function module

Importing parameters

ParameterTypeDescriptionRequired
JOBNAMETBTCJOB-JOBNAMEJob nameYes
JOBCOUNTTBTCJOB-JOBCOUNTJob countYes
STRTIMMEDBTCH0000-CHAR1Start immediately—
SDLSTRTDTTBTCJOB-SDLSTRTDTPlanned start date—
SDLSTRTTMTBTCJOB-SDLSTRTTMPlanned start time—
PRDDAYSTBTCJOB-PRDDAYSPeriod (days)—
PRDHOURSTBTCJOB-PRDHOURSPeriod (hours)—
PRDMINSTBTCJOB-PRDMINSPeriod (minutes)—
EVENT_IDTBTCJOB-EVENTIDTriggering event—
PRED_JOBNAMETBTCJOB-JOBNAMEPredecessor job name—
PRED_JOBCOUNTTBTCJOB-JOBCOUNTPredecessor job count—
PREDJOB_CHECKSTATTBTCSTRT-CHECKSTATCheck predecessor job status—
TARGETSERVERBTCTGTSRVR-SRVNAMETarget server—

Exporting parameters

ParameterTypeDescription
JOB_WAS_RELEASEDBTCH0000-CHAR1Job was released

Changing parameters

ParameterTypeDescriptionRequired
RETIReturn code—

Exceptions

  • CANT_START_IMMEDIATE — Job cannot start immediately
  • INVALID_STARTDATE — Invalid start date
  • JOBNAME_MISSING — Job name missing
  • JOB_CLOSE_FAILED — Job could not be closed
  • JOB_NOSTEPS — Job has no steps
  • JOB_NOTEX — Job does not exist
  • LOCK_FAILED — Lock failed
  • INVALID_TARGET — Invalid target server

Call template (ABAP)

A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.

CALL FUNCTION 'JOB_CLOSE'
  EXPORTING
    jobname = lv_jobname
    jobcount = lv_jobcount
  IMPORTING
    job_was_released = lv_job_was_released
  CHANGING
    ret = lv_ret
  EXCEPTIONS
    cant_start_immediate = 1
    invalid_startdate = 2
    jobname_missing = 3
    job_close_failed = 4
    job_nosteps = 5
    job_notex = 6
    lock_failed = 7
    invalid_target = 8
    OTHERS = 9.

Related tables

Can't find the report you need?

We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.

Request a custom report