Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

PO net value

Former Member
0 Kudos

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

13 REPLIES 13

Former Member
0 Kudos

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

0 Kudos

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 ?

0 Kudos

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.

0 Kudos

hi Greetson,

thanks for the BAPI

but it doesnt give net value. the output structure PO_HEADER doesnt have the field.

thanks

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

ritesh_dugad2
Active Participant
0 Kudos

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.

0 Kudos

Hi Ritesh,

Which field should I take from KONV ? KAWRT or KBETR ?

-thnx

Former Member
0 Kudos

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

0 Kudos

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.

ritesh_dugad2
Active Participant
0 Kudos

Hi Dipti,

You should take KONV-KBETR field for calculations.

Thanks

0 Kudos

i have only added EKPO-NETWRs

i still dont know KONV calculation

closing the thrd.