SAP BCONTACT_CLASS_ACTIVITY Function Module for
BCONTACT_CLASS_ACTIVITY is a standard bcontact class activity 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 class activity FM, simply by entering the name BCONTACT_CLASS_ACTIVITY into the relevant SAP transaction such as SE37 or SE38.
Function Group: BPT5
Program Name: SAPLBPT5
Main Program: SAPLBPT5
Appliation area: E
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function BCONTACT_CLASS_ACTIVITY 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_CLASS_ACTIVITY'".
EXPORTING
* X_CLASS = ' ' "Contact class
* X_NOAUTOMATIC = ' ' "Indicator: No automatic activities
* X_EXPAND = ' ' "Indicator: Expand tree by default
* X_NOSELECTION = ' ' "
IMPORTING
Y_CLASS = "Contact class
Y_ACTIVITY = "Sales Activity Action
EXCEPTIONS
NOT_FOUND = 1 CANCEL = 2 TREE_ERROR = 3
IMPORTING Parameters details for BCONTACT_CLASS_ACTIVITY
X_CLASS - Contact class
Data type: BCONTA-CCLASSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_NOAUTOMATIC - Indicator: No automatic activities
Data type: BCONTGEN-KENNZXDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_EXPAND - Indicator: Expand tree by default
Data type: BCONTGEN-KENNZXDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
X_NOSELECTION -
Data type: BCONTGEN-KENNZXDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for BCONTACT_CLASS_ACTIVITY
Y_CLASS - Contact class
Data type: BCONTA-CCLASSOptional: No
Call by Reference: No ( called with pass by value option)
Y_ACTIVITY - Sales Activity Action
Data type: BCONTA-ACTIVITYOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NOT_FOUND - No activities found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
CANCEL - Function cancelled
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TREE_ERROR - Internal error within tree handling
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for BCONTACT_CLASS_ACTIVITY 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_x_class | TYPE BCONTA-CCLASS, " SPACE | |||
| lv_y_class | TYPE BCONTA-CCLASS, " | |||
| lv_not_found | TYPE BCONTA, " | |||
| lv_cancel | TYPE BCONTA, " | |||
| lv_y_activity | TYPE BCONTA-ACTIVITY, " | |||
| lv_x_noautomatic | TYPE BCONTGEN-KENNZX, " SPACE | |||
| lv_x_expand | TYPE BCONTGEN-KENNZX, " SPACE | |||
| lv_tree_error | TYPE BCONTGEN, " | |||
| lv_x_noselection | TYPE BCONTGEN-KENNZX. " SPACE |
|   CALL FUNCTION 'BCONTACT_CLASS_ACTIVITY' " |
| EXPORTING | ||
| X_CLASS | = lv_x_class | |
| X_NOAUTOMATIC | = lv_x_noautomatic | |
| X_EXPAND | = lv_x_expand | |
| X_NOSELECTION | = lv_x_noselection | |
| IMPORTING | ||
| Y_CLASS | = lv_y_class | |
| Y_ACTIVITY | = lv_y_activity | |
| EXCEPTIONS | ||
| NOT_FOUND = 1 | ||
| CANCEL = 2 | ||
| TREE_ERROR = 3 | ||
| . " BCONTACT_CLASS_ACTIVITY | ||
ABAP code using 7.40 inline data declarations to call FM BCONTACT_CLASS_ACTIVITY
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 CCLASS FROM BCONTA INTO @DATA(ld_x_class). | ||||
| DATA(ld_x_class) | = ' '. | |||
| "SELECT single CCLASS FROM BCONTA INTO @DATA(ld_y_class). | ||||
| "SELECT single ACTIVITY FROM BCONTA INTO @DATA(ld_y_activity). | ||||
| "SELECT single KENNZX FROM BCONTGEN INTO @DATA(ld_x_noautomatic). | ||||
| DATA(ld_x_noautomatic) | = ' '. | |||
| "SELECT single KENNZX FROM BCONTGEN INTO @DATA(ld_x_expand). | ||||
| DATA(ld_x_expand) | = ' '. | |||
| "SELECT single KENNZX FROM BCONTGEN INTO @DATA(ld_x_noselection). | ||||
| DATA(ld_x_noselection) | = ' '. | |||
Search for further information about these or an SAP related objects