Update Routine - Deaggegation - Net Price

Dear sdn's
For a object '0NETPRICE' , i am using the following update routine.    
IF ( COMM_STRUCTURE-processkey =       '002'  OR     COMM_STRUCTURE-processkey       =       '012'  OR
COMM_STRUCTURE-processkey       =       '022')
AND COMM_STRUCTURE-bwapplnm EQ 'MM'
Here GR Qty (31,969), GR Val (286,122.55) loading correctly. Net price getting aggreagted. In the folowing example i should get only 7.56 instead of 30.24. Inversion also problem, it will through only "0'.
Netprice    GR Qty    GR Val        Document Number
7.56          50,819-     454,830.05-     4500008362
7.56     66,886     598,629.70     4500008362
7.56     66,886-     598,629.70-     4500008362
7.56     82,788     740,952.60     4500008362
30.24     31,969     286,122.55     
Can anybody suugest me the logic in routine ...?
Regards
Raju Saravanan

Hi,
( COMM_STRUCTURE-PROCESSKEY = '002' or
     COMM_STRUCTURE-PROCESSKEY = '012' or
     COMM_STRUCTURE-PROCESSKEY = '022' )
     AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
     AND COMM_STRUCTURE-CPQUAOU <> 0.
     perFORM QUANTITY_CONVERT
        USING    COMM_STRUCTURE-CPQUAOU
                 COMM_STRUCTURE-po_UNIT
                 COMM_STRUCTURE-base_uom
                 COMM_STRUCTURE-numerator
                 COMM_STRUCTURE-denomintr
        CHANGING RESULT.
if COMM_STRUCTURE-/BIC/ZPEINH ne 0.
  RESULT = RESULT * COMM_STRUCTURE-/BIC/ZSTPRS1.
  RESULT = RESULT / COMM_STRUCTURE-/BIC/ZPEINH.
else.
  RESULT = 0.
Endif.
if the returncode is not equal zero, the result will not be updated
  RETURNCODE = 0.
  else.
   RETURNCODE = 4.
endif.
result value of the routine
RESULT = .
result value of the unit
  UNIT = COMM_STRUCTURE-CURRENCY.
if the returncode is not equal zero, the result will not be updated
RETURNCODE = 0.
if abort is not equal zero, the update process will be canceled
  ABORT = 0.
the above code using.....please suggest

Similar Messages

  • Net price update in creation of the purchase order

    Guys,
    I have a query, please find the details below.
    I have created a ABAP for posting the purchase orders using the BAPI function 'BAPI_PO_CREATE1', I am passing the net price value in the input file. But the system is taking the net price from the purchase info record of that material. My own net price is not considered.
    Please find my observations below.
    1. First of all system is checking whether there is a PIR maintained for the material or not. If PIR is maintained, then system is defaultly considering the net price maintained in the PIR.
    2. Later I have deleted the net price maintained in PIR. In this case, system is considering the net price of that material from the previous purchase order.
    But my query is that I don't want the system to consider the net price from previous material, I want to update my own net price to line item of the PO.
    Could anyone please suggest me how should I proceed further so solve this query?
    Thanks in advance.
    Regards,
    Vijaymadhur.

    Hi,
    Yes, this can be achieved. Don't maintain any price in inforecord. Then in SPRO > Materials Management > Purchasing > Environment Data > Define default value for buyers > Here click on settings on default values > In Inforecord update > Maintain no update fro PO and quotation.
    Now the last PO price will not be saved in Inforecord and hence this will not b carried to PO.
    Regards,
    Prabu

  • Net Price Update in Inforecord through transaction XK15

    Hello Experts,
    For a combination of Vendor,Material,Purch. Organization & Plant, when the "amount" field is maintained with some value in XK15, it is not reflecting OR updating in inforecord master data--> "Net Price" field (for the same combination of values).
    But when we update it in ME12 transaction for the above combination, it is updating in inforecord "Net Price" field.
    1)Whether amount updation through XK15 will update the inforecord (As a standard SAP functionality or feature)?
    2)If the SAP standard feature as per point No.1 exists, then what could be the root cause for the 'net price' not being updated in inforecord?
    Regards
    Mahesh

    hi,
    Please refer this post
    Table EINE is not get updated with the new net price per unit.
    and
    Function to Update Info Record price
    Edited by: redriver on Nov 29, 2011 12:49 PM

  • Why Info record net price is 0

    info record price is 20hkd/1pc in the past peried. as the price change, i have create a new price in current peried and save it(price is not 0). when i use me12 again and find  organazation data view price is 0. and click the condion but the price is not 0,
    notes  685117  suggest use report RM06INP0 to Solution
    in current peried  why happen this issue?

    Hi,
    The price in the info record (EINE-NETPR) does not always agree with the price that is taken from the info record when creating a purchase order. The most common cause is that the condition was updated by condition maintenance. This will not translate into a direct update of the net price in ME13 (display info record). If you want the net price to show exactly as the info record condition, then schedule report/program RM06INP0. This will do an update routine and synchronize prices.
    Regards
    Govind

  • Net Price in PO Item not updating for Item Category "D"

    In purchase order with line item category "D" Service, upon first input of gross price in Service tab, Net Price in line item was updated successfully, but upon changing the gross price again in service tab, Net Price in line item is not updating anymore.
    I am using the condition type MWVS for tax calculation and a custom condition type ZPBX for the computation of Net Price = Gross Price - Tax. For ZPBX I used the calculation routine 82 (xkwert = komp-kzwi2 - xworkg.). For other item category, this is working fine. I am only having a problem in item category "D".
    I tried to debug and found out that upon entering a new gross price in service tab, the system is calculating the routine 82 first before even the gross price from service tab was transferred to the condition in line item. Because of that the routine 82 is calculating with the previous or old value in table KOMP since the gross price from service tab is not yet transfered to this table.
    Can anyone help me with this? What am I doing wrong?
    Thanks!

    Hi,
    Check which condition type used for Service PO pricing. Now use t. code: M/06 and enter that condition type and select check boxes of Amount/percent, Value, Qty Relation in Changes which can be made segment and save.
    Also select check box of u201CQty Conversionu201D in Control-2 segment and save.
    Now create service PO, change Price in service item level and see how NET PRICE changing.
    Regards,
    Biju K

  • Net Price not Updating Using BAPI : BAPI_CONTRACT_CREATE

    Dear Experts,
    I am facing an issue while creating CONTRACT using the bapi: BAPI_CONTRACT_CREATE. I am creating the Contract based on data from my excel sheet. And we are maintaining the INFO RECORDS for the same materials.
    In the excel sheet we are providing the NetPrice (NETPR) and creating the Contract. My issue is " instead of taking the Net Price from the excel it is taking the Net Price from Info Records". For Example, if for a Particular material the Net Price in our excel file is 125, after bapi execution, the net price is updating as 100 instead of 125 in Contract Creation( ME31k-ME33K). In the Info Records we are maintaining this net price(100) for that material.
    Thanks in Advance for your response.
    Regards,
    Prasad

    you can use BAPI_CONTRACT_CREATEFROMDATA
    * Create Contract Order Number [BAPI_CONTRACT_CREATEFROMDATA]
      CALL FUNCTION 'BAPI_CONTRACT_CREATEFROMDATA'
           EXPORTING
             contract_header_in      = header
             convert                 = 'X'
           IMPORTING
             salesdocument           = v_order
           TABLES
             return                  = t_return
             contract_items_in       = itab_item
             contract_items_inx      = itemx
             contract_partners       = t_partners
             contract_conditions_in  = t_conds
             contract_conditions_inx = t_condsx
             contract_data_in        = t_contract
             contract_text           = t_texts.

  • Routine does not get its value from: quantity* net price

    Dear all,
    I have a problem with routine. Could you suggest me any solution for it.
    If quantity =1 there is no problem. But if quantity different than 1 routine still calculates as quantity 1.
    What migh be problem here?
    I have routine as:xkwert = xworkk - xworki.
    I assigned it YODI condition.
    To give an example: xkwert = xworkk - xworki.
    NETW                                              200,00
    OWST                         16,00
         Sub Total                               216,00 = XWORKK
    YOFI                         100,00 =XWORKI
    YODI                                                   8,00 =XKWERT*Here routine calculates as XWORKK=108 and XWORKI= 100.
    How can  I fix it?
    Kind Regards,
    Edited by: Fsmehmet on May 13, 2011 7:02 AM

    Dear Amit,
    My routine: xkwert = xworkk - xworki. And it works when quantity is 1.
    But when quantity is different then one, calclation is wrong.
    For example;
    Quantity=2 Net Price=100 And NETW=2100=200*
    OWST 16,00
    Sub Total 216,00 = XWORKK
    YOFI 100,00 =XWORKI
    YODI 8,00 =XKWERT*Here routine calculates as XWORKK=108 and XWORKI= 100.
    Regards,

  • Pricing Routine - unable to enter new net price in sales order

    Hi all,
      I have a routine 993 in sales order which is in Column 'Bas Type' in pricing procedure .  The routine has statement like this that calculate the unit price:
      If xkomv-kbetr is initial.
            xkomv-kbetr =  komp-netwr /  kmeng  
    Endif.
    This calculate the net price which appear in the column 'Amount/Net Price.   In the order, the user can change the net price in column 'amount'.  However, if i remove the line  "If xkomv-kbetr is initial",   the user can change the amount, but the amount value will stay as the original amount.  I don;t understand why this happen.   I have been debugging saplv61A (FM Pricing) but unable to get the flow.   Can anyone pls provide guidance ?
    Thanks
    Joyce

    Hi Joyce,
    I'm just wondering how you solved this issue - would it be possible to post a solution please?
    I have a similar issue (KBETR field is overwritten, after I change it in my VOFM routine)
    I posted my question here:
    VOFM (Pricing Condition) FREIGHT - unable to edit Amount value (KOMV-KBETR)
    but haven't received any replies!
    Would appreciated any help you can offer.
    Thanks.

  • Line item net price not updated in overview screen net price&line item

    Hi ,
    We have down payment order with 10 line items
    In orders with billing plan, the sales line item net price, if we entered manual condition price (ZPNP) ,gets updated in item condition net value. But it does not simultaneously gets updated at once in 1) Sales order overview screen net value 2) Billing plan header 3)Sales order overview screen line item condition  net value. Updation at these three places happens only after clicked on header conditions.
    However, in case of the last item in the sales order, the updation happens simultaneously in all the 3 places i.e. 1)    item condition net value. 2) Sales order overview screen net value 3) Billing plan header 4) Sales order overview screen line item condition net value.
    This is also true for the order with only single line item. We are faced a information popup message every time we change the item net price u201CItem 000100(100 is last line item number in sales order) exists already; the entry ignored u201C. This happens in case of all line items except the last line item. Also this does not happen in case where there is a single line item in order.
    Our requirement: The moment the net price of an item is change manually, it should get updated at all the 4 places mentioned above like it does in case of the last line item.
    Kindly help me to fix this problem.
    Regards,
    Adikesav

    Hi,
    Can u elaborate ur query ?
    By this FM you cannot create a SO . Use FM --> BAPI_SALESORDER_CREATEFROMDAT2
    Regards,
    MAdhukar Shetty

  • Automatic update net price in PO creation

    Dear expert,
    I just found an issue while creating a new PO.
    I fill in all data needed, included net price. And when I press "enter", surprisingly the system automatically update the Net price with last PO price. and I need to manually change again the net price with current price.
    Anyone can describe why system automatically update the PO price? is there any setting to inactivate it??
    thanks much,
    nasikhin

    Hi,
    Please read the note:
    456691   FAQ: Price determination in purchasing
    3.  How does price determination determine the conditions via a 'Last
        purchase order'?
    Answer:
    If the info record does not contain any valid conditions, but a "last
    document" exists for the info record, the system copies all of the
    conditions from this document if the following prerequisites are met:
        o  The net price must be zero (EKPO-NETPR = 0.00) after the system
           has carried out price determination.
                                                                     Page 5
           However, the net price is not zero after price determination has
           taken place and the system does not copy the conditions from the
           last PO if master conditions that are included in the net price
           calculation are maintained at, for example, vendor level or
           material group level.
        o  The last document is not a request for quotation.
        o  The info record has not been deleted.
        o  The vendor and the material in the info record are identical to
           the vendor and the material in the last document.
        o  The calculation schema of the last document is the same as the
           current schema that has been determined.
    The system simply executes a copy function to transfer the conditions
    from the last document. The system does not check for requirements for
    the calculation schema.
    The system does not copy the condition records of the subsequent
    settlement (the condition type has the condition class "C"); instead,
    they are always determined again to ensure that the condition records
    are consistent with the field contents (also see Note 486757).
    If you generally do not want the system to transfer the conditions from
    the last PO, you can use the user parameter EVO to deactivate this (also
    see Note 675523).
    So you can use the parameter EVO.
    Best Regards,
    Arminda Jack

  • We are not able to track how PO net price got updated for 1 purticular mat.

    Hi SAP Gurus,
    We are not able to track how how price got updated, because there is no PIR for this material, standard price maintained
    in the material master diffrent than PO price, and last/earlier to this PO price is also diffrent. And not able to see any price changes for this line item.
    Other than this can we track or check regarding PO net price for the material.
    Thanks and Regards,
    SHARAN.

    Hi,
    Check the item detail->conditions->analysis.
    You can know from where the price got picked.
    Also check whether the material has any manual conditions (MEK*)
    Mayil

  • Function module to update net price in purchase information record ???

    hi all,
    Is there any function module to update net price (PREIS) for each material in the purchase info record?
    points will be rewarded for helpful answers

    Hi,
        Use below FM :
    Clear : i_prot.
    refresh : i_prot.
    Delivery Update
    CALL FUNCTION 'LE_MOB_DELIVERY_UPDATE'
    EXPORTING
    do_commit = 'X'
    TABLES
    t_delivery_items = i_lips
    prot = i_prot
    EXCEPTIONS
    conversion_overflow = 1
    essential_data_missing = 2
    error = 3
    nothing_to_update = 4
    lock_after_update_failed = 5
    error_in_delivery_update = 6
    OTHERS = 7.
    COMMIT WORK.
    Pass lips-lgort..
    Refer
    https://forums.sdn.sap.com/click.jspa?searchID=4212688&messageID=3855382
    Regards

  • Problem with updating net price value through PORDCH Idoc

    Hi All,
    I have a ABAP program which calls the function module BAPI_PO_CHANGE to update the line item details using an idoc.
    During this change it is updating Limit values in PO bot not the net price.
    And the Idoc status is having message as BAPI Change has been done successfully instead of "PO number changed".
    Any suggestions to solve this issue.
    Thanks,
    Spandana

    Please post the details of the application release, database version and OS.
    Please see these MOS docs.
    Getting "ORA-20001: The primary key specified is invalid" Error Using HR_ASSIGNMENT_API.UPDATE_EMP_ASG_CRITERIA API [ID 737145.1]
    APP-PAY-07220: The primary key specified is invalid - ERROR Received Creating GRE/Legal Entity In New Business Group [ID 849754.1]
    Error Occurs While Hiring Applicants APP-PAY-07220: The Primary Key Specified Is Invalid [ID 1084464.1]
    Terminated Employee Scorecards Error's: Ora-20001: The Primary Key Specified Is Invalid [ID 859315.1]
    Hr_assignment_api.Update_emp_asg_criteria Gives Ora-20001, Ora-06512 [ID 334491.1]
    PERWSTEM Termination 'APP-PAY-07220 The Primary key specified is invalid' and Database 11.1.0.7.0 [ID 1263357.1]
    Error 'APP-PAY-07220: Primary Key Specified Is Invalid' When Attempting to Process Open Life Event [ID 567224.1]
    Republishing Performance Management Plan (PMP) Fails with Error: ORA-20001: The primary key specified is invalid [ID 956234.1]
    Thanks,
    Hussein

  • ME31K Net Price not Update

    Dear All,
    In a service contract ME31K net price(ESLL- NETWR) of service not updated.its shown zero value in gray field on every time.
    We are using standard procedure for service contract :MS0000".and also i have check PRS condition but it doesn't work.
    I have also read many thought relelated to same issue but not getting proper answer.
    Please help on priority basis.
    Thanks & Regards,
    Dishant Mistry

    Dear Dishant,
    Just a clarification, are you sure that you are talking about ESLL- NETWR, since usually we maintain price for service contracts in ESLL-TBTWR (Service level), so that automatically it calculates the net value for the respective service and updates in ESLL- NETWR.
    Note: Once you maintain the value in ESLL-TBTWR, the program would some up all the service value for the item and displays in EKPO-NETPR.
    Please find the below screenshots for your reference.
    Please let me know, if you require any clarification.
    Thanks & Regards,
    Narayana N

  • PO net price updation with respect to contract net price change

    We have a requirement: Whenever net price in Contract is changed, net price in open purchase orders (for which GR has been not done yet) which are created with reference to that contract updated automatically.
    For example net price in a conract is 13 USD and there are 5 open POs. now net price (PB00) in contact is changed to 13.5 USD without changing the condition validity date, then it should be automatically updated in those 5 POs.

    Hi Manoj,
    This is possible using "Automatic Document Adjustment" functionality (MM - Purchasing -- PO - Follow-on Functions - AAA).
    Here's the process.
    1. Set Document Index active flag in pur. view of vendor master.
    2. Create work list (MEI4)
    3. Run MEI1
    2 & 3 above can be run daily via batch jobs which will pick up contract price changes and update relevant PO's.
    Cheers !
    Rajesh

Maybe you are looking for

  • File Sharing with XP and Vista

    Hi, I have an WRT54G wireless G router. I have a windows XP computer and a Windows Vista laptop that I would like to enable file sharing on. I am having a lot of problems doing so. Can someone please give me instructions on how to do so? Thanks, Alex

  • Generating excel reports

    hi, can anyone tell me , how to generate a excel report from java. i'm getting data from database using jdbc, with that data i need to create excel report.

  • Anyone having trouble signing in (to this website) under IE 10 and 11?

    I am.  Sign in is fine with Opera.  I'm sure the problem will correct itself but I was curious whether anyone else was experiencing this.  The sign in page never allows you to actually complete the text in the boxes, the page just flashes and the bus

  • Is there a "replace songs listened to" sync mode?

    I don't like hearing same song more than once per year (or longer).. Ideally, I'd like itunes to keep track of what I have already listened to on my Gen5 Nano and replace only those songs with fresh ones when I sync. Is this an option?

  • Connecting DS 4.0 to AS400 DB2 7.1

    Hi all, We are going to have POC and we have very limited time so that we cannot have lab environment in our company. Our scenario is like this: We will have DS 4.0 installed on Linux Suse and the reposistory will be on Oracle. I know this connecting