SAP Function Modules

CPE_TEST_FE_ROUNDRULE SAP Function module - CPE: Test of Rounding Rule within Formula Evaluation







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

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


Pattern for FM CPE_TEST_FE_ROUNDRULE - CPE TEST FE ROUNDRULE





CALL FUNCTION 'CPE_TEST_FE_ROUNDRULE' "CPE: Test of Rounding Rule within Formula Evaluation
  EXPORTING
*   iv_log_priority = '5'       " cpet_log_priority  CPE - Priority of Log Entry
*   iv_vmc_rfc_dest = ''        " rfcdest       Logical Destination (Specified in Function Call)
    iv_value =                  " cpet_userval1  CPE Term - Freely Usable Field
*   iv_roundrule =              " cpet_roundrule  CPE - Rounding Rule
*   iv_roundrout =              " cpet_roundrout  CPE - Rounding Routine
*   iv_numdecs =                " cpet_numdecs  CPE - Number of Decimals to Be Rounded to
*   iv_numtens =                " cpet_numtens  CPE - Number of Predecimal Places to Be Rounded to
    iv_evaldate = SY-DATUM      " cpet_refdate  CPE Term - Calculated Reference Date: not used anymore!
  IMPORTING
    ev_value =                  " mssiowat      MS SQL Server virtualfilestats: IOSTALLS (ms) per read
    ev_test_error_occurred =    " char1         Single-Character Flag
    ev_error =                  " char100       Java Exception Message
    ev_cpemsgno =               " msgnr         T100 Message Number
    et_log =                    " cpet_log_tab  CPE - Table for Log Data in Documents
  EXCEPTIONS
    JAVA_API_ERROR = 1          "               Error occurred during call of Java API
    .  "  CPE_TEST_FE_ROUNDRULE

ABAP code example for Function Module CPE_TEST_FE_ROUNDRULE





The ABAP code below is a full code listing to execute function module CPE_TEST_FE_ROUNDRULE 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:
ld_ev_value  TYPE MSSIOWAT ,
ld_ev_test_error_occurred  TYPE CHAR1 ,
ld_ev_error  TYPE CHAR100 ,
ld_ev_cpemsgno  TYPE MSGNR ,
ld_et_log  TYPE CPET_LOG_TAB .

DATA(ld_iv_log_priority) = 'Check type of data required'.
DATA(ld_iv_vmc_rfc_dest) = 'Check type of data required'.
DATA(ld_iv_value) = 'Check type of data required'.
DATA(ld_iv_roundrule) = 'Check type of data required'.
DATA(ld_iv_roundrout) = 'Check type of data required'.
DATA(ld_iv_numdecs) = 'Check type of data required'.
DATA(ld_iv_numtens) = 'Check type of data required'.
DATA(ld_iv_evaldate) = 'Check type of data required'. . CALL FUNCTION 'CPE_TEST_FE_ROUNDRULE' EXPORTING * iv_log_priority = ld_iv_log_priority * iv_vmc_rfc_dest = ld_iv_vmc_rfc_dest iv_value = ld_iv_value * iv_roundrule = ld_iv_roundrule * iv_roundrout = ld_iv_roundrout * iv_numdecs = ld_iv_numdecs * iv_numtens = ld_iv_numtens iv_evaldate = ld_iv_evaldate IMPORTING ev_value = ld_ev_value ev_test_error_occurred = ld_ev_test_error_occurred ev_error = ld_ev_error ev_cpemsgno = ld_ev_cpemsgno et_log = ld_et_log EXCEPTIONS JAVA_API_ERROR = 1 . " CPE_TEST_FE_ROUNDRULE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_ev_value  TYPE MSSIOWAT ,
ld_iv_log_priority  TYPE CPET_LOG_PRIORITY ,
ld_ev_test_error_occurred  TYPE CHAR1 ,
ld_iv_vmc_rfc_dest  TYPE RFCDEST ,
ld_ev_error  TYPE CHAR100 ,
ld_iv_value  TYPE CPET_USERVAL1 ,
ld_ev_cpemsgno  TYPE MSGNR ,
ld_iv_roundrule  TYPE CPET_ROUNDRULE ,
ld_et_log  TYPE CPET_LOG_TAB ,
ld_iv_roundrout  TYPE CPET_ROUNDROUT ,
ld_iv_numdecs  TYPE CPET_NUMDECS ,
ld_iv_numtens  TYPE CPET_NUMTENS ,
ld_iv_evaldate  TYPE CPET_REFDATE .

ld_iv_log_priority = 'Check type of data required'.
ld_iv_vmc_rfc_dest = 'Check type of data required'.
ld_iv_value = 'Check type of data required'.
ld_iv_roundrule = 'Check type of data required'.
ld_iv_roundrout = 'Check type of data required'.
ld_iv_numdecs = 'Check type of data required'.
ld_iv_numtens = 'Check type of data required'.
ld_iv_evaldate = 'Check type of data required'.

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