SAP Function Modules

CNV_CDMC_CA_STAT_EVAL SAP Function module - Extract content of STAT.DAT file







CNV_CDMC_CA_STAT_EVAL 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 CNV_CDMC_CA_STAT_EVAL into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: CNV_CDMC_CA_FGR_STAT
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM CNV_CDMC_CA_STAT_EVAL - CNV CDMC CA STAT EVAL





CALL FUNCTION 'CNV_CDMC_CA_STAT_EVAL' "Extract content of  STAT.DAT file
  EXPORTING
    iv_start_date = SY-DATUM    " sy-datum      Date and time, current (application server) date
    iv_start_time = '000001'    " sy-uzeit      Dat and time, current application server time
*   iv_end_date = SY-DATUM      " sy-datum      Dat and time, current application server time
*   iv_end_time = SY-UZEIT      " sy-uzeit      Dat and time, current application server time
  TABLES
    it_clients =                " t000          Filter table with all clients from which the statistical rec shall be collected
*   et_stat_recs =              " cnvcdmcca_stat  Statistics
  EXCEPTIONS
    OPEN_FILE_ERROR = 1         "               STAT.DAT could not be open for read access
    INTERNAL_ERROR = 2          "               Error during read access to the Statistics File
    .  "  CNV_CDMC_CA_STAT_EVAL

ABAP code example for Function Module CNV_CDMC_CA_STAT_EVAL





The ABAP code below is a full code listing to execute function module CNV_CDMC_CA_STAT_EVAL 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_it_clients  TYPE STANDARD TABLE OF T000,"TABLES PARAM
wa_it_clients  LIKE LINE OF it_it_clients ,
it_et_stat_recs  TYPE STANDARD TABLE OF CNVCDMCCA_STAT,"TABLES PARAM
wa_et_stat_recs  LIKE LINE OF it_et_stat_recs .

DATA(ld_iv_start_date) = '20210129'.
DATA(ld_iv_start_time) = 'Check type of data required'.
DATA(ld_iv_end_date) = '20210129'.
DATA(ld_iv_end_time) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_clients to it_it_clients.

"populate fields of struture and append to itab
append wa_et_stat_recs to it_et_stat_recs. . CALL FUNCTION 'CNV_CDMC_CA_STAT_EVAL' EXPORTING iv_start_date = ld_iv_start_date iv_start_time = ld_iv_start_time * iv_end_date = ld_iv_end_date * iv_end_time = ld_iv_end_time TABLES it_clients = it_it_clients * et_stat_recs = it_et_stat_recs EXCEPTIONS OPEN_FILE_ERROR = 1 INTERNAL_ERROR = 2 . " CNV_CDMC_CA_STAT_EVAL
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here 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_iv_start_date  TYPE SY-DATUM ,
it_it_clients  TYPE STANDARD TABLE OF T000 ,
wa_it_clients  LIKE LINE OF it_it_clients,
ld_iv_start_time  TYPE SY-UZEIT ,
it_et_stat_recs  TYPE STANDARD TABLE OF CNVCDMCCA_STAT ,
wa_et_stat_recs  LIKE LINE OF it_et_stat_recs,
ld_iv_end_date  TYPE SY-DATUM ,
ld_iv_end_time  TYPE SY-UZEIT .

ld_iv_start_date = '20210129'.

"populate fields of struture and append to itab
append wa_it_clients to it_it_clients.
ld_iv_start_time = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_stat_recs to it_et_stat_recs.
ld_iv_end_date = '20210129'.
ld_iv_end_time = 'Check type of data required'.

SAP Documentation for FM CNV_CDMC_CA_STAT_EVAL


Function Module Description
This function module reads the stat.dat file from the application ...See here for full SAP fm documentation



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 CNV_CDMC_CA_STAT_EVAL or its description.