2008 Jun 02 6:18 PM
Hi,
I am trying to get the PO net value . me23n - header section - tab 'Conditions' - field 'Net'
on reading old threads i got some function modules
ME_FILL_KOMK_PO
ME_FILL_KOMP_PO
ME_DETERMINE_NET_PRICE
MM_NET_PRICE_CALCULATE
ME_GET_PRICE_CONDITION
ME_DETERMINE_SALES_PRICE
ME_PRICING_MARKET_PRICE
ME_SELECT_SOURCE_BY_PRICE
CALCULATE_TAX_ITEM
I am stil trying to figure out how to use these to get the PO Net value.
I am not MM functional, I am an ABAPer
Could you please give any guidance ?
thank you in advance
dipti
Hi,
I am trying to get the PO net value . me23n - header section - tab 'Conditions' - field 'Net'
on reading old threads i got some function modules
ME_FILL_KOMK_PO
ME_FILL_KOMP_PO
ME_DETERMINE_NET_PRICE
MM_NET_PRICE_CALCULATE
ME_GET_PRICE_CONDITION
ME_DETERMINE_SALES_PRICE
ME_PRICING_MARKET_PRICE
ME_SELECT_SOURCE_BY_PRICE
CALCULATE_TAX_ITEM
I am stil trying to figure out how to use these to get the PO Net value.
I am not MM functional, I am an ABAPer
Could you please give any guidance ?
thank you in advance
dipti
2008 Jun 02 6:28 PM
Hi,Select KNUMV from EKKO by passing the Purchase Order No.
With the retrieved KNUMV, go to KONV and get the KBETR, which should give you the Net Amount.
Regards,
Faheem
2008 Jun 02 7:16 PM
Hi Faheem,
If there are multiple records in KONV for the KNUMV, should I add them up ?
I did the same method as you said for one of the POs. But I got another value.
I pickd EKKO-KNUMV for the purchase order and then added KONV-KBETR for the entriesfor this KNUMV
but the total is 20,000 which the net value should in me23n is 100,000,000
is there any further calculation with EKPO values also ?
2008 Jun 02 7:24 PM
Hello Dipti,
Use the BAPI "BAPI_PO_GETDETAIL" to get the net price of the PO. Pass the Po number in the import parameter.
Hope this answers your question.
2008 Jun 02 7:36 PM
hi Greetson,
thanks for the BAPI
but it doesnt give net value. the output structure PO_HEADER doesnt have the field.
thanks
2008 Jun 02 7:43 PM
Hello Depti,
Check the table parameters:
POCONDHEADER
POCOND
POITEM
Two options you have :
1) Retrieve the net value from the pricing Condition values table parameter or
2) use the PO Items table parameter and sum all the item net values.
Hope this helps.
Thanks,
Greetson
2008 Jun 02 6:40 PM
Hi Dipti,
Please check this
ME_DETERMINE_NET_PRICE
DATA: BEGIN OF xa068 OCCURS 10.
INCLUDE STRUCTURE a068.
DATA: END OF xa068.
CALL FUNCTION 'ME_DETERMINE_NET_PRICE'
EXPORTING
i_kotabnr = '068'
i_komg = komg
i_komk = komk
i_komp = komp
i_kappl = 'M'
i_date = sy-datlo
i_kschl = xa068-kschl
IMPORTING
e_komp = komp.MM_NET_PRICE_CALCULATE
DATA: T_KONP LIKE KONP OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'MM_NET_PRICE_CALCULATE'
EXPORTING
I_KOMK = KOMK
I_KOMP = KOMP
IMPORTING
E_KOMP = KOMP
TABLES
T_KONP = T_KONP
EXCEPTIONS
OTHERS = 0.ME_DETERMINE_SALES_PRICE
DATA: gtkomp TYPE t_stab_gtkomp WITH HEADER LINE.
CALL FUNCTION 'ME_DETERMINE_SALES_PRICE'
EXPORTING
I_EKKO = EKKO
I_EKPO = EKPO
I_T001 = T001
I_BUDAT = PREISDATUM "= Buchungsdatum
I_ONLY_LOCAL_CURRENCY = 'X'
IMPORTING
E_VKWRT = GTKOMP-VKWRT
E_VKWRA = GTKOMP-VKWRA
TABLES
I_TKOMV = TKOMV.Best regards,
raam
2008 Jun 02 7:18 PM
Hi Raam,
what should I give in all those structures ?
where should I give the PO number ?
what else do i need apart from PO number ? do i need all those values of so many structures komg , komk, komp ?
thanks
2008 Jun 03 8:41 AM
Once you get the conditionss pricing, you also have to add to it the net price for each PO line Item. You can use EKPO-NETWR or EKPO-BRTWR for this.
The conditions table KONV stores pricing condtion data for both line items as well as for header. So you have to know if your conditions are maintained at header level or at item level in the PO. You can ask this to your MM consultant. If it is maintained at header level then only select rows where konv-kposn is '000000' or space. If pricing conditions are maintained at item level then select rows where konv-kposn NE '000000' or space.
Hope this way you will get the net price of PO.
2008 Jun 03 2:01 PM
Hi Ritesh,
Which field should I take from KONV ? KAWRT or KBETR ?
-thnx
2008 Jun 03 2:46 PM
Hi,
Faheem is correct.
Select KNUMV from EKKO by passing the Purchase Order No.
With the retrieved KNUMV, go to KONV and get the KWERT field, which should give you the Net Amount.
Thanks
Ramesh
2008 Jun 03 6:32 PM
hi,
if i add all the EKPO-NETWRs and KONV-KWERTs then the figure doesnt match the Net value
if i add only the EKPO-NETWRs then it does match
are the condition values not considered in the EKPO-NETWR for the items ?
why do I have to visit the KONV table at all ?
if yes, how should I calculate ?
in the KONV table,
KWERT = KAWRT*KBETR. (condition base value * conditon rate)
KAWRT = EKPO-NETWR for condition types NAVS and SKTO whereas
KAWRT = some other value for condition types PB00 and WOTB
i dont know if these condition types are standard or custom
is it that both the tables EKPO and KONV shudnt be used together and any one of the two EKPO or KONV should be chosen to get the Net value (as given in the BAPI example above)
thanks.
2008 Jun 04 5:31 AM
Hi Dipti,
You should take KONV-KBETR field for calculations.
Thanks
2008 Jun 05 1:20 PM
i have only added EKPO-NETWRs
i still dont know KONV calculation
closing the thrd.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |