Block changes to the order quantity

Say I have a quotation for itemA with 10 qty.
When I create a sales order with ref to this quotation, i want the system to blcok any changes to the quantity.
The incompletion rule gives me a warning message, but it will allow.
Any way to do this blocking to order quantity?
Thanks.

mv45afzb, change form userexit_check_vbap,
add code like :
Quantity checks for orders created w/ ref. quotation     *
Vorlageposition lesen                                                
      perform vvbap_lesen(sapfv45p) using vbap-vgbel                   
                                          vbap-vgpos                   
                                          vbap-upflu                   
                                          sy-subrc.                                                                               
Umrechnung in Basismengeneinheit                                     
    z_kwmengv = vvbap-kwmeng * vvbap-umvkz * vbap-umvkn / vvbap-umvkn
Umrechnung in Verkaufsmengeneinheit des akt. Beleges                 
                                                           / vbap-umvkz.
                                                                                perform xvbapf_lesen(sapfv45p) using vbap-vgbel                  
                                           vbap-vgpos                  
                                           sy-subrc.                                                                               
z_krfmngv = xvbapf-erlmenge * vbap-umvkn / vbap-umvkz * quan_1.
      z_krfmngv = z_krfmngv + vbap-kwmeng - *vbap-kwmeng.          
      if z_krfmngv > z_kwmengv and                                 
        z_kwmengv > 0.                                               
        write z_kwmengv to z_mengec.            "write to char field                   
        write z_krfmngv to z_mengec1.            "write to char field                   
        set cursor field rv45a-kwmeng line sy-stepl.                   
        message e494 with z_mengec vbap-vrkme                        
                            z_mengec1 vbap-vrkme.                    
      endif.                                                           
    endif.

Similar Messages

  • Unable to change the order quantity value during save of sales order

    Hi Experts,
    There is a need to change the order quantity value, based on some conditions, when pressed 'ENTER' or during 'SAVE' of the sales order (VA01, VA02).
    We are trying to change the order quantity value (KWMENG) in table XVBAP in the subroutines userexit_field_modification, userexit_save_document and userexit_save_document_prepare of the user exit 'MV45AFZZ'. But the change is not replicated to field on GUI.
    The order quantity value can be changed in subroutine 'userexit_move_field_to_vbap', but the subroutine is not getting triggered when user changes only the order quantity on screen.
    Please help us in resolving this issue.
    Regards,
    Santosh

    Thanks for your time guys. The issue is resolved.
    SAP is not triggering the vbap user exit as the order quantity on screen is in structure RV45A.
    There are two ways of resolving the issue.
    1. Implement the SAP note #513342 - Quantity change and USEREXIT_MOVE_FIELD_TO_VBAP. But, it is SAP modification note.
    2. Write the code in VBEP exit of MV45AFZZ. This user exit is called whenever the order quantity is changed. But, it is called multiple times in some cases. Hence, need to write code to limit our code execution only once e.g. maintain a global table with our quantity & uom. Check when the quantity and uom in our table is same as quantity on screen. If not, exit from user-exit.
    Edited by: Santosh Kacham on Nov 11, 2011 6:37 AM

  • Changes in the material, the order should be blocked while saving the order

    Hi,
    A sales order is already there and delivery is not yet done. The requirement is, If I make any changes in the material, the order should be blocked while saving the order.
    Is there any indicators or some fields which tells material is changed in the order. How this can be realised.
    I thought of table CDPOS, but this can be used only after Order is saved.
    Please provide your inputs.

    Use user-exit MV45AFZZ, form-routine USEREXIT_SAVE_DOCUMENT_PREPARE.  Compare the values in XVBAP-MATNR(New Values) and YVBAP-MATNR(Old values).  If the values are different, update the value VBAK-LIFSK to block the order.

  • How to add a New schedule line and update the order quantity?

    Hi all,
       I have to add a new schedule line in VA01/VA02 so that when ther is partial confirmed quantity against a schedule line, we have to create a new schdule line based on the existing so that it will contain confirmed in one and unconfirmed in the other.
    The schedule line will split once the user go to Header data screen in VA01/VA02. So I used USEREXIT_MOVE_FIELD_TO_VBAK  user exits in MV45AFZZ include program.
        I splited the order quantity against the confirmed quantity and added it as new schedule line in the XVBEP internal table and update UPDKZ flags for XVBEP & YVBEP.
      Could anyone tell me is there any other way to do this without updating XVBEP? Because it is affecting some other place because of index table is not updating. How to you think use if update xvbap-etenr_high and update index table IVBEP1 for new line insert into XVBEP instead directly inseritng it into?
    My code as follows:
    xvbep-WMENG = t_temp-WMENG .
    modify xvbep TRANSPORTING WMENG.
    t_temp1- ETENR = '0002'.
    if SY-SUBRC <> 0.
      t_temp1-UPDKZ = UPDKZ_NEW.
      modify xvbep TRANSPORTING WMENG UPDKZ.
    endif.
    With Regards
      Raj

    Have you got thru this one if so please provide me with the solution as i got the same req' ..

  • How do I synch photos from my PC to Ipad2 without a change in the order of the photos?

    I am not able to synch photos from my PC to Ipad2 without a change in the order of the photos. I ordered them by date so thought there would be no problem. What can I do to solve this problem?

    A better solution in windows is set up folders and organize your pictures that way.  That will be similar to events that iPhoto uses. That way the pictures will stay in an organized fashion for you.
    I use a mac and iPhoto and the pictures are organized by events.
    Good luck.

  • Total of the ordered quantity in sales order

    Hi
    Is there any settings or functionality for the totalling of the order quantity in the sales order as the user requires to see the total number of the units of quantity of order taken and if its less they can still ask for more order from the customer so that the truck is used for its fullest capacity for transport of the materials.
    thanks
    AJ

    Hi AJ,
    In the standard system up to ERP 5.0 you could use weight and volume for aggregation. Not very useful.
    In SAP ERP 5.0, there is a new functionality called "loading units".
    Quick copy/paste from the release notes:
    As of SAP ECC 5.00, SCM Extension (EA-SCM 500) you can use a loading unit in Dynamic Transportation Planning of the DSD Backend process. A loading unit is an additional capacity limit that limits the maximum delivery quantity of a vehicle. A loading unit is a unit of measure that is independent of the units of measure in order processing.
    For aggregation purposes, the delivery quantities are converted into the loading unit using their conversion factor in the material master. The total quantity in the loading unit is calculated in the order and the delivery and displayed together with the aggregation categories. The loading unit is also shown for information purposes in the shipment as the sum of the deliveries contained in the shipment.
    It says SCM Extension, but that's not APO, only an extension, so it is part of the standard system. Even if it is part of the DSD Backend, you might think of using it independently of DSD.
    Best Regards,
    Franck

  • Confirmed quantity more than the ordered quantity in sales order.

    Hi All,
    We have a situation wherein the confirmed quantity is more than the ordered quantity.
    a.) SO was created for qty1.Two schedule lines were proposed as stock was not available.
    b.) When stock came in and most probablly, when the rescheduling job calling tcode  V_V2 was run, both the schedule lines were confirmed.
    c.) As a result, further processing  is not done by system as confirmed quantity is more than ordered quantity.
    Also we noticed that double schedule line was confirmed for a another order even without the rescheduling job is run.
    Can you please suggest as to why this is scenario is occuring and how we can avoid the reoccurence? Thanks in advance!!
        Regards,
    Jeevan Penumatsa

    Hi  Jeevan Penumatsa
    Welcome to SDN forum
    Generally two schedule lines will take place if stock is not available in your plant or if open orders are there for that material also. So check the stock in MMBE
    .If there are any backorders then it might be getting added in the created sales order and then you might be getting in two schedule lines
    Regards
    Srinath

  • I need to make the ordered quantity field (RV45A-KWMENG) disabled in 'VA02'

    Hi SAP COMMUNITY,
    I have urgent requirement for which i did'nt worked before on this requirement. I hope you people can help me in this regerd.
    My requirement is, I need to make the ordered quantity field (RV45A-KWMENG) disabled in the transaction code is VA01/VA02. User should not be able to edit this ordered quantity in VA01/VA02 Transaction.
    Here the condition to disable this field ordered quantity is IF ORDER TYPE EQUAL TO OR AND IF ITEM CATEGORY EQUAL TO TANN in technical IF VBAK-AUART EQ OR AND IF VBAP-PSTYV EQ TANN then only the field (RV45A-KWMENG) ordered quantity should be disabled in that transaction VA01/VA02.
    Correct me if iam wrong, I think in the program SAPMV45A and do we need to include any screen number which i have seen in VA02 is 4001. Do we need to write a code in Include MV45AFZZ (FORM USEREXIT_FIELD_MODIFICATION.). But i don't know what code i need to write here to disable this field.
    I had searched in the forum some example code so please suggest me whether i can use this and if i can use this please suggest me how to write the condition and insert the code in that FORM. If this sample code is wrong then please suggest me what exact code should be given. Can anyone help. Quick response will be much appreciated.
    Looking forward for ur prompt replies.

    As per my understanding , To disable the field RV45A-KWMENG based on the condition for Transaction VA01/VA02.
    The conditions which i need to check is Order Type and item category.
    I understand that this is the code which i need to insert for disabling the field but i have a question here, where is the condition here and how the system understand for this field RV45A-KWMENG it has to disable. I think we need give the condition as if RV45A-KWMENG....... Another one if iam not wrong we need check that it has to be done in VA01 and VA02 then only this condition should be executed.
    IF VBAK-AUART EQ 'XXX' OR VBAP-PSTYV EQ TANN .
    IF SCREEN-NAME = 'XXX'.
    SCREEN-ACTIVE = 0
    ENDIF.
    ENDIF.
    Please suggest me the better way how can i do it in the coding.
    Awaiting for ur prompt reply.

  • Rounding the order quantity in different Units of measurement

    Hello Experts,
    We need your suggestion to meet the below mentioned client's requirement.
    There are around 200 SKUs in the consideration and three units of measure ( case, carton and pallet  defined for them).We are looking for way to suggest the order qty based on multiples of the unit,  case, carton & pallet Quantities.
    The order will always be placed in base unit PC and system should suggest the best possible combination with a Pop Up message.
    For example with this SKU
    SKU         Unit       Case        Carton           Pallet
    123456      1         12               144              8640
    Customer ordered 10 units during the validation of that line  pop up message should suggest 12 units. (1 case)
    Customer ordered 5 units there should be no suggestion ( 5 units )
    Customer ordered 130 units during the validation of that line  pop up message should suggest 132 units. (11 cases)
    Customer ordered 146 units during the validation of that line  pop up message should suggest 144 units. (1 carton)
    Customer orders 153 units during the validation of that line  pop up message should suggest 156 units. (1 case + 1 Carton)
    Suggestions needs to be able to round up or round down based on the closest combination multiple.
    I have gone through the idea of roudning profile idea but need some more inputs as how to realize the same.
    As one material can have requirement in all alternate units of measurement and we can assign one profile per UoM in Material master and the order quantity is not dependent on any specific customer group so how would the system recogine/derive the best possible combination in different cases for different UOM.
    Pls provide your valable inputs.
    Many thanks in advance.

    I don't think thsi is possible with SAP Standard settings & you will have to apply a User Exit.
    You ABAPer will have to develop a logic based on your requirements & then system can give a pop-up with best possible combination.
    Thanks,
    Jignesh Mehta

  • Wan to Decrease the Order Quantity

    Hi Experts,
    Can we Decrease or increase the sales ordere quantity after partial delivery.And the material processed for MRP also
    suppose sales order qty 10
    partial delivered 05
    and now i try do decrease the qty in VA02 to 08
    but system not accepting, please is there any solution to decrease the qty in sales order
    please help me
    Thanks and regards
    Madhusudhan

    Yes you should be able to decrease the order quantity after a partial delivery, provided the decreased qty is NOT LESS than the partially delivered Qty.
    If it is not allowing to decreae please check if there are any Min Order Quantity or Case Pack qty in the material master. Also please post the error message in detail, it will be helpful in providing more appropriate suggessions.
    Hope it helps
    Regards
    Sai

  • Goods issue quantity exceeds the ordered quantity

    Hi Gurus,
                    I created a sales order with single line item for 100 MT. Subsequently i created outbound delivery against the order. Now the 100 MT quantity gets copied in the delivery. now i created an additional line item in the same delivery for 10 MT against the same material . After this i did the PGI. To my surprise system allowed to do the PGI for this additional item that i had added. Now in this case the goods issue quantity exceeds the Sales order quantity. How can i restrict such functionality.
    My requirement is that the goods issue quantity should never exceed the ordered quantity in any case. Moreover the line items should be copied directly from sales order and there should not be any scope of adding any additional line item during delivery. The outbound delivery document should be copied from sales order and no manual alterations should take place during delivery or PGI . How can i achieve the same . Please help.
    Thanks in advance.

    Also for your delivery document tpye,under order reference,keep item requirement as '201' so that system will not allow any new entries in the delivery.
    Phani Prasad.
    P:S: Please check the forum before you post your questions as this query was answered a number of times earlier.
    Edited by: phani.prasad on Mar 6, 2012 11:29 AM

  • How to block changes in purchase order after purchase release

    Dear all
    Can u please tell us how to block any changes in purchase order after purchase order is released...
    (We don't want any line items addition or quantity addition or any changes once purchase order is released..)We wanted this for a particular purchase order type only
    Regards
    Sudha

    Dear Sudha
    Yes it is possible to confiquire your system insuch a way where once if the PO  gets final relase then it cannot be changed.Only possiblity that will be available for the user to make chanegs in PO is possible when the final release is to be reset and then make the changes.
    Release Indicator: specicfies whether the PO documents is blocked or can be processed for the follow functions.
    You can define the release indicators you need for your release procedure:
    •The Released indicator is used to specify whether messages (PO documents in output format) may be transmitted for a purchase order with this indicator.
    •The Changeability indicator shows the effect of changes to the PO (a change to a PO may require a new release strategy to be determined, for instance).
    •By means of the Value change indicator, you can specify that the release strategy is to be re-started if a PO is changed and the value of a PO item thereby increases by a certain percentage (e.g. 10%). Set the Changeability indicator to "4 - Changeable, new release in case of new strategy or value change" or "6 - Changeable, new release in case of new strategy or value change/outputted" and enter a percentage in the Value change field.
    And after that you can specify release statuese where you can specify which release indicator/status a PO is to have after having been released via a certain release code.
    and after release simulation .
    Test for the PO change after final release System will not allow you tomake changes by giving the message that the release  indicator doesnot allow you make the changes in PO.
    Regards
    Sunny

  • Changing of production order quantity not allowed

    Dear Gurus
    My client is converting production order from planned order .These  planned orders have been generated from sales orders during mrp run. What my; client wants is that the production order quantity generated from the planned orders nobody can change that in either co02 or in co01. How can this be possible?
    Regards
    Sandip Sarkar

    Dear Sandeep,
    u can do this Via SHD0
    Plz find the below link & make the required field as output only
    [https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/transactionVariant-AStepbyStepGuidefor+Creation]
    Regards
    kumar

  • In Va22, the Ordered quantity is doubled when saving the quotation

    Hi Experts,
    When I am creating/changing a quotation, i am adding a new line item with the Article/Material with No of quantities.
    After saving, the quantity is doubled. As it should not happen.
    Please help me to resolve this issue.
    Thanks
    Lahiri

    Check the material master....one thought is that you must be having some rounding profile that is rounding off the quantities automatically.
    Also, check in User exit MV45AFZZ if there is any custom code or not.
    Check if there is any inclusive free goods procedure assigned to your order type.

  • Disable Booking if Reservable Quantity is less than the Ordered Quantity

    Hi Everyone,
    How can we disable booking of sales order if the quantity reservable for an item is less than the quantity ordered in the sales order?
    Best regards,
    Paul

    You need to Modify WorkFlow . You can do something like this.
    1) Add a custom node between Book-Eligible and Book Node
    2) Write your logic Inside the proc, which will get called from newly created custom node.

Maybe you are looking for

  • Not firing update and cancel button

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">

  • Digital or Analog

    I recently obtain a used Toshiba 32AF45 television and can't locate a manual for it. The RF coaxial jack is broken off, but I'm still able to use the RCA jacks to hook-up the kids Wii and DVD and get a great picture, but I would like to get a convert

  • TS1398 error message says " unable to join the network"

    I have tried turning the wifi on and off, turning the ipod on and off, the forget this network option, and reset all network connections. It still gives me an error message. I have 5 other devices that are working fine. My network is showing full bar

  • Dynamically increase the size of jtextarea so it can display added content

    I want to know if ever there is a way to dynamically resize a jtextarea so that it shows the text that spans beyond its length. I want to display my service activity which grows in size and fills up the textarea, but after that i can't see what is be

  • How do i email documents from idisk on ipad?

    Just bought ipad 2, loaded PDF's for clients to view. Used IDISK because I thought that would be easiest.  Would prefer to drag/drop PDF's from Macbook Pro onto ipad but do not know how to do that now.   Often need to email one quickly.  Cannot find