SAP MCE_SELECT_S013 Function Module for Variable select on information structure S013 (statistics for vendor









MCE_SELECT_S013 is a standard mce select s013 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Variable select on information structure S013 (statistics for vendor 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 mce select s013 FM, simply by entering the name MCE_SELECT_S013 into the relevant SAP transaction such as SE37 or SE38.

Function Group: MCS8
Program Name: SAPLMCS8
Main Program:
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MCE_SELECT_S013 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 'MCE_SELECT_S013'"Variable select on information structure S013 (statistics for vendor
EXPORTING
I_DATE_FROM = "
I_DATE_TO = "
I_EKORG = "
* I_ESOKZ = ' ' "
* I_INFNR = ' ' "
* I_LIFNR = ' ' "
* I_MATNR = ' ' "
* I_WERKS = ' ' "

IMPORTING
E_PERIOD = "

TABLES
T_ENTRIES = "

EXCEPTIONS
EKORG_NOT_DEFINED = 1 EKORG_NOT_PROVIDED = 2 PERIOD_NOT_DEFINED = 3
.



IMPORTING Parameters details for MCE_SELECT_S013

I_DATE_FROM -

Data type: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

I_DATE_TO -

Data type: SY-DATUM
Optional: No
Call by Reference: No ( called with pass by value option)

I_EKORG -

Data type: S013-EKORG
Optional: No
Call by Reference: No ( called with pass by value option)

I_ESOKZ -

Data type: S013-ESOKZ
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_INFNR -

Data type: S013-INFNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_LIFNR -

Data type: S013-LIFNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_MATNR -

Data type: S013-MATNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WERKS -

Data type: S013-WERKS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for MCE_SELECT_S013

E_PERIOD -

Data type: TMC4-SPERI
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for MCE_SELECT_S013

T_ENTRIES -

Data type: S013
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

EKORG_NOT_DEFINED - EKORG is invalid (not defined in T024E)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

EKORG_NOT_PROVIDED - EKORG is not specified (= SPACE)

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PERIOD_NOT_DEFINED - Period unit of info structure not defined

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MCE_SELECT_S013 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_e_period  TYPE TMC4-SPERI, "   
lt_t_entries  TYPE STANDARD TABLE OF S013, "   
lv_i_date_from  TYPE SY-DATUM, "   
lv_ekorg_not_defined  TYPE SY, "   
lv_i_date_to  TYPE SY-DATUM, "   
lv_ekorg_not_provided  TYPE SY, "   
lv_i_ekorg  TYPE S013-EKORG, "   
lv_period_not_defined  TYPE S013, "   
lv_i_esokz  TYPE S013-ESOKZ, "   SPACE
lv_i_infnr  TYPE S013-INFNR, "   SPACE
lv_i_lifnr  TYPE S013-LIFNR, "   SPACE
lv_i_matnr  TYPE S013-MATNR, "   SPACE
lv_i_werks  TYPE S013-WERKS. "   SPACE

  CALL FUNCTION 'MCE_SELECT_S013'  "Variable select on information structure S013 (statistics for vendor
    EXPORTING
         I_DATE_FROM = lv_i_date_from
         I_DATE_TO = lv_i_date_to
         I_EKORG = lv_i_ekorg
         I_ESOKZ = lv_i_esokz
         I_INFNR = lv_i_infnr
         I_LIFNR = lv_i_lifnr
         I_MATNR = lv_i_matnr
         I_WERKS = lv_i_werks
    IMPORTING
         E_PERIOD = lv_e_period
    TABLES
         T_ENTRIES = lt_t_entries
    EXCEPTIONS
        EKORG_NOT_DEFINED = 1
        EKORG_NOT_PROVIDED = 2
        PERIOD_NOT_DEFINED = 3
. " MCE_SELECT_S013




ABAP code using 7.40 inline data declarations to call FM MCE_SELECT_S013

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 SPERI FROM TMC4 INTO @DATA(ld_e_period).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_i_date_from).
 
 
"SELECT single DATUM FROM SY INTO @DATA(ld_i_date_to).
 
 
"SELECT single EKORG FROM S013 INTO @DATA(ld_i_ekorg).
 
 
"SELECT single ESOKZ FROM S013 INTO @DATA(ld_i_esokz).
DATA(ld_i_esokz) = ' '.
 
"SELECT single INFNR FROM S013 INTO @DATA(ld_i_infnr).
DATA(ld_i_infnr) = ' '.
 
"SELECT single LIFNR FROM S013 INTO @DATA(ld_i_lifnr).
DATA(ld_i_lifnr) = ' '.
 
"SELECT single MATNR FROM S013 INTO @DATA(ld_i_matnr).
DATA(ld_i_matnr) = ' '.
 
"SELECT single WERKS FROM S013 INTO @DATA(ld_i_werks).
DATA(ld_i_werks) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!