SAP BCONTACT_CHANGE Function Module for
BCONTACT_CHANGE is a standard bcontact change SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 bcontact change FM, simply by entering the name BCONTACT_CHANGE 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 BCONTACT_CHANGE 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 'BCONTACT_CHANGE'".
EXPORTING
X_BPCONTACT = "Object key
* X_UPD_ONLINE = "Indicator: update immediately online
* X_NO_DIALOG = "Indicator: suppress dialog
* X_AUTO = "Automation data
* X_OBJ = "Object data (parameter of OPEN-Module)
* X_NO_OTHER = "Indicator: no other contract allowed
* X_BPCCONFIG = ' ' "
* X_PRGCONTEXT = ' ' "
* X_SUBCONTEXT = ' ' "
IMPORTING
Y_DB_UPDATE = "Indicator: data change
Y_EXIT_TYPE = "Return Mode
Y_NEW_BCONT = "New Contact Data
Y_CURFIELD = "
TABLES
* Y_NEW_BCONTO = "
EXCEPTIONS
NOT_FOUND = 1 FOREIGN_LOCK = 2 GENERAL_FAULT = 3 INPUT_ERROR = 4 NOT_AUTHORIZED = 5
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 BCONTACT_CHANGE
X_BPCONTACT - Object key
Data type: BCONT-BPCONTACTOptional: No
Call by Reference: No ( called with pass by value option)
X_UPD_ONLINE - Indicator: update immediately online
Data type: BCONTGEN-UPD_ONLINEOptional: Yes
Call by Reference: No ( called with pass by value option)
X_NO_DIALOG - Indicator: suppress dialog
Data type: BCONTGEN-NO_DIALOGOptional: Yes
Call by Reference: No ( called with pass by value option)
X_AUTO - Automation data
Data type: BPC01_BCONTACT_AUTOOptional: Yes
Call by Reference: No ( called with pass by value option)
X_OBJ - Object data (parameter of OPEN-Module)
Data type: BPC01_BCONTACTOptional: Yes
Call by Reference: No ( called with pass by value option)
X_NO_OTHER - Indicator: no other contract allowed
Data type: BCONTGEN-NO_OTHEROptional: Yes
Call by Reference: No ( called with pass by value option)
X_BPCCONFIG -
Data type: BCONTCONF-BPCCONFIGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_PRGCONTEXT -
Data type: BCONTCFIND-PRGCONTEXTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_SUBCONTEXT -
Data type: BCONTCFIND-SUBCONTEXTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BCONTACT_CHANGE
Y_DB_UPDATE - Indicator: data change
Data type: BCONTGEN-DB_UPDATEOptional: No
Call by Reference: No ( called with pass by value option)
Y_EXIT_TYPE - Return Mode
Data type: BCONTGEN-EXIT_TYPEOptional: No
Call by Reference: No ( called with pass by value option)
Y_NEW_BCONT - New Contact Data
Data type: BCONTOptional: No
Call by Reference: No ( called with pass by value option)
Y_CURFIELD -
Data type: EENO_GEN-FELDNAMEOptional: No
Call by Reference: Yes
TABLES Parameters details for BCONTACT_CHANGE
Y_NEW_BCONTO -
Data type: BCONTOOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND - Object not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FOREIGN_LOCK - Object Currently Locked
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
GENERAL_FAULT - Other
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INPUT_ERROR - Error During Entry Check
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_AUTHORIZED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BCONTACT_CHANGE 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_not_found | TYPE STRING, " | |||
| lv_x_bpcontact | TYPE BCONT-BPCONTACT, " | |||
| lv_y_db_update | TYPE BCONTGEN-DB_UPDATE, " | |||
| lt_y_new_bconto | TYPE STANDARD TABLE OF BCONTO, " | |||
| lv_y_exit_type | TYPE BCONTGEN-EXIT_TYPE, " | |||
| lv_foreign_lock | TYPE BCONTGEN, " | |||
| lv_x_upd_online | TYPE BCONTGEN-UPD_ONLINE, " | |||
| lv_x_no_dialog | TYPE BCONTGEN-NO_DIALOG, " | |||
| lv_y_new_bcont | TYPE BCONT, " | |||
| lv_general_fault | TYPE BCONT, " | |||
| lv_x_auto | TYPE BPC01_BCONTACT_AUTO, " | |||
| lv_y_curfield | TYPE EENO_GEN-FELDNAME, " | |||
| lv_input_error | TYPE EENO_GEN, " | |||
| lv_x_obj | TYPE BPC01_BCONTACT, " | |||
| lv_not_authorized | TYPE BPC01_BCONTACT, " | |||
| lv_x_no_other | TYPE BCONTGEN-NO_OTHER, " | |||
| lv_x_bpcconfig | TYPE BCONTCONF-BPCCONFIG, " SPACE | |||
| lv_x_prgcontext | TYPE BCONTCFIND-PRGCONTEXT, " SPACE | |||
| lv_x_subcontext | TYPE BCONTCFIND-SUBCONTEXT. " SPACE |
|   CALL FUNCTION 'BCONTACT_CHANGE' " |
| EXPORTING | ||
| X_BPCONTACT | = lv_x_bpcontact | |
| X_UPD_ONLINE | = lv_x_upd_online | |
| X_NO_DIALOG | = lv_x_no_dialog | |
| X_AUTO | = lv_x_auto | |
| X_OBJ | = lv_x_obj | |
| X_NO_OTHER | = lv_x_no_other | |
| X_BPCCONFIG | = lv_x_bpcconfig | |
| X_PRGCONTEXT | = lv_x_prgcontext | |
| X_SUBCONTEXT | = lv_x_subcontext | |
| IMPORTING | ||
| Y_DB_UPDATE | = lv_y_db_update | |
| Y_EXIT_TYPE | = lv_y_exit_type | |
| Y_NEW_BCONT | = lv_y_new_bcont | |
| Y_CURFIELD | = lv_y_curfield | |
| TABLES | ||
| Y_NEW_BCONTO | = lt_y_new_bconto | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| FOREIGN_LOCK = 2 | ||
| GENERAL_FAULT = 3 | ||
| INPUT_ERROR = 4 | ||
| NOT_AUTHORIZED = 5 | ||
| . " BCONTACT_CHANGE | ||
ABAP code using 7.40 inline data declarations to call FM BCONTACT_CHANGE
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 BPCONTACT FROM BCONT INTO @DATA(ld_x_bpcontact). | ||||
| "SELECT single DB_UPDATE FROM BCONTGEN INTO @DATA(ld_y_db_update). | ||||
| "SELECT single EXIT_TYPE FROM BCONTGEN INTO @DATA(ld_y_exit_type). | ||||
| "SELECT single UPD_ONLINE FROM BCONTGEN INTO @DATA(ld_x_upd_online). | ||||
| "SELECT single NO_DIALOG FROM BCONTGEN INTO @DATA(ld_x_no_dialog). | ||||
| "SELECT single FELDNAME FROM EENO_GEN INTO @DATA(ld_y_curfield). | ||||
| "SELECT single NO_OTHER FROM BCONTGEN INTO @DATA(ld_x_no_other). | ||||
| "SELECT single BPCCONFIG FROM BCONTCONF INTO @DATA(ld_x_bpcconfig). | ||||
| DATA(ld_x_bpcconfig) | = ' '. | |||
| "SELECT single PRGCONTEXT FROM BCONTCFIND INTO @DATA(ld_x_prgcontext). | ||||
| DATA(ld_x_prgcontext) | = ' '. | |||
| "SELECT single SUBCONTEXT FROM BCONTCFIND INTO @DATA(ld_x_subcontext). | ||||
| DATA(ld_x_subcontext) | = ' '. | |||
Search for further information about these or an SAP related objects