SAP BP_JOB_SELECT Function Module for Select Background Requests
BP_JOB_SELECT is a standard bp job select SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Select Background Requests 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 job select FM, simply by entering the name BP_JOB_SELECT 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_JOB_SELECT 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_SELECT'"Select Background Requests.
EXPORTING
JOBSELECT_DIALOG = "Dialog Box Yes(Y) / No(N)
* JOBSEL_PARAM_IN = ' ' "Selection Parameters (Input)
* ENDDATE = ' ' "
* ENDTIME = ' ' "
* SELECTION = 'AL' "Single-Character Flag
* ADK_MODE = ' ' "Reference type CHAR1 for background processing
IMPORTING
JOBSEL_PARAM_OUT = "Selection Parameters (Output)
LOCAL_CLIENT = "Reference type CHAR1 for background processing
NR_OF_JOBS_FOUND = "
CHANGING
* ERROR_CODE = "Special Additional Error Code
TABLES
JOBSELECT_JOBLIST = "Selected Jobs
* JOBNAME_EXT_SEL = "Batch selection range for job name
* USERNAME_EXT_SEL = "Batch selection range for user name
EXCEPTIONS
INVALID_DIALOG_TYPE = 1 JOBNAME_MISSING = 2 NO_JOBS_FOUND = 3 SELECTION_CANCELED = 4 USERNAME_MISSING = 5
IMPORTING Parameters details for BP_JOB_SELECT
JOBSELECT_DIALOG - Dialog Box Yes(Y) / No(N)
Data type: BTCH0000-CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
JOBSEL_PARAM_IN - Selection Parameters (Input)
Data type: BTCSELECTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDATE -
Data type: TBTCO-ENDDATEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDTIME -
Data type: TBTCO-ENDTIMEDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SELECTION - Single-Character Flag
Data type: CHAR2Default: 'AL'
Optional: Yes
Call by Reference: No ( called with pass by value option)
ADK_MODE - Reference type CHAR1 for background processing
Data type: BTCH0000-CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BP_JOB_SELECT
JOBSEL_PARAM_OUT - Selection Parameters (Output)
Data type: BTCSELECTOptional: No
Call by Reference: No ( called with pass by value option)
LOCAL_CLIENT - Reference type CHAR1 for background processing
Data type: BTCH0000-CHAR1Optional: No
Call by Reference: No ( called with pass by value option)
NR_OF_JOBS_FOUND -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for BP_JOB_SELECT
ERROR_CODE - Special Additional Error Code
Data type: IOptional: Yes
Call by Reference: Yes
TABLES Parameters details for BP_JOB_SELECT
JOBSELECT_JOBLIST - Selected Jobs
Data type: TBTCJOBOptional: No
Call by Reference: No ( called with pass by value option)
JOBNAME_EXT_SEL - Batch selection range for job name
Data type: NJRANGEOptional: Yes
Call by Reference: Yes
USERNAME_EXT_SEL - Batch selection range for user name
Data type: UNRANGEOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
INVALID_DIALOG_TYPE - Invalid dialog type
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
JOBNAME_MISSING - Job Name is Missing (Wildcards Allowed)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_JOBS_FOUND - No Jobs Found That Match Selection Criteria
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SELECTION_CANCELED - User Cancels Selection
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
USERNAME_MISSING - User Name Missing (Wildcards Allowed)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BP_JOB_SELECT 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_error_code | TYPE I, " | |||
lv_jobselect_dialog | TYPE BTCH0000-CHAR1, " | |||
lv_jobsel_param_out | TYPE BTCSELECT, " | |||
lt_jobselect_joblist | TYPE STANDARD TABLE OF TBTCJOB, " | |||
lv_invalid_dialog_type | TYPE TBTCJOB, " | |||
lv_local_client | TYPE BTCH0000-CHAR1, " | |||
lt_jobname_ext_sel | TYPE STANDARD TABLE OF NJRANGE, " | |||
lv_jobname_missing | TYPE NJRANGE, " | |||
lv_jobsel_param_in | TYPE BTCSELECT, " SPACE | |||
lv_enddate | TYPE TBTCO-ENDDATE, " ' ' | |||
lv_no_jobs_found | TYPE TBTCO, " | |||
lv_nr_of_jobs_found | TYPE I, " | |||
lt_username_ext_sel | TYPE STANDARD TABLE OF UNRANGE, " | |||
lv_endtime | TYPE TBTCO-ENDTIME, " ' ' | |||
lv_selection_canceled | TYPE TBTCO, " | |||
lv_selection | TYPE CHAR2, " 'AL' | |||
lv_username_missing | TYPE CHAR2, " | |||
lv_adk_mode | TYPE BTCH0000-CHAR1. " SPACE |
  CALL FUNCTION 'BP_JOB_SELECT' "Select Background Requests |
EXPORTING | ||
JOBSELECT_DIALOG | = lv_jobselect_dialog | |
JOBSEL_PARAM_IN | = lv_jobsel_param_in | |
ENDDATE | = lv_enddate | |
ENDTIME | = lv_endtime | |
SELECTION | = lv_selection | |
ADK_MODE | = lv_adk_mode | |
IMPORTING | ||
JOBSEL_PARAM_OUT | = lv_jobsel_param_out | |
LOCAL_CLIENT | = lv_local_client | |
NR_OF_JOBS_FOUND | = lv_nr_of_jobs_found | |
CHANGING | ||
ERROR_CODE | = lv_error_code | |
TABLES | ||
JOBSELECT_JOBLIST | = lt_jobselect_joblist | |
JOBNAME_EXT_SEL | = lt_jobname_ext_sel | |
USERNAME_EXT_SEL | = lt_username_ext_sel | |
EXCEPTIONS | ||
INVALID_DIALOG_TYPE = 1 | ||
JOBNAME_MISSING = 2 | ||
NO_JOBS_FOUND = 3 | ||
SELECTION_CANCELED = 4 | ||
USERNAME_MISSING = 5 | ||
. " BP_JOB_SELECT |
ABAP code using 7.40 inline data declarations to call FM BP_JOB_SELECT
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_jobselect_dialog). | ||||
"SELECT single CHAR1 FROM BTCH0000 INTO @DATA(ld_local_client). | ||||
DATA(ld_jobsel_param_in) | = ' '. | |||
"SELECT single ENDDATE FROM TBTCO INTO @DATA(ld_enddate). | ||||
DATA(ld_enddate) | = ' '. | |||
"SELECT single ENDTIME FROM TBTCO INTO @DATA(ld_endtime). | ||||
DATA(ld_endtime) | = ' '. | |||
DATA(ld_selection) | = 'AL'. | |||
"SELECT single CHAR1 FROM BTCH0000 INTO @DATA(ld_adk_mode). | ||||
DATA(ld_adk_mode) | = ' '. | |||
Search for further information about these or an SAP related objects