SAP Function Modules

PRC_CNV_UNIT_CONV_ALT_TO_BASE SAP Function module - Convert Alternative to Base Product Unit







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

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


Pattern for FM PRC_CNV_UNIT_CONV_ALT_TO_BASE - PRC CNV UNIT CONV ALT TO BASE





CALL FUNCTION 'PRC_CNV_UNIT_CONV_ALT_TO_BASE' "Convert Alternative to Base Product Unit
  EXPORTING
    iv_alt_quantity =           " cnvt_quantity  Quantity
    iv_alt_unit =               " cnvt_quantity_unit  Quantity Unit
    iv_base_unit =              " cnvt_quantity_unit  Quantity Unit
    it_alt_quantity_unit =      " cnvt_alt_quantity_unit_t  Alternative Quantity Unit With Conversion Factors
  IMPORTING
    es_profile =                " cnvt_profile  Profile of the IPC call
    ev_base_quantity =          " cnvt_quantity  Quantity
    ev_numerator =              " cnvt_numerator  Numerator for Conversion into Base Quantity Unit
    ev_denominator =            " cnvt_denominator  Denominator for Conversion into Base Quantity Unit
    ev_exponent =               " cnvt_exponent  Exponent for Conversion into Base Quantity Unit
    .  "  PRC_CNV_UNIT_CONV_ALT_TO_BASE

ABAP code example for Function Module PRC_CNV_UNIT_CONV_ALT_TO_BASE





The ABAP code below is a full code listing to execute function module PRC_CNV_UNIT_CONV_ALT_TO_BASE 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_es_profile  TYPE CNVT_PROFILE ,
ld_ev_base_quantity  TYPE CNVT_QUANTITY ,
ld_ev_numerator  TYPE CNVT_NUMERATOR ,
ld_ev_denominator  TYPE CNVT_DENOMINATOR ,
ld_ev_exponent  TYPE CNVT_EXPONENT .

DATA(ld_iv_alt_quantity) = 'Check type of data required'.
DATA(ld_iv_alt_unit) = 'Check type of data required'.
DATA(ld_iv_base_unit) = 'Check type of data required'.
DATA(ld_it_alt_quantity_unit) = 'Check type of data required'. . CALL FUNCTION 'PRC_CNV_UNIT_CONV_ALT_TO_BASE' EXPORTING iv_alt_quantity = ld_iv_alt_quantity iv_alt_unit = ld_iv_alt_unit iv_base_unit = ld_iv_base_unit it_alt_quantity_unit = ld_it_alt_quantity_unit IMPORTING es_profile = ld_es_profile ev_base_quantity = ld_ev_base_quantity ev_numerator = ld_ev_numerator ev_denominator = ld_ev_denominator ev_exponent = ld_ev_exponent . " PRC_CNV_UNIT_CONV_ALT_TO_BASE
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_es_profile  TYPE CNVT_PROFILE ,
ld_iv_alt_quantity  TYPE CNVT_QUANTITY ,
ld_ev_base_quantity  TYPE CNVT_QUANTITY ,
ld_iv_alt_unit  TYPE CNVT_QUANTITY_UNIT ,
ld_ev_numerator  TYPE CNVT_NUMERATOR ,
ld_iv_base_unit  TYPE CNVT_QUANTITY_UNIT ,
ld_ev_denominator  TYPE CNVT_DENOMINATOR ,
ld_it_alt_quantity_unit  TYPE CNVT_ALT_QUANTITY_UNIT_T ,
ld_ev_exponent  TYPE CNVT_EXPONENT .

ld_iv_alt_quantity = 'Check type of data required'.
ld_iv_alt_unit = 'Check type of data required'.
ld_iv_base_unit = 'Check type of data required'.
ld_it_alt_quantity_unit = '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 PRC_CNV_UNIT_CONV_ALT_TO_BASE or its description.