SAP BCONTACT_OPEN Function Module for
BCONTACT_OPEN is a standard bcontact open 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 open FM, simply by entering the name BCONTACT_OPEN 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_OPEN 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_OPEN'".
EXPORTING
* X_BPCONTACT = "
* X_PRGCONTEXT = "
* X_SUBCONTEXT = "
* X_NO_ARCHIVE = "
* X_ARCHIVE_KEY = "SAP AS: Reference Structure for Archive Key/Archiveofs
* X_FULLSCREEN = "
X_WMODE = "working mode: 1=disp 2=chng 3=crea
* X_UPD_ONLINE = "Flag: update immediately in online
* X_NO_DIALOG = "Flag: suppress dialog
* X_AUTO = "Automation data
* X_DB_BCONT = "internal use only, if object already read
* X_NO_CHANGE = "Flag: Display->Change not allowed
* X_NO_OTHER = "Flag: other object allowed
* X_BPCCONFIG = "
IMPORTING
Y_OBJ = "Object Data
Y_AUTO = "Automation data
Y_WMODE = "
EXCEPTIONS
NOT_FOUND = 1 EXISTING = 2 FOREIGN_LOCK = 3 INVALID_KEY = 4 NUMBER_ERROR = 5 SYSTEM_ERROR = 6 NOT_AUTHORIZED = 7 CONFIGURATION = 8
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_OPEN
X_BPCONTACT -
Data type: BCONT-BPCONTACTOptional: Yes
Call by Reference: Yes
X_PRGCONTEXT -
Data type: BCONTCFIND-PRGCONTEXTOptional: Yes
Call by Reference: Yes
X_SUBCONTEXT -
Data type: BCONTCFIND-SUBCONTEXTOptional: Yes
Call by Reference: Yes
X_NO_ARCHIVE -
Data type: FLAGOptional: Yes
Call by Reference: Yes
X_ARCHIVE_KEY - SAP AS: Reference Structure for Archive Key/Archiveofs
Data type: AIND_ARKEYOptional: Yes
Call by Reference: Yes
X_FULLSCREEN -
Data type: XFELDOptional: Yes
Call by Reference: Yes
X_WMODE - working mode: 1=disp 2=chng 3=crea
Data type: BCONTGEN-WMODEOptional: No
Call by Reference: Yes
X_UPD_ONLINE - Flag: update immediately in online
Data type: BCONTGEN-UPD_ONLINEOptional: Yes
Call by Reference: Yes
X_NO_DIALOG - Flag: suppress dialog
Data type: BCONTGEN-NO_DIALOGOptional: Yes
Call by Reference: Yes
X_AUTO - Automation data
Data type: BPC01_BCONTACT_AUTOOptional: Yes
Call by Reference: No ( called with pass by value option)
X_DB_BCONT - internal use only, if object already read
Data type: BCONTOptional: Yes
Call by Reference: Yes
X_NO_CHANGE - Flag: Display->Change not allowed
Data type: BCONTGEN-NO_CHANGEOptional: Yes
Call by Reference: Yes
X_NO_OTHER - Flag: other object allowed
Data type: BCONTGEN-NO_OTHEROptional: Yes
Call by Reference: Yes
X_BPCCONFIG -
Data type: BCONTCONF-BPCCONFIGOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for BCONTACT_OPEN
Y_OBJ - Object Data
Data type: BPC01_BCONTACTOptional: No
Call by Reference: Yes
Y_AUTO - Automation data
Data type: BPC01_BCONTACT_AUTOOptional: No
Call by Reference: Yes
Y_WMODE -
Data type: BCONTGEN-WMODEOptional: No
Call by Reference: Yes
EXCEPTIONS details
NOT_FOUND - Object Not Found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
EXISTING - Object Already Exists
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
FOREIGN_LOCK - Object is currently locked
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_KEY - Invalid Object Key
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NUMBER_ERROR - Error in number assignment
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SYSTEM_ERROR - General 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)
CONFIGURATION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BCONTACT_OPEN 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_y_obj | TYPE BPC01_BCONTACT, " | |||
| lv_not_found | TYPE BPC01_BCONTACT, " | |||
| lv_x_bpcontact | TYPE BCONT-BPCONTACT, " | |||
| lv_x_prgcontext | TYPE BCONTCFIND-PRGCONTEXT, " | |||
| lv_x_subcontext | TYPE BCONTCFIND-SUBCONTEXT, " | |||
| lv_x_no_archive | TYPE FLAG, " | |||
| lv_x_archive_key | TYPE AIND_ARKEY, " | |||
| lv_x_fullscreen | TYPE XFELD, " | |||
| lv_y_auto | TYPE BPC01_BCONTACT_AUTO, " | |||
| lv_x_wmode | TYPE BCONTGEN-WMODE, " | |||
| lv_existing | TYPE BCONTGEN, " | |||
| lv_y_wmode | TYPE BCONTGEN-WMODE, " | |||
| lv_foreign_lock | TYPE BCONTGEN, " | |||
| lv_x_upd_online | TYPE BCONTGEN-UPD_ONLINE, " | |||
| lv_invalid_key | TYPE BCONTGEN, " | |||
| lv_x_no_dialog | TYPE BCONTGEN-NO_DIALOG, " | |||
| lv_x_auto | TYPE BPC01_BCONTACT_AUTO, " | |||
| lv_number_error | TYPE BPC01_BCONTACT_AUTO, " | |||
| lv_x_db_bcont | TYPE BCONT, " | |||
| lv_system_error | TYPE BCONT, " | |||
| lv_x_no_change | TYPE BCONTGEN-NO_CHANGE, " | |||
| lv_not_authorized | TYPE BCONTGEN, " | |||
| lv_x_no_other | TYPE BCONTGEN-NO_OTHER, " | |||
| lv_configuration | TYPE BCONTGEN, " | |||
| lv_x_bpcconfig | TYPE BCONTCONF-BPCCONFIG. " |
|   CALL FUNCTION 'BCONTACT_OPEN' " |
| EXPORTING | ||
| X_BPCONTACT | = lv_x_bpcontact | |
| X_PRGCONTEXT | = lv_x_prgcontext | |
| X_SUBCONTEXT | = lv_x_subcontext | |
| X_NO_ARCHIVE | = lv_x_no_archive | |
| X_ARCHIVE_KEY | = lv_x_archive_key | |
| X_FULLSCREEN | = lv_x_fullscreen | |
| X_WMODE | = lv_x_wmode | |
| X_UPD_ONLINE | = lv_x_upd_online | |
| X_NO_DIALOG | = lv_x_no_dialog | |
| X_AUTO | = lv_x_auto | |
| X_DB_BCONT | = lv_x_db_bcont | |
| X_NO_CHANGE | = lv_x_no_change | |
| X_NO_OTHER | = lv_x_no_other | |
| X_BPCCONFIG | = lv_x_bpcconfig | |
| IMPORTING | ||
| Y_OBJ | = lv_y_obj | |
| Y_AUTO | = lv_y_auto | |
| Y_WMODE | = lv_y_wmode | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| EXISTING = 2 | ||
| FOREIGN_LOCK = 3 | ||
| INVALID_KEY = 4 | ||
| NUMBER_ERROR = 5 | ||
| SYSTEM_ERROR = 6 | ||
| NOT_AUTHORIZED = 7 | ||
| CONFIGURATION = 8 | ||
| . " BCONTACT_OPEN | ||
ABAP code using 7.40 inline data declarations to call FM BCONTACT_OPEN
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 PRGCONTEXT FROM BCONTCFIND INTO @DATA(ld_x_prgcontext). | ||||
| "SELECT single SUBCONTEXT FROM BCONTCFIND INTO @DATA(ld_x_subcontext). | ||||
| "SELECT single WMODE FROM BCONTGEN INTO @DATA(ld_x_wmode). | ||||
| "SELECT single WMODE FROM BCONTGEN INTO @DATA(ld_y_wmode). | ||||
| "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 NO_CHANGE FROM BCONTGEN INTO @DATA(ld_x_no_change). | ||||
| "SELECT single NO_OTHER FROM BCONTGEN INTO @DATA(ld_x_no_other). | ||||
| "SELECT single BPCCONFIG FROM BCONTCONF INTO @DATA(ld_x_bpcconfig). | ||||
Search for further information about these or an SAP related objects