SAP BP_JOB_READ Function Module for
BP_JOB_READ is a standard bp job read 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 read FM, simply by entering the name BP_JOB_READ 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_READ 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_READ'".
EXPORTING
JOB_READ_JOBCOUNT = "Job count of job to be read
JOB_READ_JOBNAME = "Job name of job to be read
JOB_READ_OPCODE = "it specifies which job data is to be read
* JOB_STEP_NUMBER = "Job step ID number.
IMPORTING
JOB_READ_JOBHEAD = "Job header data of the read job
JOBLOG_ATTRIBUTES = "
EPP_ATTRIBUTES = "
CHANGING
* RET = "Special Additional Error Code
TABLES
* JOB_READ_STEPLIST = "Step list of the read job
* SPOOL_ATTRIBUTES = "
EXCEPTIONS
INVALID_OPCODE = 1 JOB_DOESNT_EXIST = 2 JOB_DOESNT_HAVE_STEPS = 3
IMPORTING Parameters details for BP_JOB_READ
JOB_READ_JOBCOUNT - Job count of job to be read
Data type: TBTCJOB-JOBCOUNTOptional: No
Call by Reference: No ( called with pass by value option)
JOB_READ_JOBNAME - Job name of job to be read
Data type: TBTCJOB-JOBNAMEOptional: No
Call by Reference: No ( called with pass by value option)
JOB_READ_OPCODE - it specifies which job data is to be read
Data type: BTCH0000-INT4Optional: No
Call by Reference: No ( called with pass by value option)
JOB_STEP_NUMBER - Job step ID number.
Data type: TBTCP-STEPCOUNTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BP_JOB_READ
JOB_READ_JOBHEAD - Job header data of the read job
Data type: TBTCJOBOptional: No
Call by Reference: No ( called with pass by value option)
JOBLOG_ATTRIBUTES -
Data type: BAPIXMJOBLOGOptional: No
Call by Reference: No ( called with pass by value option)
EPP_ATTRIBUTES -
Data type: BTCJOBEPPOptional: No
Call by Reference: Yes
CHANGING Parameters details for BP_JOB_READ
RET - Special Additional Error Code
Data type: IOptional: Yes
Call by Reference: Yes
TABLES Parameters details for BP_JOB_READ
JOB_READ_STEPLIST - Step list of the read job
Data type: TBTCSTEPOptional: Yes
Call by Reference: No ( called with pass by value option)
SPOOL_ATTRIBUTES -
Data type: BAPIXMSPOOLIDOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
INVALID_OPCODE - invalid operation code was discovered
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
JOB_DOESNT_EXIST - Job with job name/job count does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
JOB_DOESNT_HAVE_STEPS - no steps were found for the job
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BP_JOB_READ 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_invalid_opcode | TYPE I, " | |||
| lv_job_read_jobhead | TYPE TBTCJOB, " | |||
| lv_job_read_jobcount | TYPE TBTCJOB-JOBCOUNT, " | |||
| lt_job_read_steplist | TYPE STANDARD TABLE OF TBTCSTEP, " | |||
| lv_job_doesnt_exist | TYPE TBTCSTEP, " | |||
| lv_job_read_jobname | TYPE TBTCJOB-JOBNAME, " | |||
| lt_spool_attributes | TYPE STANDARD TABLE OF BAPIXMSPOOLID, " | |||
| lv_joblog_attributes | TYPE BAPIXMJOBLOG, " | |||
| lv_epp_attributes | TYPE BTCJOBEPP, " | |||
| lv_job_read_opcode | TYPE BTCH0000-INT4, " | |||
| lv_job_doesnt_have_steps | TYPE BTCH0000, " | |||
| lv_job_step_number | TYPE TBTCP-STEPCOUNT. " |
|   CALL FUNCTION 'BP_JOB_READ' " |
| EXPORTING | ||
| JOB_READ_JOBCOUNT | = lv_job_read_jobcount | |
| JOB_READ_JOBNAME | = lv_job_read_jobname | |
| JOB_READ_OPCODE | = lv_job_read_opcode | |
| JOB_STEP_NUMBER | = lv_job_step_number | |
| IMPORTING | ||
| JOB_READ_JOBHEAD | = lv_job_read_jobhead | |
| JOBLOG_ATTRIBUTES | = lv_joblog_attributes | |
| EPP_ATTRIBUTES | = lv_epp_attributes | |
| CHANGING | ||
| RET | = lv_ret | |
| TABLES | ||
| JOB_READ_STEPLIST | = lt_job_read_steplist | |
| SPOOL_ATTRIBUTES | = lt_spool_attributes | |
| EXCEPTIONS | ||
| INVALID_OPCODE = 1 | ||
| JOB_DOESNT_EXIST = 2 | ||
| JOB_DOESNT_HAVE_STEPS = 3 | ||
| . " BP_JOB_READ | ||
ABAP code using 7.40 inline data declarations to call FM BP_JOB_READ
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_job_read_jobcount). | ||||
| "SELECT single JOBNAME FROM TBTCJOB INTO @DATA(ld_job_read_jobname). | ||||
| "SELECT single INT4 FROM BTCH0000 INTO @DATA(ld_job_read_opcode). | ||||
| "SELECT single STEPCOUNT FROM TBTCP INTO @DATA(ld_job_step_number). | ||||
Search for further information about these or an SAP related objects