SAP Function Modules

ME_PRICING_POSITION_IR SAP Function module







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

Associated Function Group: MEPR
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM ME_PRICING_POSITION_IR - ME PRICING POSITION IR





CALL FUNCTION 'ME_PRICING_POSITION_IR' "
  EXPORTING
    iv_ebeln =                  " ebeln
    iv_ebelp =                  " ebelp
    iv_bpmng =                  " bpmng
    iv_bldat =                  " prsdt
    iv_knumv_old =              " konv-knumv
    iv_kposn_old =              " konv-kposn
    iv_batch =                  " charg_d
    iv_currency_old =           " waers
    iv_currency_new =           " waers
    iv_exchange_rate =          " kursf
    iv_currency_old_local =     " waers
    iv_currency_new_local =     " waers
*   iv_knumv_new = SPACE        " konv-knumv
    iv_kposn_new =              " konv-kposn
    iv_wwert =                  " wwert_d
    iv_lfbnr =                  " lfbnr
    iv_lfpos =                  " lfpos
    iv_lfbudat =                " budat
    iv_kurst =                  " kurst_003
*   iv_calculation_type = 'G'   " knprs
*   iv_xcprf =                  " xcprf
    iv_diff_invoice =           " xdinv
*   iv_forecast_mode = ABAP_FALSE  " boolean
*   iv_forecast_date =          " cpet_forecast_date
    iv_pricing_qty_gr =         " bpwem
  IMPORTING
    es_komk =                   " komk
    es_komp =                   " komp
    et_komv =                   " komv_tab
  CHANGING
    cv_cpe_guid_e =             " mrm_cpe-cpe_guid_e
  EXCEPTIONS
    PRICING_ERROR = 1           "
    LFA1_ERROR = 2              "
    .  "  ME_PRICING_POSITION_IR

ABAP code example for Function Module ME_PRICING_POSITION_IR





The ABAP code below is a full code listing to execute function module ME_PRICING_POSITION_IR 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_komk  TYPE KOMK ,
ld_es_komp  TYPE KOMP ,
ld_et_komv  TYPE KOMV_TAB .


DATA(ld_cv_cpe_guid_e) = Check type of data required
DATA(ld_iv_ebeln) = 'Check type of data required'.
DATA(ld_iv_ebelp) = 'Check type of data required'.
DATA(ld_iv_bpmng) = 'Check type of data required'.
DATA(ld_iv_bldat) = 'Check type of data required'.

SELECT single KNUMV
FROM KONV
INTO @DATA(ld_iv_knumv_old).


SELECT single KPOSN
FROM KONV
INTO @DATA(ld_iv_kposn_old).

DATA(ld_iv_batch) = 'Check type of data required'.
DATA(ld_iv_currency_old) = 'Check type of data required'.
DATA(ld_iv_currency_new) = 'Check type of data required'.
DATA(ld_iv_exchange_rate) = 'Check type of data required'.
DATA(ld_iv_currency_old_local) = 'Check type of data required'.
DATA(ld_iv_currency_new_local) = 'Check type of data required'.

SELECT single KNUMV
FROM KONV
INTO @DATA(ld_iv_knumv_new).


SELECT single KPOSN
FROM KONV
INTO @DATA(ld_iv_kposn_new).

DATA(ld_iv_wwert) = 'Check type of data required'.
DATA(ld_iv_lfbnr) = 'Check type of data required'.
DATA(ld_iv_lfpos) = 'Check type of data required'.
DATA(ld_iv_lfbudat) = 'Check type of data required'.
DATA(ld_iv_kurst) = 'Check type of data required'.
DATA(ld_iv_calculation_type) = 'Check type of data required'.
DATA(ld_iv_xcprf) = 'Check type of data required'.
DATA(ld_iv_diff_invoice) = 'Check type of data required'.
DATA(ld_iv_forecast_mode) = 'Check type of data required'.
DATA(ld_iv_forecast_date) = 'Check type of data required'.
DATA(ld_iv_pricing_qty_gr) = 'Check type of data required'. . CALL FUNCTION 'ME_PRICING_POSITION_IR' EXPORTING iv_ebeln = ld_iv_ebeln iv_ebelp = ld_iv_ebelp iv_bpmng = ld_iv_bpmng iv_bldat = ld_iv_bldat iv_knumv_old = ld_iv_knumv_old iv_kposn_old = ld_iv_kposn_old iv_batch = ld_iv_batch iv_currency_old = ld_iv_currency_old iv_currency_new = ld_iv_currency_new iv_exchange_rate = ld_iv_exchange_rate iv_currency_old_local = ld_iv_currency_old_local iv_currency_new_local = ld_iv_currency_new_local * iv_knumv_new = ld_iv_knumv_new iv_kposn_new = ld_iv_kposn_new iv_wwert = ld_iv_wwert iv_lfbnr = ld_iv_lfbnr iv_lfpos = ld_iv_lfpos iv_lfbudat = ld_iv_lfbudat iv_kurst = ld_iv_kurst * iv_calculation_type = ld_iv_calculation_type * iv_xcprf = ld_iv_xcprf iv_diff_invoice = ld_iv_diff_invoice * iv_forecast_mode = ld_iv_forecast_mode * iv_forecast_date = ld_iv_forecast_date iv_pricing_qty_gr = ld_iv_pricing_qty_gr IMPORTING es_komk = ld_es_komk es_komp = ld_es_komp et_komv = ld_et_komv CHANGING cv_cpe_guid_e = ld_cv_cpe_guid_e EXCEPTIONS PRICING_ERROR = 1 LFA1_ERROR = 2 . " ME_PRICING_POSITION_IR
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_cv_cpe_guid_e  TYPE MRM_CPE-CPE_GUID_E ,
ld_es_komk  TYPE KOMK ,
ld_iv_ebeln  TYPE EBELN ,
ld_es_komp  TYPE KOMP ,
ld_iv_ebelp  TYPE EBELP ,
ld_et_komv  TYPE KOMV_TAB ,
ld_iv_bpmng  TYPE BPMNG ,
ld_iv_bldat  TYPE PRSDT ,
ld_iv_knumv_old  TYPE KONV-KNUMV ,
ld_iv_kposn_old  TYPE KONV-KPOSN ,
ld_iv_batch  TYPE CHARG_D ,
ld_iv_currency_old  TYPE WAERS ,
ld_iv_currency_new  TYPE WAERS ,
ld_iv_exchange_rate  TYPE KURSF ,
ld_iv_currency_old_local  TYPE WAERS ,
ld_iv_currency_new_local  TYPE WAERS ,
ld_iv_knumv_new  TYPE KONV-KNUMV ,
ld_iv_kposn_new  TYPE KONV-KPOSN ,
ld_iv_wwert  TYPE WWERT_D ,
ld_iv_lfbnr  TYPE LFBNR ,
ld_iv_lfpos  TYPE LFPOS ,
ld_iv_lfbudat  TYPE BUDAT ,
ld_iv_kurst  TYPE KURST_003 ,
ld_iv_calculation_type  TYPE KNPRS ,
ld_iv_xcprf  TYPE XCPRF ,
ld_iv_diff_invoice  TYPE XDINV ,
ld_iv_forecast_mode  TYPE BOOLEAN ,
ld_iv_forecast_date  TYPE CPET_FORECAST_DATE ,
ld_iv_pricing_qty_gr  TYPE BPWEM .


ld_cv_cpe_guid_e = Check type of data required
ld_iv_ebeln = 'Check type of data required'.
ld_iv_ebelp = 'Check type of data required'.
ld_iv_bpmng = 'Check type of data required'.
ld_iv_bldat = 'Check type of data required'.

SELECT single KNUMV
FROM KONV
INTO ld_iv_knumv_old.


SELECT single KPOSN
FROM KONV
INTO ld_iv_kposn_old.

ld_iv_batch = 'Check type of data required'.
ld_iv_currency_old = 'Check type of data required'.
ld_iv_currency_new = 'Check type of data required'.
ld_iv_exchange_rate = 'Check type of data required'.
ld_iv_currency_old_local = 'Check type of data required'.
ld_iv_currency_new_local = 'Check type of data required'.

SELECT single KNUMV
FROM KONV
INTO ld_iv_knumv_new.


SELECT single KPOSN
FROM KONV
INTO ld_iv_kposn_new.

ld_iv_wwert = 'Check type of data required'.
ld_iv_lfbnr = 'Check type of data required'.
ld_iv_lfpos = 'Check type of data required'.
ld_iv_lfbudat = 'Check type of data required'.
ld_iv_kurst = 'Check type of data required'.
ld_iv_calculation_type = 'Check type of data required'.
ld_iv_xcprf = 'Check type of data required'.
ld_iv_diff_invoice = 'Check type of data required'.
ld_iv_forecast_mode = 'Check type of data required'.
ld_iv_forecast_date = 'Check type of data required'.
ld_iv_pricing_qty_gr = '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 ME_PRICING_POSITION_IR or its description.