SAP MCV_STATISTICS_DELIVERY Function Module for Statistics Update for Delivery
MCV_STATISTICS_DELIVERY is a standard mcv statistics delivery SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Statistics Update for Delivery 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 delivery FM, simply by entering the name MCV_STATISTICS_DELIVERY into the relevant SAP transaction such as SE37 or SE38.
Function Group: MCS5
Program Name: SAPLMCS5
Main Program: SAPLMCS5
Appliation area: V
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MCV_STATISTICS_DELIVERY 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_DELIVERY'"Statistics Update for Delivery.
EXPORTING
* KEINE_AUFTRAGSWERTE = ' ' "If required, order data is read
* I_CONTROL = "
* AKTUELLER_BELEG = ' ' "Checkbox
* IP_MULT = ' ' "
* IP_SPLIT = ' ' "
* NO_RWE = ' ' "
* NO_PW = ' ' "
LIKP = "
* MODUS = ' ' "
* SPROG = ' ' "
* SROUT = ' ' "
* TRTYP = ' ' "Transaction type
* VRSIO = '000' "
YLIKP = "Old delivery header
YLIKP_UPDKZ = "
TABLES
MCINF = "
* YLIKP_T = "
YLIPS = "Old delivery item
YVBFA = "Old delivery flow
YVBPA = "Old delivery partner
YVBUK = "Old delivery header status
YVBUP = "Old delivery item status
* XVBEP = "
* XVBKD = "
XLIKP = "New delivery header
XLIPS = "New delivery item
XVBAK = "
XVBAP = "
XVBFA = "New delivery flow
XVBPA = "New delivery partner
XVBUK = "New delivery header status
XVBUP = "New delivery item 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_SAPLMCS5_001 SIS: User Exit for Deliveries - Header Data
EXIT_SAPLMCS5_002 SIS: User Exit for Deliveries - Item Data
IMPORTING Parameters details for MCV_STATISTICS_DELIVERY
KEINE_AUFTRAGSWERTE - If required, order data is read
Data type: XFELDDefault: SPACE
Optional: Yes
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)
AKTUELLER_BELEG - Checkbox
Data type: XFELDDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
IP_MULT -
Data type: V50AGL-MULTDefault: SPACE
Optional: Yes
Call by Reference: Yes
IP_SPLIT -
Data type: V50AGL-SPLITDefault: SPACE
Optional: Yes
Call by Reference: Yes
NO_RWE -
Data type: NO_STATISTICSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
NO_PW -
Data type: NO_STATISTICSDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
LIKP -
Data type: LIKPOptional: No
Call by Reference: No ( called with pass by value option)
MODUS -
Data type: MCCONTROL-MODUSDefault: 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-TRTYPDefault: SPACE
Optional: Yes
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)
YLIKP - Old delivery header
Data type: LIKPOptional: No
Call by Reference: No ( called with pass by value option)
YLIKP_UPDKZ -
Data type: LIKPVB-UPDKZOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for MCV_STATISTICS_DELIVERY
MCINF -
Data type: MCSOINFOptional: No
Call by Reference: No ( called with pass by value option)
YLIKP_T -
Data type: LIKPOptional: Yes
Call by Reference: No ( called with pass by value option)
YLIPS - Old delivery item
Data type: LIPSVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBFA - Old delivery flow
Data type: VBFAVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBPA - Old delivery partner
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBUK - Old delivery header status
Data type: VBUKVBOptional: No
Call by Reference: No ( called with pass by value option)
YVBUP - Old delivery item status
Data type: VBUPVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBEP -
Data type: VBEPVBOptional: Yes
Call by Reference: No ( called with pass by value option)
XVBKD -
Data type: VBKDVBOptional: Yes
Call by Reference: No ( called with pass by value option)
XLIKP - New delivery header
Data type: LIKPVBOptional: No
Call by Reference: No ( called with pass by value option)
XLIPS - New delivery item
Data type: LIPSVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBAK -
Data type: VBAKOptional: No
Call by Reference: No ( called with pass by value option)
XVBAP -
Data type: VBAPVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBFA - New delivery flow
Data type: VBFAVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBPA - New delivery partner
Data type: VBPAVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBUK - New delivery header status
Data type: VBUKVBOptional: No
Call by Reference: No ( called with pass by value option)
XVBUP - New delivery item status
Data type: VBUPVBOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for MCV_STATISTICS_DELIVERY 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_keine_auftragswerte | TYPE XFELD, " SPACE | |||
| lt_ylikp_t | TYPE STANDARD TABLE OF LIKP, " | |||
| lv_i_control | TYPE MCCONTROL, " | |||
| lt_ylips | TYPE STANDARD TABLE OF LIPSVB, " | |||
| lv_aktueller_beleg | TYPE XFELD, " SPACE | |||
| lt_yvbfa | TYPE STANDARD TABLE OF VBFAVB, " | |||
| lv_ip_mult | TYPE V50AGL-MULT, " SPACE | |||
| lt_yvbpa | TYPE STANDARD TABLE OF VBPAVB, " | |||
| lv_ip_split | TYPE V50AGL-SPLIT, " SPACE | |||
| lt_yvbuk | TYPE STANDARD TABLE OF VBUKVB, " | |||
| lv_no_rwe | TYPE NO_STATISTICS, " SPACE | |||
| lv_no_pw | TYPE NO_STATISTICS, " SPACE | |||
| lt_yvbup | TYPE STANDARD TABLE OF VBUPVB, " | |||
| lt_xvbep | TYPE STANDARD TABLE OF VBEPVB, " | |||
| lt_xvbkd | TYPE STANDARD TABLE OF VBKDVB, " | |||
| lv_likp | TYPE LIKP, " | |||
| lt_xlikp | TYPE STANDARD TABLE OF LIKPVB, " | |||
| lv_modus | TYPE MCCONTROL-MODUS, " SPACE | |||
| lt_xlips | TYPE STANDARD TABLE OF LIPSVB, " | |||
| lv_sprog | TYPE MCCONTROL-SPROG, " SPACE | |||
| lt_xvbak | TYPE STANDARD TABLE OF VBAK, " | |||
| lv_srout | TYPE MCCONTROL-SROUT, " SPACE | |||
| lt_xvbap | TYPE STANDARD TABLE OF VBAPVB, " | |||
| lv_trtyp | TYPE T180-TRTYP, " SPACE | |||
| lt_xvbfa | TYPE STANDARD TABLE OF VBFAVB, " | |||
| lv_vrsio | TYPE MCCONTROL-VRSIO, " '000' | |||
| lt_xvbpa | TYPE STANDARD TABLE OF VBPAVB, " | |||
| lt_xvbuk | TYPE STANDARD TABLE OF VBUKVB, " | |||
| lv_ylikp | TYPE LIKP, " | |||
| lt_xvbup | TYPE STANDARD TABLE OF VBUPVB, " | |||
| lv_ylikp_updkz | TYPE LIKPVB-UPDKZ. " |
|   CALL FUNCTION 'MCV_STATISTICS_DELIVERY' "Statistics Update for Delivery |
| EXPORTING | ||
| KEINE_AUFTRAGSWERTE | = lv_keine_auftragswerte | |
| I_CONTROL | = lv_i_control | |
| AKTUELLER_BELEG | = lv_aktueller_beleg | |
| IP_MULT | = lv_ip_mult | |
| IP_SPLIT | = lv_ip_split | |
| NO_RWE | = lv_no_rwe | |
| NO_PW | = lv_no_pw | |
| LIKP | = lv_likp | |
| MODUS | = lv_modus | |
| SPROG | = lv_sprog | |
| SROUT | = lv_srout | |
| TRTYP | = lv_trtyp | |
| VRSIO | = lv_vrsio | |
| YLIKP | = lv_ylikp | |
| YLIKP_UPDKZ | = lv_ylikp_updkz | |
| TABLES | ||
| MCINF | = lt_mcinf | |
| YLIKP_T | = lt_ylikp_t | |
| YLIPS | = lt_ylips | |
| YVBFA | = lt_yvbfa | |
| YVBPA | = lt_yvbpa | |
| YVBUK | = lt_yvbuk | |
| YVBUP | = lt_yvbup | |
| XVBEP | = lt_xvbep | |
| XVBKD | = lt_xvbkd | |
| XLIKP | = lt_xlikp | |
| XLIPS | = lt_xlips | |
| XVBAK | = lt_xvbak | |
| XVBAP | = lt_xvbap | |
| XVBFA | = lt_xvbfa | |
| XVBPA | = lt_xvbpa | |
| XVBUK | = lt_xvbuk | |
| XVBUP | = lt_xvbup | |
| . " MCV_STATISTICS_DELIVERY | ||
ABAP code using 7.40 inline data declarations to call FM MCV_STATISTICS_DELIVERY
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.| DATA(ld_keine_auftragswerte) | = ' '. | |||
| DATA(ld_aktueller_beleg) | = ' '. | |||
| "SELECT single MULT FROM V50AGL INTO @DATA(ld_ip_mult). | ||||
| DATA(ld_ip_mult) | = ' '. | |||
| "SELECT single SPLIT FROM V50AGL INTO @DATA(ld_ip_split). | ||||
| DATA(ld_ip_split) | = ' '. | |||
| DATA(ld_no_rwe) | = ' '. | |||
| DATA(ld_no_pw) | = ' '. | |||
| "SELECT single MODUS FROM MCCONTROL INTO @DATA(ld_modus). | ||||
| DATA(ld_modus) | = ' '. | |||
| "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). | ||||
| DATA(ld_trtyp) | = ' '. | |||
| "SELECT single VRSIO FROM MCCONTROL INTO @DATA(ld_vrsio). | ||||
| DATA(ld_vrsio) | = '000'. | |||
| "SELECT single UPDKZ FROM LIKPVB INTO @DATA(ld_ylikp_updkz). | ||||
Search for further information about these or an SAP related objects