SAP CPE_TEST_API_FOR_FE_ROUNDRULE Function Module for CPE: API for Test of Rounding Rule within Formula Evaluation









CPE_TEST_API_FOR_FE_ROUNDRULE is a standard cpe test api for fe roundrule SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for CPE: API for Test of Rounding Rule within Formula Evaluation 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 cpe test api for fe roundrule FM, simply by entering the name CPE_TEST_API_FOR_FE_ROUNDRULE into the relevant SAP transaction such as SE37 or SE38.

Function Group: CPE_TEST_API_FOR_FE
Program Name: SAPLCPE_TEST_API_FOR_FE
Main Program: SAPLCPE_TEST_API_FOR_FE
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled JAVA Module
Update:



Function CPE_TEST_API_FOR_FE_ROUNDRULE 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 'CPE_TEST_API_FOR_FE_ROUNDRULE'"CPE: API for Test of Rounding Rule within Formula Evaluation
EXPORTING
* IV_LOG_PRIORITY = '5' "CPE - Priority of Log Entry
IV_VALUE = "CPE Term - Freely Usable Field
* IV_ROUNDRULE = "CPE - Rounding Rule
* IV_ROUNDROUT = "CPE - Rounding Routine
* IV_NUMDECS = "CPE - Number of Decimals to Be Rounded to
* IV_NUMTENS = "CPE - Number of Predecimal Places to Be Rounded to
* IV_EVALDATE = "CPE Term - Calculated Reference Date: not used anymore!

IMPORTING
EV_VALUE = "
EV_ERROR = "Java Exception Message
EV_CPEMSGNO = "T100 Message Number
ET_LOG = "CPE - Table for Log Data in Documents

EXCEPTIONS
FORMULA_EVALUATION_TERMINATED = 1
.



IMPORTING Parameters details for CPE_TEST_API_FOR_FE_ROUNDRULE

IV_LOG_PRIORITY - CPE - Priority of Log Entry

Data type: CPET_LOG_PRIORITY
Default: '5'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_VALUE - CPE Term - Freely Usable Field

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

IV_ROUNDRULE - CPE - Rounding Rule

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

IV_ROUNDROUT - CPE - Rounding Routine

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

IV_NUMDECS - CPE - Number of Decimals to Be Rounded to

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

IV_NUMTENS - CPE - Number of Predecimal Places to Be Rounded to

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

IV_EVALDATE - CPE Term - Calculated Reference Date: not used anymore!

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

EXPORTING Parameters details for CPE_TEST_API_FOR_FE_ROUNDRULE

EV_VALUE -

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

EV_ERROR - Java Exception Message

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

EV_CPEMSGNO - T100 Message Number

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

ET_LOG - CPE - Table for Log Data in Documents

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

EXCEPTIONS details

FORMULA_EVALUATION_TERMINATED -

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

Copy and paste ABAP code example for CPE_TEST_API_FOR_FE_ROUNDRULE 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_ev_value  TYPE MSSIOWAT, "   
lv_iv_log_priority  TYPE CPET_LOG_PRIORITY, "   '5'
lv_formula_evaluation_terminated  TYPE CPET_LOG_PRIORITY, "   
lv_ev_error  TYPE CHAR100, "   
lv_iv_value  TYPE CPET_USERVAL1, "   
lv_ev_cpemsgno  TYPE MSGNR, "   
lv_iv_roundrule  TYPE CPET_ROUNDRULE, "   
lv_et_log  TYPE CPET_LOG_TAB, "   
lv_iv_roundrout  TYPE CPET_ROUNDROUT, "   
lv_iv_numdecs  TYPE CPET_NUMDECS, "   
lv_iv_numtens  TYPE CPET_NUMTENS, "   
lv_iv_evaldate  TYPE CPET_REFDATE. "   

  CALL FUNCTION 'CPE_TEST_API_FOR_FE_ROUNDRULE'  "CPE: API for Test of Rounding Rule within Formula Evaluation
    EXPORTING
         IV_LOG_PRIORITY = lv_iv_log_priority
         IV_VALUE = lv_iv_value
         IV_ROUNDRULE = lv_iv_roundrule
         IV_ROUNDROUT = lv_iv_roundrout
         IV_NUMDECS = lv_iv_numdecs
         IV_NUMTENS = lv_iv_numtens
         IV_EVALDATE = lv_iv_evaldate
    IMPORTING
         EV_VALUE = lv_ev_value
         EV_ERROR = lv_ev_error
         EV_CPEMSGNO = lv_ev_cpemsgno
         ET_LOG = lv_et_log
    EXCEPTIONS
        FORMULA_EVALUATION_TERMINATED = 1
. " CPE_TEST_API_FOR_FE_ROUNDRULE




ABAP code using 7.40 inline data declarations to call FM CPE_TEST_API_FOR_FE_ROUNDRULE

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_iv_log_priority) = '5'.
 
 
 
 
 
 
 
 
 
 
 


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!