SAP BP_JOB_MODIFY Function Module for









BP_JOB_MODIFY is a standard bp job modify SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 bp job modify FM, simply by entering the name BP_JOB_MODIFY into the relevant SAP transaction such as SE37 or SE38.

Function Group: BTCH
Program Name: SAPLBTCH
Main Program: SAPLBTCH
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function BP_JOB_MODIFY 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 'BP_JOB_MODIFY'"
EXPORTING
DIALOG = "
* RECIPIENT_OBJ = "The Mail Recipient of the Spool Lists
* RELEASE_TARGETSERVER = ' ' "Target Application Server for Job
* DONT_RELEASE = ' ' "Job Not Released in Spite of Start Condition
* TARGETGROUP = ' ' "Target Application Server Group for Job
* DIRECT_START = "
* JOBCLASS = "
* JOBCOUNT = ' ' "Job count of job to be modified
* JOBNAME = ' ' "
* NEW_JOBHEAD = ' ' "new job header data (only in the non-online case)
* OPCODE = 0 "
* RELEASE_STDT = INITIAL_STDT "Start date (only when releasing in the non-online case)
* RELEASE_TARGETSYSTEM = ' ' "Target computer (only when releasing in the non-online case)
* SUPPRESS_RELEASE_CHECK = ' ' "Freigabeberechtigung prüfen ja / nein
* ADK_MODE = FALSE "Archivierungsjob ja / nein

IMPORTING
MODIFIED_JOBHEAD = "new job header data (output, dialog + non-dialog)

CHANGING
* RET = "Special Additional Error Code

TABLES
NEW_STEPLIST = "new step list

EXCEPTIONS
CANT_DERELEASE_JOB = 1 INVALID_NEW_JOBDATA = 10 INVALID_NEW_JOBSTATUS = 11 INVALID_OPCODE = 12 INVALID_STARTDATE = 13 JOB_EDIT_FAILED = 14 JOB_MODIFY_CANCELED = 15 JOB_NOT_MODIFIABLE_ANYMORE = 16 NOTHING_TO_DO = 17 NO_BATCH_ON_TARGET_HOST = 18 NO_BATCH_SERVER_FOUND = 19 CANT_ENQ_JOB = 2 NO_BATCH_WP_FOR_JOBCLASS = 20 NO_MODIFY_PRIVILEGE_GIVEN = 21 NO_RELEASE_PRIVILEGE_GIVEN = 22 NO_STARTDATE_NO_RELEASE = 23 TARGET_HOST_NOT_DEFINED = 24 TGT_HOST_CHK_HAS_FAILED = 25 INVALID_TARGETGROUP = 26 CONFLICTING_TARGETS = 27 CANT_READ_JOBDATA = 3 CANT_RELEASE_JOB = 4 CANT_SET_JOBSTATUS_IN_DB = 5 CANT_START_JOB_IMMEDIATELY = 6 CANT_UPDATE_JOBDATA = 7 EVENTCNT_GENERATION_ERROR = 8 INVALID_DIALOG_TYPE = 9
.



IMPORTING Parameters details for BP_JOB_MODIFY

DIALOG -

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

RECIPIENT_OBJ - The Mail Recipient of the Spool Lists

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

RELEASE_TARGETSERVER - Target Application Server for Job

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

DONT_RELEASE - Job Not Released in Spite of Start Condition

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

TARGETGROUP - Target Application Server Group for Job

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

DIRECT_START -

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

JOBCLASS -

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

JOBCOUNT - Job count of job to be modified

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

JOBNAME -

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

NEW_JOBHEAD - new job header data (only in the non-online case)

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

OPCODE -

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

RELEASE_STDT - Start date (only when releasing in the non-online case)

Data type: TBTCSTRT
Default: INITIAL_STDT
Optional: Yes
Call by Reference: No ( called with pass by value option)

RELEASE_TARGETSYSTEM - Target computer (only when releasing in the non-online case)

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

SUPPRESS_RELEASE_CHECK - Freigabeberechtigung prüfen ja / nein

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

ADK_MODE - Archivierungsjob ja / nein

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

EXPORTING Parameters details for BP_JOB_MODIFY

MODIFIED_JOBHEAD - new job header data (output, dialog + non-dialog)

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

CHANGING Parameters details for BP_JOB_MODIFY

RET - Special Additional Error Code

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

TABLES Parameters details for BP_JOB_MODIFY

NEW_STEPLIST - new step list

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

EXCEPTIONS details

CANT_DERELEASE_JOB - Job planning cannot be cancelled

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

INVALID_NEW_JOBDATA - new job data is invalid

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

INVALID_NEW_JOBSTATUS - Status in new job data is invalid (non-dialog)

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

INVALID_OPCODE - invalid operation code

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

INVALID_STARTDATE - Start dates scheduled are invalid

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

JOB_EDIT_FAILED - internal error in the job editor

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

JOB_MODIFY_CANCELED - Editing job data online was cancelled

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

JOB_NOT_MODIFIABLE_ANYMORE - Job cannot be modified due to its status

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

NOTHING_TO_DO - required and act. status are identical

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

NO_BATCH_ON_TARGET_HOST - Target host has no background work processes

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

NO_BATCH_SERVER_FOUND - no server found for processing the job

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

CANT_ENQ_JOB - Job cannot be blocked

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

NO_BATCH_WP_FOR_JOBCLASS - Class (B/C) cannot be carrd.out on targ.host

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

NO_MODIFY_PRIVILEGE_GIVEN - User has no change authorization

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

NO_RELEASE_PRIVILEGE_GIVEN - User has no job release authorization

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

NO_STARTDATE_NO_RELEASE - no release possible without start date

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

TARGET_HOST_NOT_DEFINED - Target host defined in no operation mode

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

TGT_HOST_CHK_HAS_FAILED - Target host check failed

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

INVALID_TARGETGROUP -

Data type:
Optional: No
Call by Reference: Yes

CONFLICTING_TARGETS -

Data type:
Optional: No
Call by Reference: Yes

CANT_READ_JOBDATA - Error when n reading job data from the DB

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

CANT_RELEASE_JOB - Job cannot be released

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

CANT_SET_JOBSTATUS_IN_DB - Error when changing job status in DB

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

CANT_START_JOB_IMMEDIATELY - Immediate start of job failed

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

CANT_UPDATE_JOBDATA - Job data in DB cannot be updated

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

EVENTCNT_GENERATION_ERROR - Generation of an event count failed

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

INVALID_DIALOG_TYPE - invalid interactive category

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

Copy and paste ABAP code example for BP_JOB_MODIFY 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_dialog  TYPE BTCH0000-CHAR1, "   
lt_new_steplist  TYPE STANDARD TABLE OF TBTCSTEP, "   
lv_modified_jobhead  TYPE TBTCJOB, "   
lv_cant_derelease_job  TYPE TBTCJOB, "   
lv_recipient_obj  TYPE SWOTOBJID, "   
lv_invalid_new_jobdata  TYPE SWOTOBJID, "   
lv_release_targetserver  TYPE BTCTGTSRVR-SRVNAME, "   SPACE
lv_invalid_new_jobstatus  TYPE BTCTGTSRVR, "   
lv_dont_release  TYPE BTCH0000-CHAR1, "   SPACE
lv_invalid_opcode  TYPE BTCH0000, "   
lv_targetgroup  TYPE BPSRVGRP, "   SPACE
lv_invalid_startdate  TYPE BPSRVGRP, "   
lv_direct_start  TYPE BTCH0000-CHAR1, "   
lv_job_edit_failed  TYPE BTCH0000, "   
lv_jobclass  TYPE BTCJOBCLAS, "   
lv_job_modify_canceled  TYPE BTCJOBCLAS, "   
lv_job_not_modifiable_anymore  TYPE BTCJOBCLAS, "   
lv_nothing_to_do  TYPE BTCJOBCLAS, "   
lv_no_batch_on_target_host  TYPE BTCJOBCLAS, "   
lv_no_batch_server_found  TYPE BTCJOBCLAS, "   
lv_jobcount  TYPE TBTCJOB-JOBCOUNT, "   SPACE
lv_cant_enq_job  TYPE TBTCJOB, "   
lv_no_batch_wp_for_jobclass  TYPE TBTCJOB, "   
lv_no_modify_privilege_given  TYPE TBTCJOB, "   
lv_no_release_privilege_given  TYPE TBTCJOB, "   
lv_no_startdate_no_release  TYPE TBTCJOB, "   
lv_target_host_not_defined  TYPE TBTCJOB, "   
lv_tgt_host_chk_has_failed  TYPE TBTCJOB, "   
lv_invalid_targetgroup  TYPE TBTCJOB, "   
lv_conflicting_targets  TYPE TBTCJOB, "   
lv_jobname  TYPE TBTCJOB-JOBNAME, "   SPACE
lv_cant_read_jobdata  TYPE TBTCJOB, "   
lv_new_jobhead  TYPE TBTCJOB, "   SPACE
lv_cant_release_job  TYPE TBTCJOB, "   
lv_opcode  TYPE BTCH0000-INT4, "   0
lv_cant_set_jobstatus_in_db  TYPE BTCH0000, "   
lv_release_stdt  TYPE TBTCSTRT, "   INITIAL_STDT
lv_cant_start_job_immediately  TYPE TBTCSTRT, "   
lv_cant_update_jobdata  TYPE TBTCSTRT, "   
lv_release_targetsystem  TYPE TBTCSTRT, "   SPACE
lv_suppress_release_check  TYPE BTCH0000-CHAR1, "   SPACE
lv_eventcnt_generation_error  TYPE BTCH0000, "   
lv_adk_mode  TYPE BTCH0000-CHAR1, "   FALSE
lv_invalid_dialog_type  TYPE BTCH0000. "   

  CALL FUNCTION 'BP_JOB_MODIFY'  "
    EXPORTING
         DIALOG = lv_dialog
         RECIPIENT_OBJ = lv_recipient_obj
         RELEASE_TARGETSERVER = lv_release_targetserver
         DONT_RELEASE = lv_dont_release
         TARGETGROUP = lv_targetgroup
         DIRECT_START = lv_direct_start
         JOBCLASS = lv_jobclass
         JOBCOUNT = lv_jobcount
         JOBNAME = lv_jobname
         NEW_JOBHEAD = lv_new_jobhead
         OPCODE = lv_opcode
         RELEASE_STDT = lv_release_stdt
         RELEASE_TARGETSYSTEM = lv_release_targetsystem
         SUPPRESS_RELEASE_CHECK = lv_suppress_release_check
         ADK_MODE = lv_adk_mode
    IMPORTING
         MODIFIED_JOBHEAD = lv_modified_jobhead
    CHANGING
         RET = lv_ret
    TABLES
         NEW_STEPLIST = lt_new_steplist
    EXCEPTIONS
        CANT_DERELEASE_JOB = 1
        INVALID_NEW_JOBDATA = 10
        INVALID_NEW_JOBSTATUS = 11
        INVALID_OPCODE = 12
        INVALID_STARTDATE = 13
        JOB_EDIT_FAILED = 14
        JOB_MODIFY_CANCELED = 15
        JOB_NOT_MODIFIABLE_ANYMORE = 16
        NOTHING_TO_DO = 17
        NO_BATCH_ON_TARGET_HOST = 18
        NO_BATCH_SERVER_FOUND = 19
        CANT_ENQ_JOB = 2
        NO_BATCH_WP_FOR_JOBCLASS = 20
        NO_MODIFY_PRIVILEGE_GIVEN = 21
        NO_RELEASE_PRIVILEGE_GIVEN = 22
        NO_STARTDATE_NO_RELEASE = 23
        TARGET_HOST_NOT_DEFINED = 24
        TGT_HOST_CHK_HAS_FAILED = 25
        INVALID_TARGETGROUP = 26
        CONFLICTING_TARGETS = 27
        CANT_READ_JOBDATA = 3
        CANT_RELEASE_JOB = 4
        CANT_SET_JOBSTATUS_IN_DB = 5
        CANT_START_JOB_IMMEDIATELY = 6
        CANT_UPDATE_JOBDATA = 7
        EVENTCNT_GENERATION_ERROR = 8
        INVALID_DIALOG_TYPE = 9
. " BP_JOB_MODIFY




ABAP code using 7.40 inline data declarations to call FM BP_JOB_MODIFY

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 CHAR1 FROM BTCH0000 INTO @DATA(ld_dialog).
 
 
 
 
 
 
"SELECT single SRVNAME FROM BTCTGTSRVR INTO @DATA(ld_release_targetserver).
DATA(ld_release_targetserver) = ' '.
 
 
"SELECT single CHAR1 FROM BTCH0000 INTO @DATA(ld_dont_release).
DATA(ld_dont_release) = ' '.
 
 
DATA(ld_targetgroup) = ' '.
 
 
"SELECT single CHAR1 FROM BTCH0000 INTO @DATA(ld_direct_start).
 
 
 
 
 
 
 
 
"SELECT single JOBCOUNT FROM TBTCJOB INTO @DATA(ld_jobcount).
DATA(ld_jobcount) = ' '.
 
 
 
 
 
 
 
 
 
 
"SELECT single JOBNAME FROM TBTCJOB INTO @DATA(ld_jobname).
DATA(ld_jobname) = ' '.
 
 
DATA(ld_new_jobhead) = ' '.
 
 
"SELECT single INT4 FROM BTCH0000 INTO @DATA(ld_opcode).
 
 
DATA(ld_release_stdt) = INITIAL_STDT.
 
 
 
DATA(ld_release_targetsystem) = ' '.
 
"SELECT single CHAR1 FROM BTCH0000 INTO @DATA(ld_suppress_release_check).
DATA(ld_suppress_release_check) = ' '.
 
 
"SELECT single CHAR1 FROM BTCH0000 INTO @DATA(ld_adk_mode).
DATA(ld_adk_mode) = FALSE.
 
 


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!