SAP MCV_STATISTICS_ORDER Function Module for NOTRANSL: Statistikfortschreibung Kundenauftrag
MCV_STATISTICS_ORDER is a standard mcv statistics order 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 Kundenauftrag 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 order FM, simply by entering the name MCV_STATISTICS_ORDER into the relevant SAP transaction such as SE37 or SE38.
Function Group: MCS1
Program Name: SAPLMCS1
Main Program: SAPLMCS1
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MCV_STATISTICS_ORDER 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_ORDER'"NOTRANSL: Statistikfortschreibung Kundenauftrag.
EXPORTING
* MODUS = ' ' "
YVBAK_UPDKZ = "Order header old update indicator
* I_CONTROL = "
* POSITION = ' ' "'X' call from item processing
* SPROG = ' ' "
* SROUT = ' ' "
TRTYP = "Transaction type
* VRSIO = '000' "
XVBAK = "New order header
XVBAK_UPDKZ = "Order header new update indicator
YVBAK = "Old order header
TABLES
MCINF = "
XVBUP = "New order item status
YVBAP = "Old order item
YVBEP = "Old order classifications
YVBFA = "Old order flow
YVBKD = "Old order business data
YVBPA = "Old order partner
YVBUK = "Old order header status
YVBUP = "Old order item status
* XFPLA = "
* YFPLA = "
VBAPF = "Order summarized flow (old=new)
* XFPLT = "
* YFPLT = "
* YVBAPF = "
XKOMV = "
XVBAP = "New order item
XVBEP = "New order classifications
XVBFA = "New order flow
XVBKD = "New order business data
XVBPA = "New order partner
XVBUK = "New order header status
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_SAPLMCS1_001 SIS: User Exit for SD Document - Header Data
EXIT_SAPLMCS1_002 SIS: User Exit for SD Document - Item Data
IMPORTING Parameters details for MCV_STATISTICS_ORDER
MODUS -
Data type: MCCONTROL-MODUSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
YVBAK_UPDKZ - Order header old update indicator
Data type: VBAPVB-UPDKZOptional: No
Call by Reference: No ( called with pass by value option)
I_CONTROL -
Data type: MCCONTROLOptional: Yes
Call by Reference: No ( called with pass by value option)
POSITION - 'X' call from item processing
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SPROG -
Data type: MCCONTROL-SPROGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SROUT -
Data type: MCCONTROL-SROUTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TRTYP - Transaction type
Data type: T180-TRTYPOptional: No
Call by Reference: No ( called with pass by value option)
VRSIO -
Data type: MCCONTROL-VRSIODefault: '000'
Optional: Yes
Call by Reference: No ( called with pass by value option)
XVBAK - New order header
Data type: VBAKOptional: No
Call by Reference: No ( called with pass by value option)
XVBAK_UPDKZ - Order header new update indicator
Data type: VBAPVB-UPDKZOptional: No
Call by Reference: No ( called with pass by value option)
YVBAK - Old order header
Data type: VBAKOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MCV_STATISTICS_ORDER
MCINF -
Data type: MCSOINFOptional: No
Call by Reference: No ( called with pass by value option)
XVBUP - New order item status
Data type: VBUPVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBAP - Old order item
Data type: VBAPVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBEP - Old order classifications
Data type: VBEPVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBFA - Old order flow
Data type: VBFAVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBKD - Old order business data
Data type: VBKDVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBPA - Old order partner
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBUK - Old order header status
Data type: VBUKVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBUP - Old order item status
Data type: VBUPVBOptional: No
Call by Reference: No ( called with pass by value option)
XFPLA -
Data type: FPLAVBOptional: Yes
Call by Reference: No ( called with pass by value option)
YFPLA -
Data type: FPLAVBOptional: Yes
Call by Reference: No ( called with pass by value option)
VBAPF - Order summarized flow (old=new)
Data type: VBAPFOptional: No
Call by Reference: No ( called with pass by value option)
XFPLT -
Data type: FPLTVBOptional: Yes
Call by Reference: No ( called with pass by value option)
YFPLT -
Data type: FPLTVBOptional: Yes
Call by Reference: No ( called with pass by value option)
YVBAPF -
Data type: VBAPFOptional: Yes
Call by Reference: No ( called with pass by value option)
XKOMV -
Data type: KOMVOptional: No
Call by Reference: No ( called with pass by value option)
XVBAP - New order item
Data type: VBAPVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBEP - New order classifications
Data type: VBEPVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBFA - New order flow
Data type: VBFAVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBKD - New order business data
Data type: VBKDVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBPA - New order partner
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBUK - New order header status
Data type: VBUKVBOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MCV_STATISTICS_ORDER 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_mcinf | TYPE STANDARD TABLE OF MCSOINF, " | |||
| lv_modus | TYPE MCCONTROL-MODUS, " SPACE | |||
| lt_xvbup | TYPE STANDARD TABLE OF VBUPVB, " | |||
| lv_yvbak_updkz | TYPE VBAPVB-UPDKZ, " | |||
| lt_yvbap | TYPE STANDARD TABLE OF VBAPVB, " | |||
| lv_i_control | TYPE MCCONTROL, " | |||
| lt_yvbep | TYPE STANDARD TABLE OF VBEPVB, " | |||
| lt_yvbfa | TYPE STANDARD TABLE OF VBFAVB, " | |||
| lt_yvbkd | TYPE STANDARD TABLE OF VBKDVB, " | |||
| lt_yvbpa | TYPE STANDARD TABLE OF VBPAVB, " | |||
| lt_yvbuk | TYPE STANDARD TABLE OF VBUKVB, " | |||
| lt_yvbup | TYPE STANDARD TABLE OF VBUPVB, " | |||
| lt_xfpla | TYPE STANDARD TABLE OF FPLAVB, " | |||
| lt_yfpla | TYPE STANDARD TABLE OF FPLAVB, " | |||
| lt_vbapf | TYPE STANDARD TABLE OF VBAPF, " | |||
| lv_position | TYPE XFELD, " SPACE | |||
| lt_xfplt | TYPE STANDARD TABLE OF FPLTVB, " | |||
| lt_yfplt | TYPE STANDARD TABLE OF FPLTVB, " | |||
| lt_yvbapf | TYPE STANDARD TABLE OF VBAPF, " | |||
| lv_sprog | TYPE MCCONTROL-SPROG, " SPACE | |||
| lt_xkomv | TYPE STANDARD TABLE OF KOMV, " | |||
| lv_srout | TYPE MCCONTROL-SROUT, " SPACE | |||
| lt_xvbap | TYPE STANDARD TABLE OF VBAPVB, " | |||
| lv_trtyp | TYPE T180-TRTYP, " | |||
| lt_xvbep | TYPE STANDARD TABLE OF VBEPVB, " | |||
| lv_vrsio | TYPE MCCONTROL-VRSIO, " '000' | |||
| lt_xvbfa | TYPE STANDARD TABLE OF VBFAVB, " | |||
| lv_xvbak | TYPE VBAK, " | |||
| lt_xvbkd | TYPE STANDARD TABLE OF VBKDVB, " | |||
| lt_xvbpa | TYPE STANDARD TABLE OF VBPAVB, " | |||
| lv_xvbak_updkz | TYPE VBAPVB-UPDKZ, " | |||
| lt_xvbuk | TYPE STANDARD TABLE OF VBUKVB, " | |||
| lv_yvbak | TYPE VBAK. " |
|   CALL FUNCTION 'MCV_STATISTICS_ORDER' "NOTRANSL: Statistikfortschreibung Kundenauftrag |
| EXPORTING | ||
| MODUS | = lv_modus | |
| YVBAK_UPDKZ | = lv_yvbak_updkz | |
| I_CONTROL | = lv_i_control | |
| POSITION | = lv_position | |
| SPROG | = lv_sprog | |
| SROUT | = lv_srout | |
| TRTYP | = lv_trtyp | |
| VRSIO | = lv_vrsio | |
| XVBAK | = lv_xvbak | |
| XVBAK_UPDKZ | = lv_xvbak_updkz | |
| YVBAK | = lv_yvbak | |
| TABLES | ||
| MCINF | = lt_mcinf | |
| XVBUP | = lt_xvbup | |
| YVBAP | = lt_yvbap | |
| YVBEP | = lt_yvbep | |
| YVBFA | = lt_yvbfa | |
| YVBKD | = lt_yvbkd | |
| YVBPA | = lt_yvbpa | |
| YVBUK | = lt_yvbuk | |
| YVBUP | = lt_yvbup | |
| XFPLA | = lt_xfpla | |
| YFPLA | = lt_yfpla | |
| VBAPF | = lt_vbapf | |
| XFPLT | = lt_xfplt | |
| YFPLT | = lt_yfplt | |
| YVBAPF | = lt_yvbapf | |
| XKOMV | = lt_xkomv | |
| XVBAP | = lt_xvbap | |
| XVBEP | = lt_xvbep | |
| XVBFA | = lt_xvbfa | |
| XVBKD | = lt_xvbkd | |
| XVBPA | = lt_xvbpa | |
| XVBUK | = lt_xvbuk | |
| . " MCV_STATISTICS_ORDER | ||
ABAP code using 7.40 inline data declarations to call FM MCV_STATISTICS_ORDER
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_modus). | ||||
| DATA(ld_modus) | = ' '. | |||
| "SELECT single UPDKZ FROM VBAPVB INTO @DATA(ld_yvbak_updkz). | ||||
| DATA(ld_position) | = ' '. | |||
| "SELECT single SPROG FROM MCCONTROL INTO @DATA(ld_sprog). | ||||
| DATA(ld_sprog) | = ' '. | |||
| "SELECT single SROUT FROM MCCONTROL INTO @DATA(ld_srout). | ||||
| DATA(ld_srout) | = ' '. | |||
| "SELECT single TRTYP FROM T180 INTO @DATA(ld_trtyp). | ||||
| "SELECT single VRSIO FROM MCCONTROL INTO @DATA(ld_vrsio). | ||||
| DATA(ld_vrsio) | = '000'. | |||
| "SELECT single UPDKZ FROM VBAPVB INTO @DATA(ld_xvbak_updkz). | ||||
Search for further information about these or an SAP related objects