SAP MCV_STATISTICS_SACTIVITY Function Module for NOTRANSL: Statistikfortschreibung Kontakte/Vertriebsaktionen
MCV_STATISTICS_SACTIVITY is a standard mcv statistics sactivity SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Statistikfortschreibung Kontakte/Vertriebsaktionen processing and below is the pattern details for this FM, 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 mcv statistics sactivity FM, simply by entering the name MCV_STATISTICS_SACTIVITY into the relevant SAP transaction such as SE37 or SE38.
Function Group: MCV2
Program Name: SAPLMCV2
Main Program:
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MCV_STATISTICS_SACTIVITY 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 'MCV_STATISTICS_SACTIVITY'"NOTRANSL: Statistikfortschreibung Kontakte/Vertriebsaktionen.
EXPORTING
* FI_MODUS = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* FI_VRSIO = '000' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* FI_SPROG = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* FI_SROUT = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
FI_AKTYP = "DE-EN-LANG-SWITCH-NO-TRANSLATION
TABLES
* FI_MCINF = "DE-EN-LANG-SWITCH-NO-TRANSLATION
FI_XVBUK = "DE-EN-LANG-SWITCH-NO-TRANSLATION
FI_XVBKA = "DE-EN-LANG-SWITCH-NO-TRANSLATION
FI_XVBPA = "DE-EN-LANG-SWITCH-NO-TRANSLATION
FI_YVBUK = "DE-EN-LANG-SWITCH-NO-TRANSLATION
FI_YVBKA = "DE-EN-LANG-SWITCH-NO-TRANSLATION
FI_YVBPA = "DE-EN-LANG-SWITCH-NO-TRANSLATION
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_SAPLMCV2_001 SIS: User Exit Contacts/Sales Activities
IMPORTING Parameters details for MCV_STATISTICS_SACTIVITY
FI_MODUS - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: MCCONTROL-MODUSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FI_VRSIO - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: MCCONTROL-VRSIODefault: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
FI_SPROG - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: MCCONTROL-SPROGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FI_SROUT - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: MCCONTROL-SROUTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
FI_AKTYP - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: T180-AKTYPOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MCV_STATISTICS_SACTIVITY
FI_MCINF - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: MCSOINFOptional: Yes
Call by Reference: No ( called with pass by value option)
FI_XVBUK - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: VBUKVBOptional: No
Call by Reference: No ( called with pass by value option)
FI_XVBKA - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: VBKAVBOptional: No
Call by Reference: No ( called with pass by value option)
FI_XVBPA - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
FI_YVBUK - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: VBUKVBOptional: No
Call by Reference: No ( called with pass by value option)
FI_YVBKA - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: VBKAVBOptional: No
Call by Reference: No ( called with pass by value option)
FI_YVBPA - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MCV_STATISTICS_SACTIVITY 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: | ||||
| lt_fi_mcinf | TYPE STANDARD TABLE OF MCSOINF, " | |||
| lv_fi_modus | TYPE MCCONTROL-MODUS, " SPACE | |||
| lv_fi_vrsio | TYPE MCCONTROL-VRSIO, " '000' | |||
| lt_fi_xvbuk | TYPE STANDARD TABLE OF VBUKVB, " | |||
| lv_fi_sprog | TYPE MCCONTROL-SPROG, " SPACE | |||
| lt_fi_xvbka | TYPE STANDARD TABLE OF VBKAVB, " | |||
| lv_fi_srout | TYPE MCCONTROL-SROUT, " SPACE | |||
| lt_fi_xvbpa | TYPE STANDARD TABLE OF VBPAVB, " | |||
| lv_fi_aktyp | TYPE T180-AKTYP, " | |||
| lt_fi_yvbuk | TYPE STANDARD TABLE OF VBUKVB, " | |||
| lt_fi_yvbka | TYPE STANDARD TABLE OF VBKAVB, " | |||
| lt_fi_yvbpa | TYPE STANDARD TABLE OF VBPAVB. " |
|   CALL FUNCTION 'MCV_STATISTICS_SACTIVITY' "NOTRANSL: Statistikfortschreibung Kontakte/Vertriebsaktionen |
| EXPORTING | ||
| FI_MODUS | = lv_fi_modus | |
| FI_VRSIO | = lv_fi_vrsio | |
| FI_SPROG | = lv_fi_sprog | |
| FI_SROUT | = lv_fi_srout | |
| FI_AKTYP | = lv_fi_aktyp | |
| TABLES | ||
| FI_MCINF | = lt_fi_mcinf | |
| FI_XVBUK | = lt_fi_xvbuk | |
| FI_XVBKA | = lt_fi_xvbka | |
| FI_XVBPA | = lt_fi_xvbpa | |
| FI_YVBUK | = lt_fi_yvbuk | |
| FI_YVBKA | = lt_fi_yvbka | |
| FI_YVBPA | = lt_fi_yvbpa | |
| . " MCV_STATISTICS_SACTIVITY | ||
ABAP code using 7.40 inline data declarations to call FM MCV_STATISTICS_SACTIVITY
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 MODUS FROM MCCONTROL INTO @DATA(ld_fi_modus). | ||||
| DATA(ld_fi_modus) | = ' '. | |||
| "SELECT single VRSIO FROM MCCONTROL INTO @DATA(ld_fi_vrsio). | ||||
| DATA(ld_fi_vrsio) | = '000'. | |||
| "SELECT single SPROG FROM MCCONTROL INTO @DATA(ld_fi_sprog). | ||||
| DATA(ld_fi_sprog) | = ' '. | |||
| "SELECT single SROUT FROM MCCONTROL INTO @DATA(ld_fi_srout). | ||||
| DATA(ld_fi_srout) | = ' '. | |||
| "SELECT single AKTYP FROM T180 INTO @DATA(ld_fi_aktyp). | ||||
Search for further information about these or an SAP related objects