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

Similar Messages

  • Changing the Availability Check key in an existent Sales Order line

    Hello gurus.
    Is it possible to modify the Availability Check key (VBAP-MTVFP) of a material in an existent Sales Order line?
    I changed it in the material master, but since documents are not automatically updated, I wanted to modify this value in an existing sales order line. I am not even able to find the field in it.
    I had to delete the order line and create it again, but then I have troubles getting the exact same confirmed date that I had before.
    Any help? Thank you.

    You cant see at item level.  To see in sale order, click from top menu bar, Environment -- Availability.   Now you can see the availability check on top of the screen.
    Meanwhile, I dont think, this field will be in editable mode once partial delivery is made in which case, LSMW also wont help you.
    If your requirement is desperate to change the availability check, to me the available option is close the existing sale orders, create fresh orders after changing the availability check in material master.  On the other hand, if you want to change only in sale order, then the option is LSMW as you cant even succeeed in TCode MASS
    thanks
    G. Lakshmipathi

  • Production Order quantity should be same as Sale order line item qnty

    Dear experts
    we have one user requirement as such
    Production Order  line item quantity should be same as Sale order line item qnty.
    suppose for SO Line item he is ordered 100mts,Production of this paricular Line item should also be 100mts it should not be more than this,How to satisfy his requirement.
    Regards
    Sandeep patil

    Hi,
    If the Manual intervention is eliminated for processing of the data then the SO Line Item Qty will be equal to Production order Qty.
    Background Jobs for MRP Run, Planned Order to production order cretaion will help you to manage this, along with effective Authorization Management.
    Regards,
    Siva

  • Change the Payment Method at header level in Sales order document.

    Hi Experts,
    I have a doubt and a problem; I want to change the Payment Method at the header level however that is not possible never at header level is the same even either I chose other when I was creating the sales order document or I tried to change after that. The system allows changing the Payment Method but when I display the document after that the change is not done always is the same payment method. Maybe it is defined at customer or sales organization level.
    At item level it is possible change the payment method with any problem.
    Thank you and best regards.

    Dear Alberto
    Payment Terms can be changed both at header level and at item level in sale order.
    thanks
    G. Lakshmipathi

  • How to Update the New Condition values for list of sales orders

    Hi
    Client requirement is they have set of old Sales Orders to be executed. But the material prices have been revised in the meantime. Now they want to update the current prices in the sales order before proceeding further.

    Hi,
    Though Lakshmi suggested you the right option, it may not be carried out for Sales Documents in random and will be much suited for Sales Documents with continuous sequence like 00010, 00011, 00012, 00013, etc.
    If you want to New Pricing to be carried out for Specific Lists of documents like 00010, 00017, 00043, 00057, etc, then you can do by following option:
    Go to Transaction "MASS", Select the Table - VBAK and Field - PRSTD and proceed by entering the Sales Documents Lists to carry out New Pricing.
    Hope this will be helpful to you.
    Rgds,

  • Restricting prod order quantity from being higher than sales order quantty

    Dear Experts,
       I create production order interactively through co08 ( prod order with respect to sales order). the prod order automatically picks up the quantity in the sales order which is desired, but this order quantity field in the prod order is editable (i.e can be made higher or lower). Please how do I restrict this prod order quantity from being  higher than the sales order quantity?i mean what should be done to make system disallow the prod order qty being fixed higher than thesales order qty?

    Hi,
    Even though you create the production in refernce to the SO, the order quantity can be alter.
    This is a normal behaviour of the system.
    To restrict any change in the order quantity, you can use tarnsaction variant for CO08. T code is SHD0.
    Secondly you can use the following enhancements to restrict the same,
    PPCO0006
    PPCO0007
    Hope this helps you.
    SmanS

  • Need Minimum Order Quantity to show up on Sales Order

    We do private label manufacturing jobs. We have defined the Minimum Order Quantity in the Item Master under Planning. I am trying to get that info to populate on the rows if that item is selected. I don't see that field as an option on tghe form design. Any ideas?

    1.You should define a user defined field in the marketing document rows and
    2. make a formatted search to fill it with the minimum order quantity.
    ( The formatted search may look like this:
    Select I.MinOrdrQty From OITM I Where I.ItemCode=$[$38.1]
    And you should set auto refresh when exiting altered column item no.)

  • How to find the original net value for a cancelled sales order

    Hi experts,
    From VA03 or table VBAP, net value for those cancelled items is always zero. Where to find those cancelled items' original net value?
    Thanks a lot.
    Yu

    Thanks Seshu,
    I just tried it as per your suggestion but I found for non-cancelled items konv-kbert is not equal to the net value taken from vbap-netwr.  So I wonder if knov-kbert is the right original net value for those cancelled items.
    Yu

  • Changing the delivered quantity using  BAPI

    As  per the reqt,  for Internal customers  I m changing the delivered qty (LIPS-LFIMG) to a rounded quantity based on the KNMT-RDPRF(full box qty) value.
    I m passing the rounded quantity  to an BAPI_OUTB_DELIVERY_CHANGE , expecting it to change the delivery quantity value from the all the related delivery tables like the LIPS and others.
    But this BAPI is not functioning as desired, what might be the error and is there any other option by which which I can change  the deliverey quantity to an rounded qty in the field LIPS-LFIMG.
    Please help to resolve this.

    Hi Vishnu,
    At first I was surprised to see this question. We cannot change material number. Hence there are 2 options available:
    1) Create a copy of the material and change the material number to what you want at the time of creation of the new material by inserting code in the fm that generates a material number.
    2) use the field material_external to store the material number required. This field is available in the import parameter 'HEADDATA' of BAPI_MATERIAL_SAVEDATA.
    The second option should be better.
    Regards,
    Nimish

  • Changing the Confirmed Quantity in Sales Order

    Hi Gurus,
    I have a requirement to change the confirmed quantity of the line item of the sales order. Is there any FM or BAPI that I can use? And how?
    Thanks,
    Andre

    Hello,
    I am having to deal with a similar issue.
    The allocated quantity needs to be reset, so that the quantities can be allocated again according to the checking rule for product allocation.
    This is probably not clear anymore, I am also totally confused now, so I'll add an example.
    Example:
    SCENARIO 1: Rejected item quantity not available to earlier order:
    Assume product ABC is on a monthly allocation plan at a channel level
    Available units = 100 units
    Allocation plan = 50 units for Channel1, 50 units for Channel2
    Assume all orders in this scenario are for one channel
    1.     Order 1 is entered
    Qty of 40     confirmed from ATP check, confirmed from allocation check
    RESULT: allocation of 40 units is consumed, available allocation = 10 units
    2.     Order 2 is entered
    Qty of 20     confirmed from ATP check, confirmed for 10 units from allocation check
    Remaining 10 units unconfirmed
    RESULT: allocation of 10 is consumed, available Allocation = 0 units
    Unconfirmed order quantity = 10 units
    3.     Order 1is rejected
    line item for Qty 40 is rejected
    RESULT: available allocation = 40 units
    4.     Order 3 is entered
    Qty of 40     confirmed from ATP check, confirmed from allocation check
    Allocation of 40 is consumed
    RESULT: allocation of 40 is consumed, available allocation = 0
    5.     Rescheduling is run for this product (order creation date determines priority in the queue)
    EXPECTED RESULT:
    Order 2 has highest priority and would be committed for 20 units, leaving 30 units for Order 3
    Order 3 Commit quantity 30, unconfirmed quantity 10
    Order 1 Line item was rejected, (no committed quantity)
    RESULT:
    Order 2 - Commit quantity 10, unconfirmed = 10 (as available allocation 0)
    Order 3 - Commit quantity 40
    Order 1 - Line item was rejected
    So I need to reset the allocated quantities first...
    Were you able to find a solution for this?

  • WM-production order-need change the open quantity in Transfer order

    Hi,
       I created the production order (order quantity 1000).  i did material staging and generated TR. .
       But i need to change the open quantity in transfer order . i need to create the partial Transfer order
        against TR..
       KINDLY SUGGEST ME
       WITH REGARDS
       Dinesh

    Hi Dinesh,
    TO for partial qty is possible.
    When you are doing material staging with 319 mov.type, you create a transfer order for partial quantity as follows:
    You first create a manual transfer order using transaction LT04.
    You specify the TR number in the intial screen and navigate to the detail screen, system shows the Open TR quantity and the proposed TO quantity. By default, both these quantities are equal to the TR quantity.
    However, when you create by clicing the "Create TO button" (the icon with a plus sign in the tool bar of LT04 screen), system takes you to another screen where it asks for the "Requested Qty" on the top of the screen.  Here you can modify the qty as per your requirement; then you can check and confirm the storage type and storage bin for source and destination stocks & save.
    It is important that you give the correct source storage type & storage bin that is having stock or otherwise system might give error message.
    System will create a TO line item with the entered qty and propose the balance TR qty as the 2nd TO line item. You can skip this 2nd TO item or delete it from the TO.
    Once again, if you click the Save button, system will save the TO with the partial quantity.
    The balance quantity will be available in the TR as open quantity and this can be seen in the header data of transaction LB03.
    Regards
    Prabhu

  • System doesnt let me change the delivery quantity greater than sales order

    Hi,
    In delivery document , when I change delivery quantity greater than related sales order quantity , system just show the Message no. VL363 but let me change the quantity.
    Is it any way that system do not let me to change delivery quantity greater than its related sales order?
    thanks.
    Lida.

    Is it any way that system do not let me to change delivery
             quantity greater than its related sales order?
    Go to zeroVLP,  select the item category and maintain "B"  for the field  Check overdelivery

  • How to change the open quantity of PO / STO using  BAPI_PO_CHANGE

    Hi Friends,
    How can I change the open quantity in ME22 using the BAPI BAPI_PO_CHANGE...
    I am getting some errors..The values I am passing to the BAPI are:-
    *-- Purchase Order document
        lv_purchaseorder = tbl_join-ebeln.
    *-- Calculate Open quantity
        lv_quantity = ( tbl_join-menge - tbl_join-wemng ).
    *-- Fills Schedule quantity to be processed.
        tbl_poschedule-po_item      = tbl_join-ebelp.
        tbl_poschedule-sched_line   = tbl_join-etenr.
        tbl_poschedule-quantity     = lv_quantity.
        APPEND tbl_poschedule.
    *-- Marks the Schedule quantity to be processed.
        tbl_poschedulex-po_item     = tbl_join-ebelp.
        tbl_poschedulex-sched_line  = tbl_join-etenr.
        tbl_poschedulex-po_itemx    = c_true.
        tbl_poschedulex-sched_linex = c_true.
        tbl_poschedulex-quantity    = c_true.
        APPEND tbl_poschedulex.
    CALL FUNCTION 'BAPI_PO_CHANGE'
          EXPORTING
            PURCHASEORDER                = lv_purchaseorder
          POHEADER                     =
          POHEADERX                    =
          POADDRVENDOR                 =
            TESTRUN                      = 'X'
       IMPORTING
          EXPHEADER                    =
          EXPPOEXPIMPHEADER            =
         TABLES
           RETURN                       = tbl_return
           POSCHEDULE                   = tbl_poschedule
           POSCHEDULEX                  = tbl_poschedulex.
    Is there any other required fields needs to be passed to change the open quantity..
    I am checking in ME22...
    The scheduled quantity is 20.
    Delivered quantity is 15.
    Open quantity is 5   and ( this field is in non-editable display )
    Delivery date  is 10.10.2002  ( which is in past )
    Now using this BAPI ..I want to post the remaining open quantity which is " 5 "
    How can i do this ?? Please help.

    Hi Hari
    Please check after making the following changes:
    *-- Marks the Schedule quantity to be processed.
    tbl_poschedulex-po_item = tbl_join-ebelp.
    tbl_poschedulex-sched_line = tbl_join-etenr.
    <b>tbl_poschedulex-po_itemx = 'U'. "c_true.
    *tbl_poschedulex-sched_linex = c_true.</b>
    tbl_poschedulex-quantity = c_true.
    APPEND tbl_poschedulex.
    If still you do not get the desired function working add the below code:
    tbl_poitem-po_item = tbl_join-ebelp.
    tbl_poitem-quantity = lv_quantity.
    append tbl_poitem.
    tbl_poitemx-po_item = tbl_join-ebelp.
    tbl_poitemx-po_itemx = 'U'.
    tbl_poitemx-quantity = c_true.
    append tbl_poitemx.
    Hope this helps.
    Kind Regards
    Eswar

  • How to change the billing qty directly during VF01 in AFS?

    Dear experts:
       Can anyone advise how we can change the billing qty directly during VF01 in AFS? Can anybody tell me why i can modify the billing qty in SAP R/3 ECC6.0, but it fail to in AFS, why?
    The operation was:
    1、I have  to done one customising, in VOV7 for my Item category change the Billing Relevance to "K";
    2、We setting up as Delivery note  related billing and would like to change the qty at the point of billing;
    3、Enter the Delivery note number Do not Press Enter, Then Click on u201Cselection listu201D, however , the field of "open quantity"  is in greyed out mode !
    In SAP R/3 ECC6.0 ,In transaction VF01 put the Delivery note NO. and before entering or executing go to "selection list" and we will find the quantities in editable mode and we can change there and then execute billing,but in AFS,the field of "open quantity"  is in greyed out mode ! I asked a lot of friends in AFS, they also  have this problem!
    Thanks
    Peter.lee
    Edited by: peter.lee on Nov 19, 2011 3:05 AM

    Hi Guys,
    Contrary to others IS (retail, oil etc...), AFS has been almost fully redesigned in some areas. That's why SAP releases first EHP business functions for standard and then try to enhanced the new created features later in AFS EHP.
    In regards to the change of the billing quantity, from my prospective this is not supported. Quantity always comes from preceding document.
    AFS is implemented in many industries like workwear, fashion high fashion, sportwear, underwear, bags etc...However I never got the same requirement to change the billing quantity.
    For which reasons do you need to change the billing quantity ? Can this be done in the sales order (in case of debit/credit memo request) or in the delivery ?
    The billing area has some restrictions, such as doing a pricing redetermination, in AFS it must be done in the sales order for example.
    You could potentially ask SAP and see whether an advanced modification could be provided (this is chargeable).
    Hope this might help.
    Regards,
    Mehdi

  • Unable to change the data in PSA

    Hello All,
    I have a delta failure because of invalid characters in one of the field and now i wanted to change the PSA. I have deleted the request from all data targets and started changing the error record, it is not showing all columns from PSA hence i am unable to change the data in required field.
    Could you please let me know how will i see all columns from PSA. Thanks
    Regards,Ashok

    Hi Ashok,
    To increase/decrease the number of columns that are displayed on the menu from the Settings option select Change display variants
    Also if you want to see say all the failed records you can sort the order of the data using the Status column

Maybe you are looking for

  • How to check if a button is clicked or not

    Hi All, This is rani.  Im very new to SAP. Im into my first project, in which im having an immediate enhancement. In SRM Portal, I need to logged in as bidder to create a bid response. Participate button is there, i need to clicked that button, this

  • ISight (built-in) not working?

    I just got my new iMac yesterday, all bright and shiny. Started setting it up, and for whatever reason, it seems the Built-in isight on this machine doesn't want to work! I got to the portion of the set up where it asked if which image I'd like to us

  • Logic Express 7 and imac Intel Core Duo

    I recently bought both items mentioned above but havent had the time to install LE7. Should I bother? I read through some posts and it seems they are incompatible.. I dont live in the USA so the send in CD for an upgrade option may be difficult

  • Need to exclude storage location from MRP.

    Hi Gurus, Is there an option to exclude a specified storage location from MRP at configuration level. But not at material level as in MRP4 view. We have excluded the stoarge location in config OMIR, however the system considers that stock if the same

  • Where idoc_output_ordrsp is launched

    Hi!! When the user creates an order we launch an idoc through IDOC_OUTPUT_ORDRSP (we modify some user exits). I need to know where is the include or programm that launch this function when an order is created and saved. Thx in advance