SAP Function Modules

MCF_STATISTICS_UPD_V2 SAP Function module - Update of statistical data production







MCF_STATISTICS_UPD_V2 is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name MCF_STATISTICS_UPD_V2 into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: MCF4
Released Date: Not Released
Processing type: Start of update delayed (Start Delayed)
update module start delayed settings


Pattern for FM MCF_STATISTICS_UPD_V2 - MCF STATISTICS UPD V2





CALL FUNCTION 'MCF_STATISTICS_UPD_V2' "Update of statistical data production
  EXPORTING
    zeitp =                     " tmc5-zeitp
*   control = SPACE             " mccontrol
*   flg_pb = SPACE              " rmcf1-x
*   no_upd_from_int = SPACE     " rmcf1-x       Yes / No
*   only_db_upd = SPACE         " rmcf1-x       Yes / No
  TABLES
    xmcafko =                   " mcafkob
    xmcafpo =                   " mcafpob
    xmcafvg =                   " mcafvgb
    xmccomp =                   " mccompb
    xmckalk =                   " mckalkb
*   xmcinf =                    " mcsoinf
    .  "  MCF_STATISTICS_UPD_V2

ABAP code example for Function Module MCF_STATISTICS_UPD_V2





The ABAP code below is a full code listing to execute function module MCF_STATISTICS_UPD_V2 including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_xmcafko  TYPE STANDARD TABLE OF MCAFKOB,"TABLES PARAM
wa_xmcafko  LIKE LINE OF it_xmcafko ,
it_xmcafpo  TYPE STANDARD TABLE OF MCAFPOB,"TABLES PARAM
wa_xmcafpo  LIKE LINE OF it_xmcafpo ,
it_xmcafvg  TYPE STANDARD TABLE OF MCAFVGB,"TABLES PARAM
wa_xmcafvg  LIKE LINE OF it_xmcafvg ,
it_xmccomp  TYPE STANDARD TABLE OF MCCOMPB,"TABLES PARAM
wa_xmccomp  LIKE LINE OF it_xmccomp ,
it_xmckalk  TYPE STANDARD TABLE OF MCKALKB,"TABLES PARAM
wa_xmckalk  LIKE LINE OF it_xmckalk ,
it_xmcinf  TYPE STANDARD TABLE OF MCSOINF,"TABLES PARAM
wa_xmcinf  LIKE LINE OF it_xmcinf .


SELECT single ZEITP
FROM TMC5
INTO @DATA(ld_zeitp).

DATA(ld_control) = 'Check type of data required'.

DATA(ld_flg_pb) = some text here

DATA(ld_no_upd_from_int) = some text here

DATA(ld_only_db_upd) = some text here

"populate fields of struture and append to itab
append wa_xmcafko to it_xmcafko.

"populate fields of struture and append to itab
append wa_xmcafpo to it_xmcafpo.

"populate fields of struture and append to itab
append wa_xmcafvg to it_xmcafvg.

"populate fields of struture and append to itab
append wa_xmccomp to it_xmccomp.

"populate fields of struture and append to itab
append wa_xmckalk to it_xmckalk.

"populate fields of struture and append to itab
append wa_xmcinf to it_xmcinf. . CALL FUNCTION 'MCF_STATISTICS_UPD_V2' EXPORTING zeitp = ld_zeitp * control = ld_control * flg_pb = ld_flg_pb * no_upd_from_int = ld_no_upd_from_int * only_db_upd = ld_only_db_upd TABLES xmcafko = it_xmcafko xmcafpo = it_xmcafpo xmcafvg = it_xmcafvg xmccomp = it_xmccomp xmckalk = it_xmckalk * xmcinf = it_xmcinf . " MCF_STATISTICS_UPD_V2
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_zeitp  TYPE TMC5-ZEITP ,
it_xmcafko  TYPE STANDARD TABLE OF MCAFKOB ,
wa_xmcafko  LIKE LINE OF it_xmcafko,
ld_control  TYPE MCCONTROL ,
it_xmcafpo  TYPE STANDARD TABLE OF MCAFPOB ,
wa_xmcafpo  LIKE LINE OF it_xmcafpo,
ld_flg_pb  TYPE RMCF1-X ,
it_xmcafvg  TYPE STANDARD TABLE OF MCAFVGB ,
wa_xmcafvg  LIKE LINE OF it_xmcafvg,
ld_no_upd_from_int  TYPE RMCF1-X ,
it_xmccomp  TYPE STANDARD TABLE OF MCCOMPB ,
wa_xmccomp  LIKE LINE OF it_xmccomp,
ld_only_db_upd  TYPE RMCF1-X ,
it_xmckalk  TYPE STANDARD TABLE OF MCKALKB ,
wa_xmckalk  LIKE LINE OF it_xmckalk,
it_xmcinf  TYPE STANDARD TABLE OF MCSOINF ,
wa_xmcinf  LIKE LINE OF it_xmcinf.


SELECT single ZEITP
FROM TMC5
INTO ld_zeitp.


"populate fields of struture and append to itab
append wa_xmcafko to it_xmcafko.
ld_control = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_xmcafpo to it_xmcafpo.

ld_flg_pb = some text here

"populate fields of struture and append to itab
append wa_xmcafvg to it_xmcafvg.

ld_no_upd_from_int = some text here

"populate fields of struture and append to itab
append wa_xmccomp to it_xmccomp.

ld_only_db_upd = some text here

"populate fields of struture and append to itab
append wa_xmckalk to it_xmckalk.

"populate fields of struture and append to itab
append wa_xmcinf to it_xmcinf.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name MCF_STATISTICS_UPD_V2 or its description.