SAP JOB_OPEN Function Module for Open Job Scheduling Without Dialog (Including COMMIT WORK)









JOB_OPEN is a standard job open SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Open Job Scheduling Without Dialog (Including COMMIT WORK) processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for job open FM, simply by entering the name JOB_OPEN into the relevant SAP transaction such as SE37 or SE38.

Function Group: BTCH
Program Name: SAPLBTCH
Main Program: SAPLBTCH
Appliation area:
Release date: 08-May-1996
Mode(Normal, Remote etc): Normal Function Module
Update:



Function JOB_OPEN pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'JOB_OPEN'"Open Job Scheduling Without Dialog (Including COMMIT WORK)
EXPORTING
* DELANFREP = ' ' "Do Not Use
* JOBGROUP = ' ' "Group to Which the Job is to be Assigned
JOBNAME = "Job Name
* SDLSTRTDT = NO_DATE "Do Not Use
* SDLSTRTTM = NO_TIME "Do Not Use
* JOBCLASS = "Job classification
* CHECK_JOBCLASS = "Reference type CHAR1 for background processing

IMPORTING
JOBCOUNT = "ID Number of Background Job
INFO = "

CHANGING
* RET = "Special Additional Error Code

EXCEPTIONS
CANT_CREATE_JOB = 1 INVALID_JOB_DATA = 2 JOBNAME_MISSING = 3
.



IMPORTING Parameters details for JOB_OPEN

DELANFREP - Do Not Use

Data type: TBTCJOB-DELANFREP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

JOBGROUP - Group to Which the Job is to be Assigned

Data type: TBTCJOB-JOBGROUP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

JOBNAME - Job Name

Data type: TBTCJOB-JOBNAME
Optional: No
Call by Reference: No ( called with pass by value option)

SDLSTRTDT - Do Not Use

Data type: TBTCJOB-SDLSTRTDT
Default: NO_DATE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SDLSTRTTM - Do Not Use

Data type: TBTCJOB-SDLSTRTTM
Default: NO_TIME
Optional: Yes
Call by Reference: No ( called with pass by value option)

JOBCLASS - Job classification

Data type: TBTCJOB-JOBCLASS
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK_JOBCLASS - Reference type CHAR1 for background processing

Data type: BTCH0000-CHAR1
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for JOB_OPEN

JOBCOUNT - ID Number of Background Job

Data type: TBTCJOB-JOBCOUNT
Optional: No
Call by Reference: No ( called with pass by value option)

INFO -

Data type: I
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for JOB_OPEN

RET - Special Additional Error Code

Data type: I
Optional: Yes
Call by Reference: Yes

EXCEPTIONS details

CANT_CREATE_JOB - Job cannot be created, see system log

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INVALID_JOB_DATA - Job Contains Invalid Job Data, See SYSLOG

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

JOBNAME_MISSING - Job Name Not Specified

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for JOB_OPEN Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_ret  TYPE I, "   
lv_jobcount  TYPE TBTCJOB-JOBCOUNT, "   
lv_delanfrep  TYPE TBTCJOB-DELANFREP, "   SPACE
lv_cant_create_job  TYPE TBTCJOB, "   
lv_info  TYPE I, "   
lv_jobgroup  TYPE TBTCJOB-JOBGROUP, "   SPACE
lv_invalid_job_data  TYPE TBTCJOB, "   
lv_jobname  TYPE TBTCJOB-JOBNAME, "   
lv_jobname_missing  TYPE TBTCJOB, "   
lv_sdlstrtdt  TYPE TBTCJOB-SDLSTRTDT, "   NO_DATE
lv_sdlstrttm  TYPE TBTCJOB-SDLSTRTTM, "   NO_TIME
lv_jobclass  TYPE TBTCJOB-JOBCLASS, "   
lv_check_jobclass  TYPE BTCH0000-CHAR1. "   

  CALL FUNCTION 'JOB_OPEN'  "Open Job Scheduling Without Dialog (Including COMMIT WORK)
    EXPORTING
         DELANFREP = lv_delanfrep
         JOBGROUP = lv_jobgroup
         JOBNAME = lv_jobname
         SDLSTRTDT = lv_sdlstrtdt
         SDLSTRTTM = lv_sdlstrttm
         JOBCLASS = lv_jobclass
         CHECK_JOBCLASS = lv_check_jobclass
    IMPORTING
         JOBCOUNT = lv_jobcount
         INFO = lv_info
    CHANGING
         RET = lv_ret
    EXCEPTIONS
        CANT_CREATE_JOB = 1
        INVALID_JOB_DATA = 2
        JOBNAME_MISSING = 3
. " JOB_OPEN




ABAP code using 7.40 inline data declarations to call FM JOB_OPEN

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
"SELECT single JOBCOUNT FROM TBTCJOB INTO @DATA(ld_jobcount).
 
"SELECT single DELANFREP FROM TBTCJOB INTO @DATA(ld_delanfrep).
DATA(ld_delanfrep) = ' '.
 
 
 
"SELECT single JOBGROUP FROM TBTCJOB INTO @DATA(ld_jobgroup).
DATA(ld_jobgroup) = ' '.
 
 
"SELECT single JOBNAME FROM TBTCJOB INTO @DATA(ld_jobname).
 
 
"SELECT single SDLSTRTDT FROM TBTCJOB INTO @DATA(ld_sdlstrtdt).
DATA(ld_sdlstrtdt) = NO_DATE.
 
"SELECT single SDLSTRTTM FROM TBTCJOB INTO @DATA(ld_sdlstrttm).
DATA(ld_sdlstrttm) = NO_TIME.
 
"SELECT single JOBCLASS FROM TBTCJOB INTO @DATA(ld_jobclass).
 
"SELECT single CHAR1 FROM BTCH0000 INTO @DATA(ld_check_jobclass).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!