VA01, message when save a sales order

Hi,
I need to validate each one of the amounts of each position of an order of sales, this validation must allow that when finding an error shows the message and leaves to the user the possibility of modifying the amount with error, this validation only must become at the time of saving the order.
I have proven several alternatives with userexit_save_document and badi_sd_sales_item in the method item_check, but it does not use it because the amounts are valued always and I only need that it is validated when is going to save it. Please if somebody can give some idea. 
Thanks,
Claudia

Hi,
I use the user exit save_document_prepare and already shows the message but me it leaves disabled the positions and  I cannot modify them, when changing the message class it shows the message but at the same time save the sales order, i need that when find an error show the message and i can modify this position before save the sales order. 
Thanks,
Claudia

Similar Messages

  • EDI - triggering ORDCHG message when change in Sales Order

    Hi Experts,
    I am trying to capture the changes done to a sales order
    in SD and outbound the information changed in the sales order? 
    I was thinking that ORDCHG was the correct message type.
    But seems that this is used for captureing purchase order changes instead of sales order change.
    I know I can send a new idoc with ORDERSP but I want to capture what information was changed.
    Any help is greatly appreciated.

    Hi
    You can try this method.
    1. Typically what are the changes the customer is looking for is a) change in delivery schedule.
    b) New line added
    c)Change in order qnty
    d) change in Price
    List out all the changes that you want to capture.
    2. Create a table with sales order number, sales order line number, schedule line number, date ,time as the key and add other fields that you want to check if they are changed or not.
    3. write a program to update the table.
       The table is updated by checking if any of the data has been changed by comparing the data from this table and the one from standard tables like VBAK,VBAP,VBEP ETC.
    4. Define an output and assign the above program.
    5. Using the output determination procedure you can trigger the output.
    6. This will update the table.
    7. Write a program to check in this table if anything has been changed based on data and time stamp.
    8. Then call a BDC to trigger the output for the changed document.
    9. In the function module for sending ORDERSP write code to update what has changed and update the Idoc structure accordingly.
    It is hard to explain the whole process but this is good enough for a start a thought process.
    This works for me and hope it works for you as well.
    Reward if this helps
    Thanks

  • To save the sales order number in custom table while creation of the order.

    Hi Experts,
    Does there exist any exit to save the sales order number in a custom table while the sales order is created in VA01. The requirement is to capture the sales order number in a Z table when a field (payment terms ) is changed during the sales order creation.
    Regards,
    Sunitha

    Hi Sunita,
    You can store your data in the User exit MV45AFZZ in the form 'userexit_save_document'.
    You can navigate to MV45AFZZ from SE38 wherein an access key needs to be generated for that program, if you know to implement enhancement points then you can create an implicit enhancement point in this form without generating an access Key.
    Regards,
    Ravi Kiran

  • Message No V 0102 (Sales Order Error During Saving)

    We are using SAP ECC 6 version and the client is related to Beverage Industry.
    Problem:
    The scenario is this that we created a Sales Order. In the Sales Order we have entered let say 20 items and the item have sub item as well. We are using BOM usage 5. Once the order is confirmed the user creates the Delivery Order but doesn’t Post the Good Issue.
    Now the requirement is that the user wants to change and delete some item in sales order.
    For this first we amend the delivery order and then we change the sales order according the amendments made in Delivery Order.
    In this scenario we also want to completely delete the Main item but as its default that the Bom item will be deleted with the main but we want to enter the sub item again in the order because it’s the process requirement.
    Now when I make all the necessary changes in Delivery Order and Sales Order Respectively System saves the Delivery order with the changes values but gives an error message after Saving the Sales Order and doesn’t update the Sales Order as well
    Attached are the Screen Shot of Sales Order Error Screen.
    Note: This Error comes randomly

    Refer OSS 740280

  • Sytem should not allow to save the sales order based on risk category

    Hi,
    My user want to control the creation of sales orders based on risk category in credit control area.
    We created a new risk category - 30 Not authorized.
    And we made necessary configs also , like assignment of risk category and company code in OVFL.
    We assigned 30 risk category in FD32 for customers also.
    But while creation of sales order system is allowing to save the order.
    My user requirement system shoud not allow to save the sales orders for those are customers belongs to 30 risk category.
    How can we config. this
    thanks
    Sateesh

    hi,
    dont want to save the sales order if the credit limit exist ?
    then maintain block in OVA8
    choose
    your credit control area         risk categories             credit group
    1000                                        30 Not authorized           01
    checks tab
    choose static and maintain B
    this will give you error message and it will not allow you to save the sales order
    regards
    senya
    Edited by: senya_1111 on Oct 1, 2009 2:26 PM

  • Warning popup when raising a sale order

    Hi
    I have a reqt, where in when raising a sale order, the user will enter the Price manually, the PR00 has to compare with the VPRS of the material master & if the sale price is less than the cost, a pop up should appear on the sale order screen (Warning Message).
    Could anyone tell how to achieve this.
    Thanks in advance
    Aravind

    Dear Aravind,
    You can try this requirement through User Exit with the help of ABAPer
    Try with this User Exits in the program MV45AFZZ    
    USEREXIT_SAVE_DOCUMENT                                                 
    Use this user exit to fill user-specific statistics update tables.     
    The user exit is called up by the FORM routine BELEG-SICHERN before    
    the COMMIT command.                                                    
    Note                                                                   
    If a standard field is changed, the field r185d-dataloss is set to     
    X. The system queries this indicator at the beginning of the safety    
    routine. This is why this indicator must also be set during the        
    maintenance of user-specific tables that are also to be saved.                                                                               
    USEREXIT_SAVE_DOCUMENT_PREPARE                                         
    Use this user exit to make certain changes or checks immediately       
    before saving a document. It is the last possibility for changing or   
    checking a document before posting.                                    
    The user exit is carried out at the beginning of the FORM routine      
    BELEG_SICHERN.        
    I hope this will help you,
    Regards,
    Murali.

  • Trigger IDoc when ever a Sales Order is rejected

    Hello Experts,
    How to trigger an IDoc when ever a sales order is rejected.
    Thanks,
    Srikanth

    you have to define a message type that is triggered when the reason of rejection in not initial.
    You can do it by a standard access sequence. Then issue the message with medium 6.
    Best regards
    Roberto Mazzali

  • SDK Error -5002 when adding a sales order

    I'm getting an error -5002 when adding a sales order.
    Source code:
          IDocuments m_so2 = SBOCOMUtil.newDocuments(icmp, SBOCOMConstants.BoObjectTypes_Document_oOrders);
          line = m_so2.getLines();
          m_so2.setCardCode("2173231916");
          m_so2.setCardName("test Sales order");
          SimpleDateFormat formatter = new SimpleDateFormat("dd.MM.yyyy");
          Date today = Calendar.getInstance().getTime();
          m_so2.setDocDueDate(today);
          line.setItemCode("01005");
          line.setDiscountPercent(new Double(10));
          line.setItemDescription("description Testing");
          line.setQuantity(new Double(3));
          line.setTaxCode("0");
          line.add();
          long rc = m_so2.add();
    Question:
    Where can I find a list of error codes that can be easy to understand? PDF, word, etc.
    Thanks.

    Hi Diego,
    Looking at your code I see that you are doing a
    line.add();
    You don’t need to have this here unless you are adding another line to your document.
    Maybe this will help you.
    Also just because java is a bit different from VB get the last error message using
    SBOErrorMessage errMsg= comp.getLastError();
    System.out.println(errMsg.getErrorMessage());
    -Cormac

  • Exit for save the sales order

    When a new sales order created at that time based on perticular order type (ZRE) i need to check the vale of
    Screen field: KNVV-KZAZU (combine delivery) needs to deactivated.
    Program Name: SAPMF02D
    Please suggest the active user exit or routine that will trigger at the time save the sales order.
    Thanks & regards,
    Vinayak More.

    If you want to deactivate the field then you need to check this form..
    FORM USEREXIT_FIELD_MODIFICATION.
    * CASE SCREEN-NAME.
    *   WHEN 'VBAK-VBELN'.
    *     SCREEN-ACTIVE = 0.
    * ENDCASE.
    ENDFORM.

  • Automatic creation of intercompany PO when creating a Sales Order

    Hi Experts
    Is there a standard way of triggering an intercompany PO when creating a sales order to the final customer (or the other way around, triggering a sales order to the end customer upon creation of an intercompany PO)? Scenario: business has setup a logistics company (company code X), which its purpose is to deliver goods to the final customer (home customers). However, sales orders are created from seperate chain of stores which belong to another company code (company code Y). This chain of stores have one sales organisation (since there is over 1000 stores under a chain). I need a way to represent that a sale originated from a store/plant belonging to company Y to end customer A. Also, I need a billing document (intercompany) from company code X to store/plant beloning to company Y.
    Issues: in the intercompany config (assign intern customer numbers to sales org) - is there a way to assign a customer number at site/plant level so that when creating an intercompany billing it can be picked instead of the one assigned to the sales org and where can this be specified in the sales order (remember: in my scenario there are multiple stores/plants that belong to one sales organisation and it is not possible to use one customer number linked to the sales organisation.)
    Desired results:
    Sales order from store/plant YY belonging to company code Y to end customer A
    Intercompany billing from plant XX belonging to company code X to store/plant YY
    End customer billing from store/plant YY to end customer A
    Thank you in advance for your help.

    Hello Tsmash  
    I think you can acheive this with Regular Sales order + Inter Company STO combination.
    Maintain customer numbers for each of the Plants from Company Y for the sales area belonging to Company X.
    Then do the config for STO in MM using this menu path:
    SPRO/Materials Management/Purchasing/Purchase Order/Set up Stock Transport Order
    Here, in the activity 'Define Shipping Data for Plants',  enter each of the plant-customers and the Sales area belonging to Comany code Y. Carry out other activities in this area appropriately.
    Similarly set up Custom ( say Z1) Special Procurement type for Plant YY for stock transfer from XX using this menu path:
    SPRO/Production/Material Requirements Planning/Master Data/Define Special Procurement Type:
    Here maintain procurement type as F, Special procurement as U and plant as XX. You may need to repeat this config for each of the receiving plants (over 1000 stores under a chain)  from co code Y.
    In the material master MRP 2 for Plant YY,  maintain procurement type as F and Special Procurement as Z1.
    Sales order will be received under Co Code Y and sales area belonging to Y form customer A,
    Because of the MRP config, a PO (STO) requirement will be raised on Co code X and plant XX. XX will send the goods to YY via a STO delivery using the Shipping data from 'Set up STO' config,
    Plant YY will send the goods to A and bill that customer. Co Code X will raise an inter-comany bill on Co code Y.
    That's how it should work. Try it and revert with any issues.

  • Sale Order Item Quantity Not Populating When Create A Sale Order Using BAPI

    I am having a problem when creating a sale order using BAPI
    BAPI_SALESORDER_CREATEFROMDAT2
    Problem is that sale order item quantity field is not populating
    code is as follows
    ORDER_ITEMS_IN-ITM_NUMBER = '0010'.
    ORDER_ITEMS_IN-MATERIAL = '000000000010000262'.
    ORDER_ITEMS_IN-TARGET_QU = 'LB'.
    ORDER_ITEMS_IN-TARGET_QTY = 1.

    Hi,
    Try populating ORDER_SCHEDULES_IN table in the bapi field REQ_QTY.
    Regds,
    Rudra

  • Can't change quantity when copy from Sale order for Delivery

    Hi all!
    Can i use authorization for can't change quantity when copy from Sale order for Delivery.

    Tien,
    Approval will not work when you have mutiple rows of data.  You would have to work with SP Transaction Notification
    There has been threads before on the forum on the same topics.
    Block the Quantity in Sales Delivery
    Approval Procedure for chaning quantity in Delivery Document
    Suda

  • Error on ATP check when Creating a Sales Order

    Hello,
    I encounter error  on ATP check while creating a Sales Order.
    The error is when I create Sales Order using material A, with or with out indicating the Plant and Storage Location, the Purchase Order quantity is returned on ATP check, but when I create an SO with out indicating the Plant and Storage Location, no PO quantity was returned. Note that we applied SAP Note # 387482 to automatically determine the Storage Location. I have also checked material maintenance in MM03 of Materials A and Material B and nothing was different, they have the same Availabity check condition.
    Is it possible that the SAP note that I applied causes the error?
    By the way I have noticed that when I create Material B and manually populate the Plant and Storage Location there is a pricing error(but it returns the PO during ATP check).
    Thanks.
    Noreen

    Hello,
    I encounter error  on ATP check while creating a Sales Order.
    The error is when I create Sales Order using material A, with or with out indicating the Plant and Storage Location, the Purchase Order quantity is returned on ATP check, but when I create an SO with out indicating the Plant and Storage Location, no PO quantity was returned. Note that we applied SAP Note # 387482 to automatically determine the Storage Location. I have also checked material maintenance in MM03 of Materials A and Material B and nothing was different, they have the same Availabity check condition.
    Is it possible that the SAP note that I applied causes the error?
    By the way I have noticed that when I create Material B and manually populate the Plant and Storage Location there is a pricing error(but it returns the PO during ATP check).
    Thanks.
    Noreen

  • Inserting Pricing condition in Sales order when saving the sales order

    Dear ABAPers,
           My customers requirement is when saving the sales order new pricing condition has to be updated in the line item.for this i am using the User Exit 'USEREXIT_SAVE_DOCUMENT_PREPARE' ( MV45AFZZ).While saving the Sales order i am calculating the Price and updating in the Pricing conditions.
    In XKOMV internal table i am appending the pricing condition.But the problem is ,it is not calculating the taxes and it is Updating in VBAK and VBAP.
    How to do this.
    Thanks & Regards,
    Ashok.

    Dear ABAPers,
    I have Solved this Problem.
    Thanks & Regards,
    Ashok.

  • Unwanted printing of advanced payment when printing a sales order or pick

    It will be great to have an option of disabling the automatic printing of the advanced payment incoming payment when printing a sales order or invoice.
    The option is currently not available on the document printing options.

    No print sequence for sales order is setup.
    But even before on 2007 version, it was SAP default to print always the incoming payment of an advanced payment on every sales order or invoice.

Maybe you are looking for