SAP BPCT_NUMBER_GET Function Module for INTERNAL: Number Assignment in IS-U
BPCT_NUMBER_GET is a standard bpct number get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for INTERNAL: Number Assignment in IS-U 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 bpct number get FM, simply by entering the name BPCT_NUMBER_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: BPT1
Program Name: SAPLBPT1
Main Program: SAPLBPT1
Appliation area: E
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BPCT_NUMBER_GET 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 'BPCT_NUMBER_GET'"INTERNAL: Number Assignment in IS-U.
EXPORTING
* NR_RANGE_NUMBER = "
OBJECT = "Number Range Object
* QUANTITY = '1' "Number of Numbers
* NUMBER_IN = "
* UPD_KZ = 'X' "
* NO_MESSAGE = "
IMPORTING
NUMBER = "
QUANTITY = "Number of Numbers
NR_RANGE_NUMBER = "
EXCEPTIONS
NO_RANGE_NUMBER_FOUND = 1 NUMBER_NOT_IN_INTERVALL = 2 INTERVAL_NOT_FOUND = 3 QUANTITY_IS_0 = 4 INTERVAL_TE009_INCONSISTENT = 5 NUMBER_INVALID = 6 INTERVAL_OVERFLOW = 7
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLBPT1_001 Customer-Specific Checks of Screen Fields
EXIT_SAPLBPT1_002 User-Defined Data Preassignment for Screen Fields
EXIT_SAPLBPT1_003 User-Exit PBO: PBO für Customer Subscreen
EXIT_SAPLBPT1_004 User-Exit PAI_BEFORE: Prepares CALL SUBSCREEN PAI
EXIT_SAPLBPT1_005 User-Exit PAI_AFTER: Closes CALL SUBSCREEN PAI
EXIT_SAPLBPT1_006 User-Exit OPEN: Opens Processing of Customer Object
EXIT_SAPLBPT1_007 User-Exit INPUT: Checks and Transfers Entries on Customer Subscreen
EXIT_SAPLBPT1_008 User Exit PREPARE_CLOSE: Prepares Closing of Customer Data
EXIT_SAPLBPT1_009 User Exit ACTION: Actions of Customer Subscreens
EXIT_SAPLBPT1_010 User-Exit CLOSE: Closes Processing of Customer Data
IMPORTING Parameters details for BPCT_NUMBER_GET
NR_RANGE_NUMBER -
Data type: INRI-NRRANGENROptional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT - Number Range Object
Data type: INRI-OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
QUANTITY - Number of Numbers
Data type: INRI-QUANTITYDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NUMBER_IN -
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
UPD_KZ -
Data type: SY-BATCHDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_MESSAGE -
Data type: SY-BATCHOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BPCT_NUMBER_GET
NUMBER -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
QUANTITY - Number of Numbers
Data type: INRI-QUANTITYOptional: No
Call by Reference: No ( called with pass by value option)
NR_RANGE_NUMBER -
Data type: INRI-NRRANGENROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_RANGE_NUMBER_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NUMBER_NOT_IN_INTERVALL - The number does not lie within the number range interval
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERVAL_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
QUANTITY_IS_0 -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERVAL_TE009_INCONSISTENT - is no longer used
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NUMBER_INVALID -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERVAL_OVERFLOW - Interval used up. Change not possible.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BPCT_NUMBER_GET 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_number | TYPE STRING, " | |||
| lv_nr_range_number | TYPE INRI-NRRANGENR, " | |||
| lv_no_range_number_found | TYPE INRI, " | |||
| lv_object | TYPE INRI-OBJECT, " | |||
| lv_quantity | TYPE INRI-QUANTITY, " | |||
| lv_number_not_in_intervall | TYPE INRI, " | |||
| lv_quantity | TYPE INRI-QUANTITY, " '1' | |||
| lv_nr_range_number | TYPE INRI-NRRANGENR, " | |||
| lv_interval_not_found | TYPE INRI, " | |||
| lv_number_in | TYPE INRI, " | |||
| lv_quantity_is_0 | TYPE INRI, " | |||
| lv_upd_kz | TYPE SY-BATCH, " 'X' | |||
| lv_interval_te009_inconsistent | TYPE SY, " | |||
| lv_no_message | TYPE SY-BATCH, " | |||
| lv_number_invalid | TYPE SY, " | |||
| lv_interval_overflow | TYPE SY. " |
|   CALL FUNCTION 'BPCT_NUMBER_GET' "INTERNAL: Number Assignment in IS-U |
| EXPORTING | ||
| NR_RANGE_NUMBER | = lv_nr_range_number | |
| OBJECT | = lv_object | |
| QUANTITY | = lv_quantity | |
| NUMBER_IN | = lv_number_in | |
| UPD_KZ | = lv_upd_kz | |
| NO_MESSAGE | = lv_no_message | |
| IMPORTING | ||
| NUMBER | = lv_number | |
| QUANTITY | = lv_quantity | |
| NR_RANGE_NUMBER | = lv_nr_range_number | |
| EXCEPTIONS | ||
| NO_RANGE_NUMBER_FOUND = 1 | ||
| NUMBER_NOT_IN_INTERVALL = 2 | ||
| INTERVAL_NOT_FOUND = 3 | ||
| QUANTITY_IS_0 = 4 | ||
| INTERVAL_TE009_INCONSISTENT = 5 | ||
| NUMBER_INVALID = 6 | ||
| INTERVAL_OVERFLOW = 7 | ||
| . " BPCT_NUMBER_GET | ||
ABAP code using 7.40 inline data declarations to call FM BPCT_NUMBER_GET
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 NRRANGENR FROM INRI INTO @DATA(ld_nr_range_number). | ||||
| "SELECT single OBJECT FROM INRI INTO @DATA(ld_object). | ||||
| "SELECT single QUANTITY FROM INRI INTO @DATA(ld_quantity). | ||||
| "SELECT single QUANTITY FROM INRI INTO @DATA(ld_quantity). | ||||
| DATA(ld_quantity) | = '1'. | |||
| "SELECT single NRRANGENR FROM INRI INTO @DATA(ld_nr_range_number). | ||||
| "SELECT single BATCH FROM SY INTO @DATA(ld_upd_kz). | ||||
| DATA(ld_upd_kz) | = 'X'. | |||
| "SELECT single BATCH FROM SY INTO @DATA(ld_no_message). | ||||
Search for further information about these or an SAP related objects