How to Carry out New Pricing in Sales Order userexit

Hello,
In userexit save_document_prepare of program MV45AFZZ, I'm adding an entry in XKOMV for a header pricing condition ZD01.  After saving, if I go back into the order and go directly into the line item conditions, the ZD01 does not exists at the item level.  If I navigate the the header conditions and then go back to the items, ZD01 appears as it should.  I believe what is happening is that the header condition is not being distributed to the line items unless New Pricing is carried out.  If I manually enter the ZD01 condiiton instead of relying on the userexit code, everything works fine.  The header condition is properly distributed to the line items.  Therefore, I believe the configuration is correct.  My question is, "How can I programatically trigger New Pricing from a sales order userexit".  Is this possible in SAVE_DOCUMENT_PREPARE or do I need to do it somewhere else.".
Thank you,

this problem has been resolved.  The problem was that I was appending the header condition to XKOMV instead of inserting the header condition as the first line in the table.  SAP will carry out the new pricing if the header condition is on the first line.

Similar Messages

  • User-exit for  carry out new pricing while sales order save automatically

    Hi all,
    I need to carry out new pricing while sales order save automatically. Please any one help me to finding proper user-exit to achieve my requirement.
    Thanking You.
    Moderator message: please search for available information.
    Edited by: Thomas Zloch on Jan 11, 2012 12:53 PM

    Pl help.

  • Carry out new pricing for SO

    Hi Guys,
    Is there any function module/BAPI to carry out new pricing for sales order.
    Somehow my BDC for VA02 is not working and
    my bdc does only carrying out new pricing for that order.
    This I want to replace with BAPI.
    Could you please help me in this regard
    Prashant

    Hi,
    An alternative solution is to use the BAPI to make a general CHANGE to the sales order and let the user exit take care of the repricing.
    Calling program :
      ls_order_header_inx-updateflag = 'U'.
        ls_logic_switch-pricing = 'C'.
        ld_bapi_reprice = 'C'.
    Memory ID is read in MV45AFZB, form USEREXIT_NEW_PRICING_VBKD
        EXPORT ld_bapi_reprice TO MEMORY ID 'Z_BAPI_REPRICE'.
        CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
             EXPORTING
                  salesdocument    = p_vbeln
                  order_header_inx = ls_order_header_inx
                  logic_switch     = ls_logic_switch
             TABLES
                  return           = gt_return.
        FREE MEMORY ID 'Z_BAPI_REPRICE'.
        READ TABLE gt_return INTO ls_return
        WITH KEY type = 'E'.
        IF sy-subrc NE 0.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
               EXPORTING
                    wait = ''. " No wait between orders
        ELSE.
          ls_error-vbeln = p_vbeln.
          ls_error-text =  ls_return-message.
          APPEND  ls_error TO gt_error.
        ENDIF.
    MV45AFZB, USEREXIT_NEW_PRICING_VBKD :
    DATA : ld_bapi_reprice TYPE knprs.
    Memory ID is exported from program ZPSF_01_TOOLKIT_F01
      IMPORT ld_bapi_reprice FROM MEMORY ID 'Z_BAPI_REPRICE'.
      IF NOT ld_bapi_reprice IS INITIAL
      AND sy-subrc IS INITIAL.
        new_pricing = ld_bapi_reprice.
      ENDIF.

  • Do not carry out new pricing when plant change in sales order

    Hi,
    I have one z field in additional data tab in sales order. This field store the original plant if anyone has changed plant in Sales order. My requirement is to trigger the pricing in sales order with this old plant. I am not getting any exit for this.
    Suggest me the solution.

    Hi
    In the comments for the subroutine, it says:
    *       Parameter new_pricing controls the new pricing in the calling *
    *       form. It can be filled according the the allowed values       *
    *       of domain KNPRS (Pricing type), for example:                  *
    *       ' ' = no new pricing                                          *
    *       B   = Carry out new pricing                                   *
    *       C   = Copy manual pricing elements and redetermine the others
    So, you must write:
    If VBAP_WERKS NE *VBAP_WERKS.
      new_pricing = 'B'.
    Endif.
    Regards
    Eduardo
    Edited by: E_Hinojosa on Aug 25, 2011 8:21 AM

  • Carry out new pricing when key in access field is changed

    Need automatic update to 'carry out new pricing' when field that is part of key combination is changed.
    The system recognized the change when viewed in analysis, but amount is not updated unless "Update" button is manually pressed.

    hi,
    you sales orders which are already created then you changed the access key. For these order unless you run an update pricing they cannot be updated. Now for the new sales orders which are going to be created if the new key combination matches the sales order criteria then it gets picked up automatically and you dont to do anything.
    as we understand from access sequence setup, we do it frm the most specific to the most general ( while setting up the condition tables ie key combinations), So when a condtion record is found whether new key combination or old if its the relevant one and a condition is found for it, it gets picked up automatically.
    regards
    sadhu kishore

  • Need exit/badi to carry out new pricing(b) for SO coming from CRM...

    Hello Experts,
    We are transferring internet sales orders from CRM to R/3. Now, what I need to do is
    to trigger the 'carry out new pricing' for all the line items. Just like when we click
    the update button in the conditions tab and click on the 'carry new pricing' option even though
    user only displays the sales order in R/3.
    Hope you can help me guys. Thank you and take care!

    No Answer...

  • Carry out new pricing at invoice

    Hi all,
    My requirement is to carry out pricing at invoice and not copy from sales order.
    For this, I goto tcode VTFL and opened copy control for LF to F1. I changed pricing type from C to B but still system is copying price from order and not carry out new pricing automatically at the time of invoice creation.
    please update that what needs to be done.
    Many Thanks.,
    AI.

    I changed pricing type from C to B
    First please dont post the same question related to an issue in multiple times.
    Coming to the issue, you have to test this by creating a new sale order.  Existing orders will not change once you change the copy controls.  It will have impact only on the newly created documents.
    Last but not least, as for as possible, continue your queries in the other thread and close this one.
    thanks
    G. Lakshmipathi

  • Carry out new pricing not working in Me23n

    Dear Experts,
    I am trying to carryout new pricing in purchase order i.e iam going into Item conditions of PO and hit update button on the botton of the conditions tab and select B as the pricing type . The value changes to the new rice and then I save the PO.
    After hitting save the values remain unchanged .
    Please help on this .

    hi,
    you sales orders which are already created then you changed the access key. For these order unless you run an update pricing they cannot be updated. Now for the new sales orders which are going to be created if the new key combination matches the sales order criteria then it gets picked up automatically and you dont to do anything.
    as we understand from access sequence setup, we do it frm the most specific to the most general ( while setting up the condition tables ie key combinations), So when a condtion record is found whether new key combination or old if its the relevant one and a condition is found for it, it gets picked up automatically.
    regards
    sadhu kishore

  • Carry out new pricing by changing item category

    Hi All,
    Is it possible to carry out a new pricing depending on item category. The requirement is when i change the item category it should trigger new pricing procedure. Like example if it is tann one pricing procedure and if it change to another category like ztann it should trigger new pricing procedure .
    I know that  pricing procedure not defined on item category. I tried with the exit form userexit_new_pricing_vbap changing new_pricing. But i dont know what to write in that. I am technical guy . Please share me your idea if any one did this before.
    Regards,
    Madhu.
    Edited by: madhurao123 on Mar 10, 2011 5:54 PM

    Dear Lakshmipathy,
    I have tried the option you have suggested but was unable t o make any progress. I have done the following steps:
    In VKOA I have done the revenue account determination based on Acct Assign Grp: Customer, Acct. Assign Grp: Material, and Item Category. Despite this the correct G/L accounts are not being picked up. Can you please suggest where I may be going wrong.
    The scenario is as follows for all Item categories except ZTNN::
    If Customer and Material are taxable @ 5%VAT then pick G/L1
    If Customer and Material are taxable @ 15% VAT then pick G/L 2
    If Customer and Material are taxable @ 2% CST then pick G/L 3
    If Customer and Material are taxable @ 5% CST then pick G/L 4
    If Customer and Material are taxable @ 15% CST then pick G/L 5
    For Item Category ZTNN:
    If Customer and Material are taxable @ 5%VAT then pick G/L6
    If Customer and Material are taxable @ 15% VAT then pick G/L 6
    If Customer and Material are taxable @ 2% CST then pick G/L 6
    If Customer and Material are taxable @ 5% CST then pick G/L 6
    If Customer and Material are taxable @ 15% CST then pick G/L 6
    Your suggestions would be greatly appreciated.
    Thanks and Regards,
    Rohan Gudavalli

  • New pricing on sales order item after partial delivered and billed

    Hi
    I want to change price of sales order item that already delivered partially and
    billed, but I can't search standard function.
    Can any one help me out  in changing the price of sales order item (VA02).....
    Thanks,
    Wizard.

    Hi DongWoo,
    Under what scenario would you want to re-price after billing?  If you change the price how will your customer know?  You will need to contact your customer and let them know not to pay the last invoice, then delete that billing document in SAP and re-issue it.  When you create the billing document in SAP from a delivery or order you can specify how to re-price in copy control.  Whether or not you want to reprice all conditions, taxes or whatever is in the re-pricing type.
    You need to make sure what we send the customer matches what is in SAP, which is why we generally can't re-price after billing.  Make sense?
    If you want to change the price on the still open items you can reject what is open and enter a new line item.  That will pick up whatever new pricing conditions exist, but you may lose your ATP position & allocation status.

  • How to find out Enhancement details for Sales Order

    Hello,
    Follwing is the scenerio:
    As soon as Third Party Sales Order created, Header Billing block gets triggered (from Sales Doc settings in VOV8).
    In Sales Order there are 4 items of items:
    1. Hardware Material (Price) with Item Category, say A
    2. Hardware Material (Free-of-Charge) with item category, say B
    3. Service Material (Price) with Item Category, say C
    4. Service Material (Free-of-Charge) with item category, say D
    Now there is another billing block, at item level, for Hardware Material (Price) - item cat. A, ONLY.
    I checked item cat. in VOV7, and this block is not configured there.
    Sales Order saved (with pop-up message - Maintain Serial No. for Material, but as it's third party Order, stock is not in Inventory, so no Serial number at this point of time). PR triggered upon saving the Order. from PR, PO gets generated,and then MIRO.
    Now, as vendor Invoice received with Stock details (Manufacturer's Serial No.), we go to VA02 and maintain Serial No. (Extra --> Serial No.) for all 4 types of material (Pls note that Billing block is for Hardware Price Material, but we need to maintain Serial No. for all 4 types of material) and save order.
    As soon as, serial no. maintained, item level billing block gets removed for Hardware (price) material, automatically.
    I need to understand how this functionality has been achieved?
    More precisely how and where i can see the technical details, like What program is being developed, which user-exit is being used etc...
    Thanks.

    Hi Sumitra,
    Since the system exit handler has to call your BADI  go to SE24 and display
    CL_EXITHANDLER
    Chose method get_instance and set a break point.
    And, then press F8, so it will show all the Badi's.
    Regard's,
    Shivesh Ranjan.

  • How to add a new tab to sales order header level

    Hello Experts,
    I have to add a new tab 'Billing Plan' at sales order header level.
    As per my functional person, If I modify TVAK-FPART field with some value than tab will be come.
    I tried to modify TVAK-FPART field in debug mode and was able to see the tab, BUT when I again came back to
    VA03/VA03 transaction then that tab was not there.
    Pls help me to resolve this problem..
    Rocks!!

    Hello Rock,
    I have the similar requirement, to add a new tab at the sales order item level. there are already two customer tabs but i dont want to use them, instead i want to use a new tab to be created. i searched BADIs but the BADI BADI_SD_TAB_CUST_I is for SAP Internal use only.
    Kindly suggest whay way you used to create a new tab. thanks in advance.
    Reagrds
    Sachin

  • User exit for pricing in Sales Order

    Hi Gurus,
    I have a requirement while changing Sales Order and an Inquiry.Below is the requirement.
    I have a custom filed at the Sales Order Item level as VBAP-XXXXX. When the user changes this value to a value (say abc) then the NET value in the Conditions tab of the line item should become zero and also the grid of the conditions tab should be displayed as zero.
    I have custom item categories for which the Pricing (TVAP-PRSFD) is blank (No pricing). For this type of Item categories I can make the NET price s ZERO by implementing some custom logic in the user exit userexit_new_pricing_vbap. Since this item category is not relavant for pricing then when I carry out new pricing the net value is set to ZERO.
    But for other item categories, this field (TVAP-PRSFD) is set to X (Pricing standard). For this item categories I cant make the NET value as zero.
    So Can you please let me know the possibility of implementing the above mentioned logic?
    Are they any user exit to update the pricing table KOMP?
    Are they any user exit to change the TVAP-PRSFD value based on my requirements?
    Is there any other way of implementing this logic irrespective of item categories?

    Hi Vinod,
    I am sending you my code please check it,
       if TKOMK-SPART = 10.
        if XKOMV is not INITIAL.
          clear v_JEXP.
        READ TABLE XKOMV with key kschl = 'JEXP'.
        if sy-subrc = 0.
          check XKOMV-kwert = 0.
          message i003(ZT) with 'Value should not be 0 for conditioin type JEXP'.
          v_JEXP = 'X'.
        else.
          message i003(ZT) with 'Maintain the mandatory Conditioin type JEXP'.
          v_JEXP = 'X'.
        endif.
        if v_JEXP = 'X'.
      XVBUV-MANDT = sy-mandt.
      XVBUV-POSNR = '000010'.
      XVBUV-TBNAM = 'VBAP'.
      XVBUV-FDNAM = 'PRSOK'.
      XVBUV-FEHGR = 20.
      XVBUV-STATG = '06'.
      XVBUV-FCODE = 'PKON'.
      XVBUV-SORTF = 9999.
      XVBUV-LFDNR = 0000.
      XVBUV-UPDKZ = 'I'.
      append XVBUV.
        endif.
    endif.
    endif.
    Please suggest something to solve this.
    Thanks and Regards,
    Vicky.

  • How we can configure new pricing procedure at the time of billing document

    Hi SD Gurus,
    Can u plz tell me how we can configure new pricing procedure at the time of billing document level.
    Thanks & Regards,
    Sreenivas.P

    Hello,
    Why?
    The sales order confirms the price given to the customer.  If you have re-determined a new price/discount then you may consider in VTFL to use pricing type C.
    Regards
    Waza

  • Activating Pricing for Sales Order in Retail

    Hi All/Vijay/KK,
    Please tell me how activate the pricing for sales order, actually in SD we do Pricing Determination, what has to be done for Retail pricing

    Hi,
    To do sales order pricing
    Goto IMG>Sales & Distribution>Basic Functions>Pricing>Pricing Control
    Either Follow Standard, condition type PR00
    or in case of Custom
    1. Use condition table 406 Site/article
    2. Define Access Sequences ZPR0
    Enter accesses:10 406 Site/article Exclusive x
    3. Define Condition Types (ZPR0 assign newly defined access sequence)
    4. Define And Assign Pricing Procedures (assign condition types ZPR0..etc. to it)
    Then maintain condition record , go to VK11 --> Enter your Z condition type (eg. ZPR0)., enter the amounts.
    Add the pricing procedure , to sales document type.
    For Retail Sales Pricing
    For Retail Sales Pricing based on Purchase pricing you can follow the following method:
    The retail price is always based on the purchase net/net price. This purchase net price is built up from the purchasing pricing elements or condition types defined to be included in the purchase net price. A planned mark-up is applied to the purchase net/net to calculate the proposed retail price. The planned mark-up can be set by merchandise category and for exceptions, more specifically by article.
    You can perform Two-step calculation for retail pricing, for example, for stores that are supplied by a distribution center (internal vendor). Calculating sales prices for the stores is based on the transfer price for distribution centers (preceding organizational unit).
    1. Set up Master Data (WB02) - Relevant Fields should be maintained
    2. Set up Article Master Data - Logistics DC and Store View (MM42)
    Relevant Fields should be maintained
    3. Maintain Mark up for DC(VK11) -Markup % at Distribution channel distribution chain level
    Mark ups maintained at two levels:
    For DC: At distribution chain level
    Condition type used: AUFS
    For Stores: At article level
    New condition type ZUFS created.
    4. Maintain Mark up for Stores (VK11) Markup % at Store distribution chain level
    5 Create Pricing Procedures (IMG) -Pricing Procedures created
    6. Carry out Price calculation for DC(VKP5) - Pricing Document created - DC Transfer price calculated
    7. Carry out Price calculation for Stores (VKP5) - Pricing Document created - Final Retail Price Calculated
    The final retail price that is calculated is stored in the condition type VKP0.
    Hope it helps,
    Regards,
    Anirban Roy

Maybe you are looking for

  • How to retrieve data from a CGI to SAP?

    Hi guys, I'm looking for a way to retrieve information from a CGI page into SAP. This CGI generates a XML with the response from the parameters I use on the URL. I can xsl transform the result into ABAP variables, but first I need to know how to get

  • Java update not working

    Java is not working. Already tried downloading Java 7 update. Java (Oracle) cannot verify that I have Java installed. Java does not show up in system prefrences even after download success screen, and shutting down all apps and computer. I checked co

  • Config Smoothing factor in vendor evaluation

    Dear MM experts, Please let me know where I can config smoothing factor of score in vendor evaluation! Thanks!

  • LSMW for garnishments(194,195)

    hi frenz... i am doing LSMW for 195(garnishment order). while recording it is not allowing me to enter in to 195 unless i enter in 194. i dont want to do for 194.. i want to do directly for 195. plzz help me.

  • OGG 1403错误解决方法

    OGG oracle goldengate 1403错误解决方法 1. 错误描述 WARNING OGG-01154 Oracle GoldenGate Delivery for Oracle, repyxb.prm: SQL error 1403 mapping SGPM.P_SMS_SEND to SGPM.P_SMS_SEND. WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, repyxb.prm: Repositionin