SAP Function Modules

ME_PRICING_PREPARE_DINV SAP Function module







ME_PRICING_PREPARE_DINV 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_PREPARE_DINV 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_PREPARE_DINV - ME PRICING PREPARE DINV





CALL FUNCTION 'ME_PRICING_PREPARE_DINV' "
  EXPORTING
    iv_currency =               " waers
    iv_exchange_rate =          " kursf
    iv_bldat =                  " bldat
    iv_wwert =                  " wwert_d
    iv_batch =                  " charg_d
    iv_bpmng =                  " bpmng
    iv_ebeln =                  " ebeln
    iv_ebelp =                  " ebelp
    iv_lfbnr =                  " lfbnr
    iv_lfpos =                  " lfpos
    iv_lfbudat =                " budat
    iv_kurst =                  " kurst_003
    iv_knumv =                  " knumv
    iv_kposn =                  " kposn
    iv_forecast_mode =          " boolean
*   iv_forecast_date =          " cpet_forecast_date
  IMPORTING
    es_komk =                   " komk
    es_komp =                   " komp
    .  "  ME_PRICING_PREPARE_DINV

ABAP code example for Function Module ME_PRICING_PREPARE_DINV





The ABAP code below is a full code listing to execute function module ME_PRICING_PREPARE_DINV 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 .

DATA(ld_iv_currency) = 'Check type of data required'.
DATA(ld_iv_exchange_rate) = 'Check type of data required'.
DATA(ld_iv_bldat) = 'Check type of data required'.
DATA(ld_iv_wwert) = 'Check type of data required'.
DATA(ld_iv_batch) = 'Check type of data required'.
DATA(ld_iv_bpmng) = '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_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_knumv) = 'Check type of data required'.
DATA(ld_iv_kposn) = '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'. . CALL FUNCTION 'ME_PRICING_PREPARE_DINV' EXPORTING iv_currency = ld_iv_currency iv_exchange_rate = ld_iv_exchange_rate iv_bldat = ld_iv_bldat iv_wwert = ld_iv_wwert iv_batch = ld_iv_batch iv_bpmng = ld_iv_bpmng iv_ebeln = ld_iv_ebeln iv_ebelp = ld_iv_ebelp iv_lfbnr = ld_iv_lfbnr iv_lfpos = ld_iv_lfpos iv_lfbudat = ld_iv_lfbudat iv_kurst = ld_iv_kurst iv_knumv = ld_iv_knumv iv_kposn = ld_iv_kposn iv_forecast_mode = ld_iv_forecast_mode * iv_forecast_date = ld_iv_forecast_date IMPORTING es_komk = ld_es_komk es_komp = ld_es_komp . " ME_PRICING_PREPARE_DINV
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_komk  TYPE KOMK ,
ld_iv_currency  TYPE WAERS ,
ld_es_komp  TYPE KOMP ,
ld_iv_exchange_rate  TYPE KURSF ,
ld_iv_bldat  TYPE BLDAT ,
ld_iv_wwert  TYPE WWERT_D ,
ld_iv_batch  TYPE CHARG_D ,
ld_iv_bpmng  TYPE BPMNG ,
ld_iv_ebeln  TYPE EBELN ,
ld_iv_ebelp  TYPE EBELP ,
ld_iv_lfbnr  TYPE LFBNR ,
ld_iv_lfpos  TYPE LFPOS ,
ld_iv_lfbudat  TYPE BUDAT ,
ld_iv_kurst  TYPE KURST_003 ,
ld_iv_knumv  TYPE KNUMV ,
ld_iv_kposn  TYPE KPOSN ,
ld_iv_forecast_mode  TYPE BOOLEAN ,
ld_iv_forecast_date  TYPE CPET_FORECAST_DATE .

ld_iv_currency = 'Check type of data required'.
ld_iv_exchange_rate = 'Check type of data required'.
ld_iv_bldat = 'Check type of data required'.
ld_iv_wwert = 'Check type of data required'.
ld_iv_batch = 'Check type of data required'.
ld_iv_bpmng = 'Check type of data required'.
ld_iv_ebeln = 'Check type of data required'.
ld_iv_ebelp = '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_knumv = 'Check type of data required'.
ld_iv_kposn = 'Check type of data required'.
ld_iv_forecast_mode = 'Check type of data required'.
ld_iv_forecast_date = '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_PREPARE_DINV or its description.