SAP BP_FIND_JOBS_WITH_PROGRAM Function Module for Find Background Request for a Specified Program
BP_FIND_JOBS_WITH_PROGRAM is a standard bp find jobs with program SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Find Background Request for a Specified Program 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 bp find jobs with program FM, simply by entering the name BP_FIND_JOBS_WITH_PROGRAM into the relevant SAP transaction such as SE37 or SE38.
Function Group: BTCH
Program Name: SAPLBTCH
Main Program: SAPLBTCH
Appliation area: S
Release date: 08-May-1996
Mode(Normal, Remote etc): Normal Function Module
Update:
Function BP_FIND_JOBS_WITH_PROGRAM 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_FIND_JOBS_WITH_PROGRAM'"Find Background Request for a Specified Program.
EXPORTING
* ABAP_PROGRAM_NAME = ' ' "ABAP Program Name
* ABAP_VARIANT_NAME = ' ' "ABAP Variant Name
* EXTERNAL_PROGRAM_NAME = ' ' "External Program Name
* DIALOG = ' ' "Dialog Box Yes / No
* STATUS = '*' "Job Status
TABLES
* JOBLIST = "Job List with Jobs Found
EXCEPTIONS
NO_JOBS_FOUND = 1 PROGRAM_SPECIFICATION_MISSING = 2 INVALID_DIALOG_TYPE = 3 JOB_FIND_CANCELED = 4
IMPORTING Parameters details for BP_FIND_JOBS_WITH_PROGRAM
ABAP_PROGRAM_NAME - ABAP Program Name
Data type: SY-REPIDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ABAP_VARIANT_NAME - ABAP Variant Name
Data type: RALDB-VARIANTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXTERNAL_PROGRAM_NAME - External Program Name
Data type: TBTCSTEP-PROGRAMDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
DIALOG - Dialog Box Yes / No
Data type: BTCH0000-CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
STATUS - Job Status
Data type: TBTCJOB-STATUSDefault: '*'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BP_FIND_JOBS_WITH_PROGRAM
JOBLIST - Job List with Jobs Found
Data type: TBTCJOBOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_JOBS_FOUND - No Jobs Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PROGRAM_SPECIFICATION_MISSING - Program to Search for Not Specified
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_DIALOG_TYPE - Invalid dialog type
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
JOB_FIND_CANCELED - Search Canceled by User (Dialog Box)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BP_FIND_JOBS_WITH_PROGRAM 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: | ||||
lt_joblist | TYPE STANDARD TABLE OF TBTCJOB, " | |||
lv_no_jobs_found | TYPE TBTCJOB, " | |||
lv_abap_program_name | TYPE SY-REPID, " SPACE | |||
lv_abap_variant_name | TYPE RALDB-VARIANT, " SPACE | |||
lv_program_specification_missing | TYPE RALDB, " | |||
lv_invalid_dialog_type | TYPE RALDB, " | |||
lv_external_program_name | TYPE TBTCSTEP-PROGRAM, " SPACE | |||
lv_dialog | TYPE BTCH0000-CHAR1, " SPACE | |||
lv_job_find_canceled | TYPE BTCH0000, " | |||
lv_status | TYPE TBTCJOB-STATUS. " '*' |
  CALL FUNCTION 'BP_FIND_JOBS_WITH_PROGRAM' "Find Background Request for a Specified Program |
EXPORTING | ||
ABAP_PROGRAM_NAME | = lv_abap_program_name | |
ABAP_VARIANT_NAME | = lv_abap_variant_name | |
EXTERNAL_PROGRAM_NAME | = lv_external_program_name | |
DIALOG | = lv_dialog | |
STATUS | = lv_status | |
TABLES | ||
JOBLIST | = lt_joblist | |
EXCEPTIONS | ||
NO_JOBS_FOUND = 1 | ||
PROGRAM_SPECIFICATION_MISSING = 2 | ||
INVALID_DIALOG_TYPE = 3 | ||
JOB_FIND_CANCELED = 4 | ||
. " BP_FIND_JOBS_WITH_PROGRAM |
ABAP code using 7.40 inline data declarations to call FM BP_FIND_JOBS_WITH_PROGRAM
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 REPID FROM SY INTO @DATA(ld_abap_program_name). | ||||
DATA(ld_abap_program_name) | = ' '. | |||
"SELECT single VARIANT FROM RALDB INTO @DATA(ld_abap_variant_name). | ||||
DATA(ld_abap_variant_name) | = ' '. | |||
"SELECT single PROGRAM FROM TBTCSTEP INTO @DATA(ld_external_program_name). | ||||
DATA(ld_external_program_name) | = ' '. | |||
"SELECT single CHAR1 FROM BTCH0000 INTO @DATA(ld_dialog). | ||||
DATA(ld_dialog) | = ' '. | |||
"SELECT single STATUS FROM TBTCJOB INTO @DATA(ld_status). | ||||
DATA(ld_status) | = '*'. | |||
Search for further information about these or an SAP related objects