SAP ME_PRICING_POSITION Function Module for NOTRANSL: Preisermittlung beim Kontrakt
ME_PRICING_POSITION is a standard me pricing position SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Preisermittlung beim Kontrakt 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 me pricing position FM, simply by entering the name ME_PRICING_POSITION into the relevant SAP transaction such as SE37 or SE38.
Function Group: MEPR
Program Name: SAPLMEPR
Main Program: SAPLMEPR
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function ME_PRICING_POSITION 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 'ME_PRICING_POSITION'"NOTRANSL: Preisermittlung beim Kontrakt.
EXPORTING
KOPF = "Purchasing Document Header
* IV_FORCE_PRICE_CALC = "Checkbox
* LIEFERANT_A = "Vendor Master (General Section)
* LIEFERANT_M = "Vendor master record purchasing organization data
* MATERIAL = "Material Master Fields: Purchasing
POSITION = "Purchasing Document Item
* PREISFINDUNGSART = 'C' "
* PREISFINDUNGSMENGE = "Purchase Order Quantity
* WEDATEN = "Data for Price Determination at Time of Goods Receipt
* IS_ENHANCEMENT = "IS Enhancement Structure - FM Import Parameter
IMPORTING
NAVNW = "Non-deductible input tax
E_BPUMZ = "Numerator for Conversion of Order Price Unit into Order Unit
E_BPUMN = "Denominator for Conv. of Order Price Unit into Order Unit
E_KOMK = "Communication Header for Pricing
E_KOMP = "Communication Item for Pricing
NETWR = "Net Order Value in PO Currency
VKWRT = "Value at Sales Prices Including Value-Added Tax
VKWRA = "Value at Sales Prices Including Value-Added Tax
VKWRT_WAERS = "Currency Key
VKWRA_WAERS = "Currency Key
E_MSGID = "ABAP System Field: Message ID
E_MSGNO = "ABAP System Field: Message Number
E_ERROR = "Price determination error at time of goods receipt
CHANGING
* CS_ENHANCEMENT = "IS Enhancement Structure - Form Change Parameter
TABLES
* I_TKOMV = "Pricing Communications-Condition Record
IMPORTING Parameters details for ME_PRICING_POSITION
KOPF - Purchasing Document Header
Data type: EKKOOptional: No
Call by Reference: No ( called with pass by value option)
IV_FORCE_PRICE_CALC - Checkbox
Data type: XFELDOptional: Yes
Call by Reference: No ( called with pass by value option)
LIEFERANT_A - Vendor Master (General Section)
Data type: LFA1Optional: Yes
Call by Reference: No ( called with pass by value option)
LIEFERANT_M - Vendor master record purchasing organization data
Data type: LFM1Optional: Yes
Call by Reference: No ( called with pass by value option)
MATERIAL - Material Master Fields: Purchasing
Data type: MT06EOptional: Yes
Call by Reference: No ( called with pass by value option)
POSITION - Purchasing Document Item
Data type: EKPOOptional: No
Call by Reference: No ( called with pass by value option)
PREISFINDUNGSART -
Data type:Default: 'C'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PREISFINDUNGSMENGE - Purchase Order Quantity
Data type: EKPO-MENGEOptional: Yes
Call by Reference: No ( called with pass by value option)
WEDATEN - Data for Price Determination at Time of Goods Receipt
Data type: MEPRWEOptional: Yes
Call by Reference: No ( called with pass by value option)
IS_ENHANCEMENT - IS Enhancement Structure - FM Import Parameter
Data type: ISI_ME_PRICING_POSITIONOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for ME_PRICING_POSITION
NAVNW - Non-deductible input tax
Data type: EKPO-NAVNWOptional: No
Call by Reference: No ( called with pass by value option)
E_BPUMZ - Numerator for Conversion of Order Price Unit into Order Unit
Data type: EKPO-BPUMZOptional: No
Call by Reference: No ( called with pass by value option)
E_BPUMN - Denominator for Conv. of Order Price Unit into Order Unit
Data type: EKPO-BPUMNOptional: No
Call by Reference: No ( called with pass by value option)
E_KOMK - Communication Header for Pricing
Data type: KOMKOptional: No
Call by Reference: No ( called with pass by value option)
E_KOMP - Communication Item for Pricing
Data type: KOMPOptional: No
Call by Reference: No ( called with pass by value option)
NETWR - Net Order Value in PO Currency
Data type: EKPO-NETWROptional: No
Call by Reference: No ( called with pass by value option)
VKWRT - Value at Sales Prices Including Value-Added Tax
Data type: MSEG-VKWRTOptional: No
Call by Reference: No ( called with pass by value option)
VKWRA - Value at Sales Prices Including Value-Added Tax
Data type: MSEG-VKWRTOptional: No
Call by Reference: No ( called with pass by value option)
VKWRT_WAERS - Currency Key
Data type: T001-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
VKWRA_WAERS - Currency Key
Data type: T001-WAERSOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGID - ABAP System Field: Message ID
Data type: SY-MSGIDOptional: No
Call by Reference: No ( called with pass by value option)
E_MSGNO - ABAP System Field: Message Number
Data type: SY-MSGNOOptional: No
Call by Reference: No ( called with pass by value option)
E_ERROR - Price determination error at time of goods receipt
Data type: EBEFU-PRERROptional: No
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for ME_PRICING_POSITION
CS_ENHANCEMENT - IS Enhancement Structure - Form Change Parameter
Data type: ISC_ME_PRICING_POSITIONOptional: Yes
Call by Reference: Yes
TABLES Parameters details for ME_PRICING_POSITION
I_TKOMV - Pricing Communications-Condition Record
Data type: KOMVOptional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for ME_PRICING_POSITION 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_kopf | TYPE EKKO, " | |||
| lv_navnw | TYPE EKPO-NAVNW, " | |||
| lt_i_tkomv | TYPE STANDARD TABLE OF KOMV, " | |||
| lv_cs_enhancement | TYPE ISC_ME_PRICING_POSITION, " | |||
| lv_e_bpumz | TYPE EKPO-BPUMZ, " | |||
| lv_iv_force_price_calc | TYPE XFELD, " | |||
| lv_e_bpumn | TYPE EKPO-BPUMN, " | |||
| lv_e_komk | TYPE KOMK, " | |||
| lv_e_komp | TYPE KOMP, " | |||
| lv_netwr | TYPE EKPO-NETWR, " | |||
| lv_lieferant_a | TYPE LFA1, " | |||
| lv_vkwrt | TYPE MSEG-VKWRT, " | |||
| lv_lieferant_m | TYPE LFM1, " | |||
| lv_vkwra | TYPE MSEG-VKWRT, " | |||
| lv_material | TYPE MT06E, " | |||
| lv_position | TYPE EKPO, " | |||
| lv_vkwrt_waers | TYPE T001-WAERS, " | |||
| lv_vkwra_waers | TYPE T001-WAERS, " | |||
| lv_preisfindungsart | TYPE T001, " 'C' | |||
| lv_e_msgid | TYPE SY-MSGID, " | |||
| lv_preisfindungsmenge | TYPE EKPO-MENGE, " | |||
| lv_e_msgno | TYPE SY-MSGNO, " | |||
| lv_wedaten | TYPE MEPRWE, " | |||
| lv_e_error | TYPE EBEFU-PRERR, " | |||
| lv_is_enhancement | TYPE ISI_ME_PRICING_POSITION. " |
|   CALL FUNCTION 'ME_PRICING_POSITION' "NOTRANSL: Preisermittlung beim Kontrakt |
| EXPORTING | ||
| KOPF | = lv_kopf | |
| IV_FORCE_PRICE_CALC | = lv_iv_force_price_calc | |
| LIEFERANT_A | = lv_lieferant_a | |
| LIEFERANT_M | = lv_lieferant_m | |
| MATERIAL | = lv_material | |
| POSITION | = lv_position | |
| PREISFINDUNGSART | = lv_preisfindungsart | |
| PREISFINDUNGSMENGE | = lv_preisfindungsmenge | |
| WEDATEN | = lv_wedaten | |
| IS_ENHANCEMENT | = lv_is_enhancement | |
| IMPORTING | ||
| NAVNW | = lv_navnw | |
| E_BPUMZ | = lv_e_bpumz | |
| E_BPUMN | = lv_e_bpumn | |
| E_KOMK | = lv_e_komk | |
| E_KOMP | = lv_e_komp | |
| NETWR | = lv_netwr | |
| VKWRT | = lv_vkwrt | |
| VKWRA | = lv_vkwra | |
| VKWRT_WAERS | = lv_vkwrt_waers | |
| VKWRA_WAERS | = lv_vkwra_waers | |
| E_MSGID | = lv_e_msgid | |
| E_MSGNO | = lv_e_msgno | |
| E_ERROR | = lv_e_error | |
| CHANGING | ||
| CS_ENHANCEMENT | = lv_cs_enhancement | |
| TABLES | ||
| I_TKOMV | = lt_i_tkomv | |
| . " ME_PRICING_POSITION | ||
ABAP code using 7.40 inline data declarations to call FM ME_PRICING_POSITION
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.| "SELECT single NAVNW FROM EKPO INTO @DATA(ld_navnw). | ||||
| "SELECT single BPUMZ FROM EKPO INTO @DATA(ld_e_bpumz). | ||||
| "SELECT single BPUMN FROM EKPO INTO @DATA(ld_e_bpumn). | ||||
| "SELECT single NETWR FROM EKPO INTO @DATA(ld_netwr). | ||||
| "SELECT single VKWRT FROM MSEG INTO @DATA(ld_vkwrt). | ||||
| "SELECT single VKWRT FROM MSEG INTO @DATA(ld_vkwra). | ||||
| "SELECT single WAERS FROM T001 INTO @DATA(ld_vkwrt_waers). | ||||
| "SELECT single WAERS FROM T001 INTO @DATA(ld_vkwra_waers). | ||||
| DATA(ld_preisfindungsart) | = 'C'. | |||
| "SELECT single MSGID FROM SY INTO @DATA(ld_e_msgid). | ||||
| "SELECT single MENGE FROM EKPO INTO @DATA(ld_preisfindungsmenge). | ||||
| "SELECT single MSGNO FROM SY INTO @DATA(ld_e_msgno). | ||||
| "SELECT single PRERR FROM EBEFU INTO @DATA(ld_e_error). | ||||
Search for further information about these or an SAP related objects