SAP BCONTACT_CREATE Function Module for
BCONTACT_CREATE is a standard bcontact create 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 create FM, simply by entering the name BCONTACT_CREATE 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_CREATE 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_CREATE'".
EXPORTING
* X_UPD_ONLINE = "
* X_NO_DIALOG = "
* X_AUTO = "
* X_PRGCONTEXT = ' ' "Call context - Program
* X_SUBCONTEXT = ' ' "Call context - Subcontext
* X_BPCCONFIG = ' ' "Contact configuration
* X_PARTNER = "Business Partner Number
* X_ALTPARTNER = "Contact Person
* X_PCATEGORY = ' ' "
IMPORTING
Y_DB_UPDATE = "
Y_NEW_BPCONTACT = "
Y_EXIT_TYPE = "
Y_NEW_BCONT = "
Y_CURFIELD = "
TABLES
* Y_NEW_BCONTO = "
EXCEPTIONS
EXISTING = 1 FOREIGN_LOCK = 2 NUMBER_ERROR = 3 GENERAL_FAULT = 4 INPUT_ERROR = 5 NOT_AUTHORIZED = 6
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_CREATE
X_UPD_ONLINE -
Data type: BCONTGEN-UPD_ONLINEOptional: Yes
Call by Reference: Yes
X_NO_DIALOG -
Data type: BCONTGEN-NO_DIALOGOptional: Yes
Call by Reference: Yes
X_AUTO -
Data type: BPC01_BCONTACT_AUTOOptional: Yes
Call by Reference: No ( called with pass by value option)
X_PRGCONTEXT - Call context - Program
Data type: BCONTCFIND-PRGCONTEXTDefault: SPACE
Optional: Yes
Call by Reference: Yes
X_SUBCONTEXT - Call context - Subcontext
Data type: BCONTCFIND-SUBCONTEXTDefault: SPACE
Optional: Yes
Call by Reference: Yes
X_BPCCONFIG - Contact configuration
Data type: BCONTCONF-BPCCONFIGDefault: SPACE
Optional: Yes
Call by Reference: Yes
X_PARTNER - Business Partner Number
Data type: BCONT-PARTNEROptional: Yes
Call by Reference: Yes
X_ALTPARTNER - Contact Person
Data type: BCONT-ALTPARTNEROptional: Yes
Call by Reference: Yes
X_PCATEGORY -
Data type: BCONT-PCATEGORYDefault: SPACE
Optional: Yes
Call by Reference: Yes
EXPORTING Parameters details for BCONTACT_CREATE
Y_DB_UPDATE -
Data type: BCONTGEN-DB_UPDATEOptional: No
Call by Reference: Yes
Y_NEW_BPCONTACT -
Data type: BCONT-BPCONTACTOptional: No
Call by Reference: Yes
Y_EXIT_TYPE -
Data type: BCONTGEN-EXIT_TYPEOptional: No
Call by Reference: Yes
Y_NEW_BCONT -
Data type: BCONTOptional: No
Call by Reference: Yes
Y_CURFIELD -
Data type: EENO_GEN-FELDNAMEOptional: No
Call by Reference: Yes
TABLES Parameters details for BCONTACT_CREATE
Y_NEW_BCONTO -
Data type: BCONT_OBJOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
EXISTING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FOREIGN_LOCK -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NUMBER_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
GENERAL_FAULT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INPUT_ERROR -
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_CREATE 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_existing | TYPE STRING, " | |||
| lv_y_db_update | TYPE BCONTGEN-DB_UPDATE, " | |||
| lv_x_upd_online | TYPE BCONTGEN-UPD_ONLINE, " | |||
| lt_y_new_bconto | TYPE STANDARD TABLE OF BCONT_OBJ, " | |||
| lv_x_no_dialog | TYPE BCONTGEN-NO_DIALOG, " | |||
| lv_foreign_lock | TYPE BCONTGEN, " | |||
| lv_y_new_bpcontact | TYPE BCONT-BPCONTACT, " | |||
| lv_x_auto | TYPE BPC01_BCONTACT_AUTO, " | |||
| lv_y_exit_type | TYPE BCONTGEN-EXIT_TYPE, " | |||
| lv_number_error | TYPE BCONTGEN, " | |||
| lv_y_new_bcont | TYPE BCONT, " | |||
| lv_x_prgcontext | TYPE BCONTCFIND-PRGCONTEXT, " SPACE | |||
| lv_general_fault | TYPE BCONTCFIND, " | |||
| lv_y_curfield | TYPE EENO_GEN-FELDNAME, " | |||
| lv_input_error | TYPE EENO_GEN, " | |||
| lv_x_subcontext | TYPE BCONTCFIND-SUBCONTEXT, " SPACE | |||
| lv_x_bpcconfig | TYPE BCONTCONF-BPCCONFIG, " SPACE | |||
| lv_not_authorized | TYPE BCONTCONF, " | |||
| lv_x_partner | TYPE BCONT-PARTNER, " | |||
| lv_x_altpartner | TYPE BCONT-ALTPARTNER, " | |||
| lv_x_pcategory | TYPE BCONT-PCATEGORY. " SPACE |
|   CALL FUNCTION 'BCONTACT_CREATE' " |
| EXPORTING | ||
| X_UPD_ONLINE | = lv_x_upd_online | |
| X_NO_DIALOG | = lv_x_no_dialog | |
| X_AUTO | = lv_x_auto | |
| X_PRGCONTEXT | = lv_x_prgcontext | |
| X_SUBCONTEXT | = lv_x_subcontext | |
| X_BPCCONFIG | = lv_x_bpcconfig | |
| X_PARTNER | = lv_x_partner | |
| X_ALTPARTNER | = lv_x_altpartner | |
| X_PCATEGORY | = lv_x_pcategory | |
| IMPORTING | ||
| Y_DB_UPDATE | = lv_y_db_update | |
| Y_NEW_BPCONTACT | = lv_y_new_bpcontact | |
| 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 | ||
| EXISTING = 1 | ||
| FOREIGN_LOCK = 2 | ||
| NUMBER_ERROR = 3 | ||
| GENERAL_FAULT = 4 | ||
| INPUT_ERROR = 5 | ||
| NOT_AUTHORIZED = 6 | ||
| . " BCONTACT_CREATE | ||
ABAP code using 7.40 inline data declarations to call FM BCONTACT_CREATE
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 DB_UPDATE FROM BCONTGEN INTO @DATA(ld_y_db_update). | ||||
| "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 BPCONTACT FROM BCONT INTO @DATA(ld_y_new_bpcontact). | ||||
| "SELECT single EXIT_TYPE FROM BCONTGEN INTO @DATA(ld_y_exit_type). | ||||
| "SELECT single PRGCONTEXT FROM BCONTCFIND INTO @DATA(ld_x_prgcontext). | ||||
| DATA(ld_x_prgcontext) | = ' '. | |||
| "SELECT single FELDNAME FROM EENO_GEN INTO @DATA(ld_y_curfield). | ||||
| "SELECT single SUBCONTEXT FROM BCONTCFIND INTO @DATA(ld_x_subcontext). | ||||
| DATA(ld_x_subcontext) | = ' '. | |||
| "SELECT single BPCCONFIG FROM BCONTCONF INTO @DATA(ld_x_bpcconfig). | ||||
| DATA(ld_x_bpcconfig) | = ' '. | |||
| "SELECT single PARTNER FROM BCONT INTO @DATA(ld_x_partner). | ||||
| "SELECT single ALTPARTNER FROM BCONT INTO @DATA(ld_x_altpartner). | ||||
| "SELECT single PCATEGORY FROM BCONT INTO @DATA(ld_x_pcategory). | ||||
| DATA(ld_x_pcategory) | = ' '. | |||
Search for further information about these or an SAP related objects