SAP Function Modules

BP_JOB_EDITOR SAP Function module







BP_JOB_EDITOR is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BP_JOB_EDITOR into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BTCH
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM BP_JOB_EDITOR - BP JOB EDITOR





CALL FUNCTION 'BP_JOB_EDITOR' "
  EXPORTING
    job_editor_dialog =         " btch0000-char1  Interactive mode yes/no
*   job_editor_opcode = 0       " btch0000-int4  Mode: create, display, edit job
    job_head_input =            " tbtcjob       Job header data
  IMPORTING
    job_editor_modify_type =    " btch0000-int4  it specifies whether and how job values were changed
    job_head_output =           " tbtcjob       (updated) job header data
    job_stdt_output =           " tbtcstrt      (updated) Startdate/ repetitive period data
  TABLES
    job_steplist =              " tbtcstep      Step list which belongs to the job (I/O)
  EXCEPTIONS
    EVENTCNT_GENERATION_ERROR = 1  "            Eventcount generation f. previous job failed
    INVALID_DIALOG_TYPE = 2     "               invalid interactive category was specified
    INVALID_JOBCLASS = 3        "               Job has invalid job class
    INVALID_JOBSTATUS = 4       "               Job has invalid status
    INVALID_OPCODE = 5          "               invalid mode (see also 'Notes')
    INVALID_STARTDATE = 6       "               Start date data of the job are invalid
    INVALID_STEPDATA = 7        "               Job has invalid step data
    JOBCOUNT_GENERATION_ERROR = 8  "            Job count generation failed
    JOBNAME_MISSING = 9         "               Job name is missing
    JOB_NOT_MODIFIABLE_ANYMORE = 10  "          Job can no longer be changed due to its status
    NO_BATCH_ON_TARGET_HOST = 11  "             No background processing on target computer is active
    NO_BATCH_SERVER_FOUND = 12  "               no server found for job
    NO_BATCH_WP_FOR_JOBCLASS = 13  "            Class (B/C) cannot be carrd.out on targ.host
    NO_PLAN_PRIVILEGE_GIVEN = 14  "             User has no authorization for planning
    NO_RELEASE_PRIVILEGE_GIVEN = 15  "          User has no job release authorization
    NO_STARTDATE_NO_RELEASE = 16  "             Status != 'scheduled' invalid without start date
    NO_STEPDATA_GIVEN = 17      "               Step data is missing: no job without step data !
    TARGET_HOST_NOT_DEFINED = 18  "             Target computer not defined in any operation type
    TGT_HOST_CHK_HAS_FAILED = 19  "             Check target/ default backgr.computer failed
    .  "  BP_JOB_EDITOR

ABAP code example for Function Module BP_JOB_EDITOR





The ABAP code below is a full code listing to execute function module BP_JOB_EDITOR including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_job_editor_modify_type  TYPE BTCH0000-INT4 ,
ld_job_head_output  TYPE TBTCJOB ,
ld_job_stdt_output  TYPE TBTCSTRT ,
it_job_steplist  TYPE STANDARD TABLE OF TBTCSTEP,"TABLES PARAM
wa_job_steplist  LIKE LINE OF it_job_steplist .


DATA(ld_job_editor_dialog) = some text here

DATA(ld_job_editor_opcode) = 123
DATA(ld_job_head_input) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_job_steplist to it_job_steplist. . CALL FUNCTION 'BP_JOB_EDITOR' EXPORTING job_editor_dialog = ld_job_editor_dialog * job_editor_opcode = ld_job_editor_opcode job_head_input = ld_job_head_input IMPORTING job_editor_modify_type = ld_job_editor_modify_type job_head_output = ld_job_head_output job_stdt_output = ld_job_stdt_output TABLES job_steplist = it_job_steplist EXCEPTIONS EVENTCNT_GENERATION_ERROR = 1 INVALID_DIALOG_TYPE = 2 INVALID_JOBCLASS = 3 INVALID_JOBSTATUS = 4 INVALID_OPCODE = 5 INVALID_STARTDATE = 6 INVALID_STEPDATA = 7 JOBCOUNT_GENERATION_ERROR = 8 JOBNAME_MISSING = 9 JOB_NOT_MODIFIABLE_ANYMORE = 10 NO_BATCH_ON_TARGET_HOST = 11 NO_BATCH_SERVER_FOUND = 12 NO_BATCH_WP_FOR_JOBCLASS = 13 NO_PLAN_PRIVILEGE_GIVEN = 14 NO_RELEASE_PRIVILEGE_GIVEN = 15 NO_STARTDATE_NO_RELEASE = 16 NO_STEPDATA_GIVEN = 17 TARGET_HOST_NOT_DEFINED = 18 TGT_HOST_CHK_HAS_FAILED = 19 . " BP_JOB_EDITOR
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 9. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 10. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 11. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 12. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 13. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 14. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 15. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 16. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 17. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 18. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 19. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_job_editor_modify_type  TYPE BTCH0000-INT4 ,
ld_job_editor_dialog  TYPE BTCH0000-CHAR1 ,
it_job_steplist  TYPE STANDARD TABLE OF TBTCSTEP ,
wa_job_steplist  LIKE LINE OF it_job_steplist,
ld_job_head_output  TYPE TBTCJOB ,
ld_job_editor_opcode  TYPE BTCH0000-INT4 ,
ld_job_stdt_output  TYPE TBTCSTRT ,
ld_job_head_input  TYPE TBTCJOB .


ld_job_editor_dialog = some text here

"populate fields of struture and append to itab
append wa_job_steplist to it_job_steplist.

ld_job_editor_opcode = 123
ld_job_head_input = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BP_JOB_EDITOR or its description.