SAP BCONTACT_CLOSE Function Module for









BCONTACT_CLOSE is a standard bcontact close 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 close FM, simply by entering the name BCONTACT_CLOSE 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_CLOSE 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_CLOSE'"
IMPORTING
Y_DB_UPDATE = "Indicator: changes made
Y_EXIT_TYPE = "Termination Function Code: BACK/EXIT/CANC
Y_NEW_BCONT = "New object, if it is created
Y_CURFIELD = "

CHANGING
XY_OBJ = "Object data

TABLES
* Y_NEW_BCONTO = "
.




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

EXPORTING Parameters details for BCONTACT_CLOSE

Y_DB_UPDATE - Indicator: changes made

Data type: BCONTGEN-DB_UPDATE
Optional: No
Call by Reference: No ( called with pass by value option)

Y_EXIT_TYPE - Termination Function Code: BACK/EXIT/CANC

Data type: BCONTGEN-EXIT_TYPE
Optional: No
Call by Reference: No ( called with pass by value option)

Y_NEW_BCONT - New object, if it is created

Data type: BCONT
Optional: No
Call by Reference: No ( called with pass by value option)

Y_CURFIELD -

Data type: EENO_GEN-FELDNAME
Optional: No
Call by Reference: No ( called with pass by value option)

CHANGING Parameters details for BCONTACT_CLOSE

XY_OBJ - Object data

Data type: BPC01_BCONTACT
Optional: No
Call by Reference: Yes

TABLES Parameters details for BCONTACT_CLOSE

Y_NEW_BCONTO -

Data type: BCONTO
Optional: Yes
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for BCONTACT_CLOSE 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_xy_obj  TYPE BPC01_BCONTACT, "   
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_y_new_bcont  TYPE BCONT, "   
lv_y_curfield  TYPE EENO_GEN-FELDNAME. "   

  CALL FUNCTION 'BCONTACT_CLOSE'  "
    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
    CHANGING
         XY_OBJ = lv_xy_obj
    TABLES
         Y_NEW_BCONTO = lt_y_new_bconto
. " BCONTACT_CLOSE




ABAP code using 7.40 inline data declarations to call FM BCONTACT_CLOSE

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 EXIT_TYPE FROM BCONTGEN INTO @DATA(ld_y_exit_type).
 
 
"SELECT single FELDNAME FROM EENO_GEN INTO @DATA(ld_y_curfield).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!