SAP BDL_READ_JOB_STATUS Function Module for Read job status via job name and job number









BDL_READ_JOB_STATUS is a standard bdl read job status SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read job status via job name and job number 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 bdl read job status FM, simply by entering the name BDL_READ_JOB_STATUS into the relevant SAP transaction such as SE37 or SE38.

Function Group: BDL3
Program Name: SAPLBDL3
Main Program: SAPLBDL3
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function BDL_READ_JOB_STATUS 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 'BDL_READ_JOB_STATUS'"Read job status via job name and job number
EXPORTING
* JOBNAME = ' ' "Background job name
* JOBNUMBER = '00000000' "Background job number
* SESSIONNR = '0000000000' "SDCC session number
* EXTENSION = '000' "SDCC session number extension

IMPORTING
JOBNAME_OUT = "Name of job where status is given
JOBNUMBER_OUT = "Number of job where status is given
JOBSTATUS = "Status of background job

EXCEPTIONS
JOB_NOT_FOUND = 1
.



IMPORTING Parameters details for BDL_READ_JOB_STATUS

JOBNAME - Background job name

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

JOBNUMBER - Background job number

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

SESSIONNR - SDCC session number

Data type: BDLDTOC-SESSIONNR
Default: '0000000000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXTENSION - SDCC session number extension

Data type: BDLDTOC-MANDANT
Default: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for BDL_READ_JOB_STATUS

JOBNAME_OUT - Name of job where status is given

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

JOBNUMBER_OUT - Number of job where status is given

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

JOBSTATUS - Status of background job

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

EXCEPTIONS details

JOB_NOT_FOUND - For given job name and number no job was found

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for BDL_READ_JOB_STATUS 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_jobname  TYPE TBTCJOB-JOBNAME, "   SPACE
lv_jobname_out  TYPE TBTCO-JOBNAME, "   
lv_job_not_found  TYPE TBTCO, "   
lv_jobnumber  TYPE TBTCJOB-JOBCOUNT, "   '00000000'
lv_jobnumber_out  TYPE TBTCO-JOBCOUNT, "   
lv_jobstatus  TYPE TBTCO-STATUS, "   
lv_sessionnr  TYPE BDLDTOC-SESSIONNR, "   '0000000000'
lv_extension  TYPE BDLDTOC-MANDANT. "   '000'

  CALL FUNCTION 'BDL_READ_JOB_STATUS'  "Read job status via job name and job number
    EXPORTING
         JOBNAME = lv_jobname
         JOBNUMBER = lv_jobnumber
         SESSIONNR = lv_sessionnr
         EXTENSION = lv_extension
    IMPORTING
         JOBNAME_OUT = lv_jobname_out
         JOBNUMBER_OUT = lv_jobnumber_out
         JOBSTATUS = lv_jobstatus
    EXCEPTIONS
        JOB_NOT_FOUND = 1
. " BDL_READ_JOB_STATUS




ABAP code using 7.40 inline data declarations to call FM BDL_READ_JOB_STATUS

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 JOBNAME FROM TBTCJOB INTO @DATA(ld_jobname).
DATA(ld_jobname) = ' '.
 
"SELECT single JOBNAME FROM TBTCO INTO @DATA(ld_jobname_out).
 
 
"SELECT single JOBCOUNT FROM TBTCJOB INTO @DATA(ld_jobnumber).
DATA(ld_jobnumber) = '00000000'.
 
"SELECT single JOBCOUNT FROM TBTCO INTO @DATA(ld_jobnumber_out).
 
"SELECT single STATUS FROM TBTCO INTO @DATA(ld_jobstatus).
 
"SELECT single SESSIONNR FROM BDLDTOC INTO @DATA(ld_sessionnr).
DATA(ld_sessionnr) = '0000000000'.
 
"SELECT single MANDANT FROM BDLDTOC INTO @DATA(ld_extension).
DATA(ld_extension) = '000'.
 


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!