SAP Function Modules

CPE_TEST_API_FOR_FE_CONVRULE SAP Function module - CPE: API for Test of (Quantity )Conversion Rule within Formula Evaluati







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

Associated Function Group: CPE_TEST_API_FOR_FE
Released Date: Not Released
Processing type: Remote-Enabled JAVA Module
Remote enabled JAVA module settings


Pattern for FM CPE_TEST_API_FOR_FE_CONVRULE - CPE TEST API FOR FE CONVRULE





CALL FUNCTION 'CPE_TEST_API_FOR_FE_CONVRULE' "CPE: API for Test of  (Quantity )Conversion Rule within Formula Evaluation
  EXPORTING
*   iv_log_priority = '5'       " cpet_log_priority  CPE - Priority of Log Entry
*   iv_evaldate =               " cpet_refdate  CPE Term - Calculated Reference Date: not used anymore!
*   iv_quanconvonly =           " char01        Character Field Length 1
    iv_rateorquanfrom =         " cpet_userval1  CPE Term - Freely Usable Field
*   iv_currfrom =               " cpet_currfrom  CPE - Currency to Be Converted During Conversion ('from')
*   iv_prunfrom =               " cpet_quotprun  Price Unit of Quotation
    iv_uomfrom =                " cpet_uomfrom  CPE - Unit of Measure to Be Converted During Conv. ('From')
*   iv_currto =                 " cpet_currto   CPE - Currency to Be Converted to During Conversion ('to')
*   iv_prunto =                 " cpet_quotprun  Price Unit of Quotation
    iv_uomto =                  " cpet_uomto    CPE - Unit of Measure Converted to During Conversion
*   iv_fixexchrate =            " cpet_fixexchrate  CPE Term - Fixed Exchange Rate for Currency Conversion
*   iv_factorfrom =             " cpet_factorfrom  CPE - From-Factor for Conversion
*   iv_factorto =               " cpet_factorto  CPE - To-Factor for Conversion
*   iv_doccat =                 " cpet_doccategory  CPE Caller - Document Category
*   iv_exchratedate =           " cpet_refdate  CPE Term - Calculated Reference Date: not used anymore!
*   iv_roundforavgexchrate =    " cpet_roundrule  CPE - Rounding Rule
*   is_conversion =             " cpec_conversion  CPE - Conversion Rule
*   is_quanconv =               " cpec_quanconv  CPE - Quantity Conversion Rule
*   it_quanconv_pair =          " cpet_quanconv_if_tab  CPE - Table Type for Quantity Conv. Interface in Pair Format
*   it_quanconv_list =          " cpet_quanconv_if2_tab  CPE - Table Type for Quantity Conv. Interface in List Form
*   it_rounds =                 " cpet_roundrule_tab  CPE - Table Type for CPE Rounding  Rules
*   it_exchratetoavg =          " cpet_tcurr_sim_tab  CPE - Table type Exchange Rate Simulation
  IMPORTING
    ev_rateorquanto =           " mssiowat      MS SQL Server virtualfilestats: IOSTALLS (ms) per read
    ev_usedexchrate =           " mssiowat      MS SQL Server virtualfilestats: IOSTALLS (ms) per read
    ev_usedfactorfrom =         " mssiowat      MS SQL Server virtualfilestats: IOSTALLS (ms) per read
    ev_usedfactorto =           " mssiowat      MS SQL Server virtualfilestats: IOSTALLS (ms) per read
    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
    FORMULA_EVALUATION_TERMINATED = 1  "
    .  "  CPE_TEST_API_FOR_FE_CONVRULE

ABAP code example for Function Module CPE_TEST_API_FOR_FE_CONVRULE





The ABAP code below is a full code listing to execute function module CPE_TEST_API_FOR_FE_CONVRULE 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_rateorquanto  TYPE MSSIOWAT ,
ld_ev_usedexchrate  TYPE MSSIOWAT ,
ld_ev_usedfactorfrom  TYPE MSSIOWAT ,
ld_ev_usedfactorto  TYPE MSSIOWAT ,
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_evaldate) = 'Check type of data required'.
DATA(ld_iv_quanconvonly) = 'Check type of data required'.
DATA(ld_iv_rateorquanfrom) = 'Check type of data required'.
DATA(ld_iv_currfrom) = 'Check type of data required'.
DATA(ld_iv_prunfrom) = 'Check type of data required'.
DATA(ld_iv_uomfrom) = 'Check type of data required'.
DATA(ld_iv_currto) = 'Check type of data required'.
DATA(ld_iv_prunto) = 'Check type of data required'.
DATA(ld_iv_uomto) = 'Check type of data required'.
DATA(ld_iv_fixexchrate) = 'Check type of data required'.
DATA(ld_iv_factorfrom) = 'Check type of data required'.
DATA(ld_iv_factorto) = 'Check type of data required'.
DATA(ld_iv_doccat) = 'Check type of data required'.
DATA(ld_iv_exchratedate) = 'Check type of data required'.
DATA(ld_iv_roundforavgexchrate) = 'Check type of data required'.
DATA(ld_is_conversion) = 'Check type of data required'.
DATA(ld_is_quanconv) = 'Check type of data required'.
DATA(ld_it_quanconv_pair) = 'Check type of data required'.
DATA(ld_it_quanconv_list) = 'Check type of data required'.
DATA(ld_it_rounds) = 'Check type of data required'.
DATA(ld_it_exchratetoavg) = 'Check type of data required'. . CALL FUNCTION 'CPE_TEST_API_FOR_FE_CONVRULE' EXPORTING * iv_log_priority = ld_iv_log_priority * iv_evaldate = ld_iv_evaldate * iv_quanconvonly = ld_iv_quanconvonly iv_rateorquanfrom = ld_iv_rateorquanfrom * iv_currfrom = ld_iv_currfrom * iv_prunfrom = ld_iv_prunfrom iv_uomfrom = ld_iv_uomfrom * iv_currto = ld_iv_currto * iv_prunto = ld_iv_prunto iv_uomto = ld_iv_uomto * iv_fixexchrate = ld_iv_fixexchrate * iv_factorfrom = ld_iv_factorfrom * iv_factorto = ld_iv_factorto * iv_doccat = ld_iv_doccat * iv_exchratedate = ld_iv_exchratedate * iv_roundforavgexchrate = ld_iv_roundforavgexchrate * is_conversion = ld_is_conversion * is_quanconv = ld_is_quanconv * it_quanconv_pair = ld_it_quanconv_pair * it_quanconv_list = ld_it_quanconv_list * it_rounds = ld_it_rounds * it_exchratetoavg = ld_it_exchratetoavg IMPORTING ev_rateorquanto = ld_ev_rateorquanto ev_usedexchrate = ld_ev_usedexchrate ev_usedfactorfrom = ld_ev_usedfactorfrom ev_usedfactorto = ld_ev_usedfactorto ev_error = ld_ev_error ev_cpemsgno = ld_ev_cpemsgno et_log = ld_et_log EXCEPTIONS FORMULA_EVALUATION_TERMINATED = 1 . " CPE_TEST_API_FOR_FE_CONVRULE
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_rateorquanto  TYPE MSSIOWAT ,
ld_iv_log_priority  TYPE CPET_LOG_PRIORITY ,
ld_ev_usedexchrate  TYPE MSSIOWAT ,
ld_iv_evaldate  TYPE CPET_REFDATE ,
ld_ev_usedfactorfrom  TYPE MSSIOWAT ,
ld_iv_quanconvonly  TYPE CHAR01 ,
ld_ev_usedfactorto  TYPE MSSIOWAT ,
ld_iv_rateorquanfrom  TYPE CPET_USERVAL1 ,
ld_ev_error  TYPE CHAR100 ,
ld_iv_currfrom  TYPE CPET_CURRFROM ,
ld_ev_cpemsgno  TYPE MSGNR ,
ld_iv_prunfrom  TYPE CPET_QUOTPRUN ,
ld_et_log  TYPE CPET_LOG_TAB ,
ld_iv_uomfrom  TYPE CPET_UOMFROM ,
ld_iv_currto  TYPE CPET_CURRTO ,
ld_iv_prunto  TYPE CPET_QUOTPRUN ,
ld_iv_uomto  TYPE CPET_UOMTO ,
ld_iv_fixexchrate  TYPE CPET_FIXEXCHRATE ,
ld_iv_factorfrom  TYPE CPET_FACTORFROM ,
ld_iv_factorto  TYPE CPET_FACTORTO ,
ld_iv_doccat  TYPE CPET_DOCCATEGORY ,
ld_iv_exchratedate  TYPE CPET_REFDATE ,
ld_iv_roundforavgexchrate  TYPE CPET_ROUNDRULE ,
ld_is_conversion  TYPE CPEC_CONVERSION ,
ld_is_quanconv  TYPE CPEC_QUANCONV ,
ld_it_quanconv_pair  TYPE CPET_QUANCONV_IF_TAB ,
ld_it_quanconv_list  TYPE CPET_QUANCONV_IF2_TAB ,
ld_it_rounds  TYPE CPET_ROUNDRULE_TAB ,
ld_it_exchratetoavg  TYPE CPET_TCURR_SIM_TAB .

ld_iv_log_priority = 'Check type of data required'.
ld_iv_evaldate = 'Check type of data required'.
ld_iv_quanconvonly = 'Check type of data required'.
ld_iv_rateorquanfrom = 'Check type of data required'.
ld_iv_currfrom = 'Check type of data required'.
ld_iv_prunfrom = 'Check type of data required'.
ld_iv_uomfrom = 'Check type of data required'.
ld_iv_currto = 'Check type of data required'.
ld_iv_prunto = 'Check type of data required'.
ld_iv_uomto = 'Check type of data required'.
ld_iv_fixexchrate = 'Check type of data required'.
ld_iv_factorfrom = 'Check type of data required'.
ld_iv_factorto = 'Check type of data required'.
ld_iv_doccat = 'Check type of data required'.
ld_iv_exchratedate = 'Check type of data required'.
ld_iv_roundforavgexchrate = 'Check type of data required'.
ld_is_conversion = 'Check type of data required'.
ld_is_quanconv = 'Check type of data required'.
ld_it_quanconv_pair = 'Check type of data required'.
ld_it_quanconv_list = 'Check type of data required'.
ld_it_rounds = 'Check type of data required'.
ld_it_exchratetoavg = '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_API_FOR_FE_CONVRULE or its description.