SAP BP_JOB_SELECT_SM37B Function Module for Select Background Requests
BP_JOB_SELECT_SM37B is a standard bp job select sm37b 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 sm37b FM, simply by entering the name BP_JOB_SELECT_SM37B into the relevant SAP transaction such as SE37 or SE38.
Function Group: BTCH
Program Name: SAPLBTCH
Main Program: SAPLBTCH
Appliation area: S
Release date: 11-Nov-1999
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BP_JOB_SELECT_SM37B 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_SM37B'"Select Background Requests.
EXPORTING
JOBSELECT_DIALOG = "Dialog Box Yes(Y) / No(N)
* JOBSEL_PARAM_IN = ' ' "Selection Parameters (Input)
* ENDDATE = ' ' "
* ENDTIME = ' ' "
IMPORTING
JOBSEL_PARAM_OUT = "Selection Parameters (Output)
TABLES
* JOBSELECT_JOBLIST = "Selected Jobs
JOBSELECT_JOBLIST_B = "Selected Jobs with Program 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_SM37B
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)
EXPORTING Parameters details for BP_JOB_SELECT_SM37B
JOBSEL_PARAM_OUT - Selection Parameters (Output)
Data type: BTCSELECTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BP_JOB_SELECT_SM37B
JOBSELECT_JOBLIST - Selected Jobs
Data type: TBTCJOBOptional: Yes
Call by Reference: Yes
JOBSELECT_JOBLIST_B - Selected Jobs with Program Name
Data type: TBTCJOB_BKOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
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_SM37B 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_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_jobname_missing | TYPE TBTCJOB, " | |||
| lv_jobsel_param_in | TYPE BTCSELECT, " SPACE | |||
| lt_jobselect_joblist_b | TYPE STANDARD TABLE OF TBTCJOB_BK, " | |||
| lv_enddate | TYPE TBTCO-ENDDATE, " ' ' | |||
| lv_no_jobs_found | TYPE TBTCO, " | |||
| lv_endtime | TYPE TBTCO-ENDTIME, " ' ' | |||
| lv_selection_canceled | TYPE TBTCO, " | |||
| lv_username_missing | TYPE TBTCO. " |
|   CALL FUNCTION 'BP_JOB_SELECT_SM37B' "Select Background Requests |
| EXPORTING | ||
| JOBSELECT_DIALOG | = lv_jobselect_dialog | |
| JOBSEL_PARAM_IN | = lv_jobsel_param_in | |
| ENDDATE | = lv_enddate | |
| ENDTIME | = lv_endtime | |
| IMPORTING | ||
| JOBSEL_PARAM_OUT | = lv_jobsel_param_out | |
| TABLES | ||
| JOBSELECT_JOBLIST | = lt_jobselect_joblist | |
| JOBSELECT_JOBLIST_B | = lt_jobselect_joblist_b | |
| EXCEPTIONS | ||
| INVALID_DIALOG_TYPE = 1 | ||
| JOBNAME_MISSING = 2 | ||
| NO_JOBS_FOUND = 3 | ||
| SELECTION_CANCELED = 4 | ||
| USERNAME_MISSING = 5 | ||
| . " BP_JOB_SELECT_SM37B | ||
ABAP code using 7.40 inline data declarations to call FM BP_JOB_SELECT_SM37B
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). | ||||
| 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) | = ' '. | |||
Search for further information about these or an SAP related objects