SAP Function Modules

BCONTACT_OPEN SAP Function module







BCONTACT_OPEN is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BCONTACT_OPEN into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BPT1
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM BCONTACT_OPEN - BCONTACT OPEN





CALL FUNCTION 'BCONTACT_OPEN' "
  EXPORTING
*   x_bpcontact =               " bcont-bpcontact
    x_wmode =                   " bcontgen-wmode  working mode: 1=disp 2=chng 3=crea
*   x_upd_online =              " bcontgen-upd_online  Flag: update immediately in online
*   x_no_dialog =               " bcontgen-no_dialog  Flag: suppress dialog
*   x_auto =                    " bpc01_bcontact_auto  Automation data
*   x_db_bcont =                " bcont         internal use only, if object already read
*   x_no_change =               " bcontgen-no_change  Flag: Display->Change not allowed
*   x_no_other =                " bcontgen-no_other  Flag: other object allowed
*   x_bpcconfig =               " bcontconf-bpcconfig
*   x_prgcontext =              " bcontcfind-prgcontext
*   x_subcontext =              " bcontcfind-subcontext
*   x_no_archive =              " flag
*   x_archive_key =             " aind_arkey    SAP AS: Reference Structure for Archive Key/Archiveofs
*   x_fullscreen =              " xfeld
  IMPORTING
    y_obj =                     " bpc01_bcontact  Object Data
    y_auto =                    " bpc01_bcontact_auto  Automation data
    y_wmode =                   " bcontgen-wmode
  EXCEPTIONS
    NOT_FOUND = 1               "               Object Not Found
    EXISTING = 2                "               Object Already Exists
    FOREIGN_LOCK = 3            "               Object is currently locked
    INVALID_KEY = 4             "               Invalid Object Key
    NUMBER_ERROR = 5            "               Error in number assignment
    SYSTEM_ERROR = 6            "               General Error
    NOT_AUTHORIZED = 7          "
    CONFIGURATION = 8           "
    .  "  BCONTACT_OPEN

ABAP code example for Function Module BCONTACT_OPEN





The ABAP code below is a full code listing to execute function module BCONTACT_OPEN including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_y_obj  TYPE BPC01_BCONTACT ,
ld_y_auto  TYPE BPC01_BCONTACT_AUTO ,
ld_y_wmode  TYPE BCONTGEN-WMODE .


SELECT single BPCONTACT
FROM BCONT
INTO @DATA(ld_x_bpcontact).


DATA(ld_x_wmode) = some text here

DATA(ld_x_upd_online) = some text here

DATA(ld_x_no_dialog) = some text here
DATA(ld_x_auto) = 'Check type of data required'.
DATA(ld_x_db_bcont) = 'Check type of data required'.

DATA(ld_x_no_change) = some text here

DATA(ld_x_no_other) = some text here

SELECT single BPCCONFIG
FROM BCONTCONF
INTO @DATA(ld_x_bpcconfig).


SELECT single PRGCONTEXT
FROM BCONTCFIND
INTO @DATA(ld_x_prgcontext).


SELECT single SUBCONTEXT
FROM BCONTCFIND
INTO @DATA(ld_x_subcontext).

DATA(ld_x_no_archive) = 'Check type of data required'.
DATA(ld_x_archive_key) = 'Check type of data required'.
DATA(ld_x_fullscreen) = 'Check type of data required'. . CALL FUNCTION 'BCONTACT_OPEN' EXPORTING * x_bpcontact = ld_x_bpcontact x_wmode = ld_x_wmode * x_upd_online = ld_x_upd_online * x_no_dialog = ld_x_no_dialog * x_auto = ld_x_auto * x_db_bcont = ld_x_db_bcont * x_no_change = ld_x_no_change * x_no_other = ld_x_no_other * x_bpcconfig = ld_x_bpcconfig * x_prgcontext = ld_x_prgcontext * x_subcontext = ld_x_subcontext * x_no_archive = ld_x_no_archive * x_archive_key = ld_x_archive_key * x_fullscreen = ld_x_fullscreen IMPORTING y_obj = ld_y_obj y_auto = ld_y_auto y_wmode = ld_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
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 7. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 8. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_y_obj  TYPE BPC01_BCONTACT ,
ld_x_bpcontact  TYPE BCONT-BPCONTACT ,
ld_y_auto  TYPE BPC01_BCONTACT_AUTO ,
ld_x_wmode  TYPE BCONTGEN-WMODE ,
ld_y_wmode  TYPE BCONTGEN-WMODE ,
ld_x_upd_online  TYPE BCONTGEN-UPD_ONLINE ,
ld_x_no_dialog  TYPE BCONTGEN-NO_DIALOG ,
ld_x_auto  TYPE BPC01_BCONTACT_AUTO ,
ld_x_db_bcont  TYPE BCONT ,
ld_x_no_change  TYPE BCONTGEN-NO_CHANGE ,
ld_x_no_other  TYPE BCONTGEN-NO_OTHER ,
ld_x_bpcconfig  TYPE BCONTCONF-BPCCONFIG ,
ld_x_prgcontext  TYPE BCONTCFIND-PRGCONTEXT ,
ld_x_subcontext  TYPE BCONTCFIND-SUBCONTEXT ,
ld_x_no_archive  TYPE FLAG ,
ld_x_archive_key  TYPE AIND_ARKEY ,
ld_x_fullscreen  TYPE XFELD .


SELECT single BPCONTACT
FROM BCONT
INTO ld_x_bpcontact.


ld_x_wmode = some text here

ld_x_upd_online = some text here

ld_x_no_dialog = some text here
ld_x_auto = 'Check type of data required'.
ld_x_db_bcont = 'Check type of data required'.

ld_x_no_change = some text here

ld_x_no_other = some text here

SELECT single BPCCONFIG
FROM BCONTCONF
INTO ld_x_bpcconfig.


SELECT single PRGCONTEXT
FROM BCONTCFIND
INTO ld_x_prgcontext.


SELECT single SUBCONTEXT
FROM BCONTCFIND
INTO ld_x_subcontext.

ld_x_no_archive = 'Check type of data required'.
ld_x_archive_key = 'Check type of data required'.
ld_x_fullscreen = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BCONTACT_OPEN or its description.