Custom program for availability check and update for existing sale order at Item level(VA02)

Hi,
I came to know Bapi_Saleorder_Simulate can be used for availability check and update an existing sale order.but there is no sample program explaining the process.I have tried this by passing parameters ORDER_HEADER_IN , ORDER_ITEMS_IN  ,ORDER_PARTNERS and ORDER_SCHEDULE_EX(for getting details),also i have assigned the sale document number ,custom document type(ZSO) in ORDER_HEADER_IN . while executing the BAPI I am getting the error external number range is not assigned for the document type ZSO . I am confused on seeing this error. It is possible to do availability check for existing sale order using this BAPI. Please explain how to achieve this.It will be really helpful if it is expalained with an example.   
Regards,
Shanmuga

Hello, I think you may have been misinformed about this BAPI updating a sales order at item level. As far as I understand it this BAPI can be used to simulate the creation of a sales order which obviously would include and ATP check. This is why it is giving the error because it is simulating creation but you are entering a value in a field that should be automatically generated (i.e. the sales order number). For change the sales order at item level have you looked at BAPI_SALESORDER_CHANGE? I pretty sure this BAPI both updates sales order (header or item level) and can do an ATP first.
Points are always welcome if you feel an answer has been helpful.

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

  • Wrong Gross Weight for Material in Sales Order at Item Level (Shipping Tab)

    Dear All,
    Except MMR, where we maintain gross weight for material?
    Or, from where Gross weight gets detrmined in Sales Order at item level (Shipping Tab)?
    Details,
    I've 2 Materials in Sales Order, Mat1 and Mat2.
    In both the MMRs, Gross weight is 1.080 Kg
    In sales Order Mat1 has Qty 18,000 Kg and gross weight is 19,440 Kg --> which is right.
    Mat2 has Qty 2,160 Kg and gross weight is 2,332,800 Kg --> which is wrong.
    I tried with maintaing another line item with Mat2 in Sales Order, for which again wrong gross weight is calculated.
    I also tried with creating another Sales Order with Mat2, and again the same problem.
    Thanks for your help, in advance.
    Regds,
    Yogi.

    Hi,
    Thanks. That has already been checked by me, in Basic data1 --> Additional Data --> Unit of measurements
    everything is maintained correctly.
    What I have noticed is:
    Instead of obtaining Gross weight as 1.080 (which is maintained), somehow system is picking 1,080 (don't know why and from where)?
    Regds,
    yogi

  • Product Hierarchy Update on Existing Sales Order

    Hi,
    My company business process allows sales order to be created up up to 3 months before shipping.  Prior to shipping, material can have the Product Hierarchy changed and pricing can also be updated for the new product hierarchy value (Pricing record with Product Hierarchy in the search key).  Our company also want to make sure we bill customers with new (correct) price.
    In order to support pulling in the new price for our existing backlog (orders), so that we don't mis-bill our customers, we need a way to update the product hierarchy value on the existing sales orders that have not been shipped.   Our current solution is to implement some custom logic in the Sales Order Update user exit, so that when the user clicks on the "Update" button on the Condition Screen on VA02 to manually update price, the custom logic will be invoked to re-pull the Product Hierarchy from the MARA table to overwrite the old Product Hierarchy on the sales order.  Next, pricing will perform the search for new price using the updated Product Hierarchy value.
    This solution has worked okay for us, but we are trying to evaluate if there is any other better way to accomplish this same request.  We would prefer to implement something that is offered by SAP via configurations.  We try to stay away from customization as much as possible.
    Have you ever experienced something similar or do you have any idea how to support this kind of business process?
    Thanks very much.

    Hi Hans,
    We don't want to wait for until billing to update price since we have the CI created at the time of delivery not billing.  CI document also needs to display correct pricing for custom purposes.
    Also, we would like to keep pricing on the Sales Doc. and Billing Invoice the same.  This is why we would like to trigger re-pricing on sales order.   And when pricing is re-invoked, we need to re-read the PRODH data to ensure new price is retrieved.
    Thanks for your response.
    Hannah

  • Materials in stock at u loc consider for Availability check but not for MRP

    Dear ALL,
    Please solved the problem by settings in the customizing  we are able to set the materials  at stock U location (serviceable )should not be considered in Mat Availability  for PM orders
    Settings we have made for all storage locations in U * By excluding storage location stock from MRP
    If storage location stock is excluded from MRP at plant level, no receipts for this storage location will be created in the planning run.
    so we are able to run the availability check perfectly
    But now MM dept.is not accepting this as they want this stock to be considered for MRP
    Has anybody done this scenrio successfully please reply the solution
    Regards
    Pratap

    A way that I think of, is to set the ATP at SL level, so in PM order you check only in a specific location, not in all the plant.
    Of course that you need to let all SLs to be relevant for MRP, otherwise this stock is not considered for planning.

  • Need help on IDoc for Picking, Packing and PGI against the Sale order

    Hi All,
    I am new to this IDoc stuffs. Below is the scenario for which I would like to know the details of the IDoc...
    Business Case:
    1. Storage location is a HU Managed but not WM managed.
    2. This storage locations is managed by a third party
    3. Outbound delivery document against the SO will be created by our personnels in SAP for this storage location.
    4. Picking, Packing and PGI needs to happen/post via Idoc. (By packing here, i refer to assign the HUs that are already created for the materials and is available in the storage location and not repacking)
    Is there any standard IDoc that can be used here to Pick, Pack and post PGI. We would like to have picking and packing in a first idoc and PGI on the second idoc.
    Thanks,
    Prashant

    Hi Typewriter,
    Thanks for your reply on this post..
    The business process is as below (it was changed recently to have the creation of OBD, pick HUS and then post GI via single IDOC)
    1. We have a storage loc in our enterprise structure that is HU managed but not WM managed.
    2. This storage loc is being maintained by a third party.
    3. SO will be created to be shipped out of this plant/sloc.
    3. The stocks at this storage loc will be Special stock "E" against the sales order. And the stocks will be Packed in HUs.
    4. The third party is informed to deliver the stocks (HUs - that do have the special stock number which internally refers to the the SO number and the line item number) directly to ship to party address in SO.
    5. The 3rd party will physically ship the HUs to customer and send in the details that they have shipped goods against the sales order.
    6. The details sent by the 3rd party will be received in SAP to create OBD for the sales order, Pick, Pack and post GI. This can happen via a single IDOC..
    I am now planning to create a custom IDOC type referring to the standard IDOC type DELVRY03 and message type DESADV and to use a custom BAPI/FM.
    Do you think I am using the right ones?
    Thanks,
    Prashant Kumar

  • Availability check run requirement in the Sales order Save user Exit.

    Hi Gurus,
    As per the requirment we are using a user exit SAVE SALE ORDER PREPARE for BOM purpose to reconfirm the confirmation qty.
    Now we need to add one more logic in the same user exit, which will run the availabilty check run for each of the line items of the BOM and consider latest confirmation qty from it. So my concern is it possible that we can call the availabilty check run event with in the user exit SAVE SALE ORDER PREPARE or this not advisable?
    Please let me know..
      Regards,
      Babs

    HI Venkat,
    Thanks for your reply.Yes you are right availability check runs automatically at sub item level.
    But please note the customer requirment iteself is is little different from std BOM configuration.
    Currently the availabilty check is activated both at header and sub item level. They are maintaining the stock for header and sub item level.Also the these sub items are some time being sold as invidual materials. hence there exist a mismatch in the stock value between header and sub items.
    when a sales order is created both header and sub items will have confirmation with different value between each and the same mismatched values are being passed in to delivery. But the deliveries can not be processed for PGI because of the mismatched confirmation qty between header and item level.
    I guess now you the rrequirment.
    So we are using the SAVE SALE ORDER exit which will re check the confirmed qty between header and item and takes lowest confirmed qty and change the confirmed quantities from all the line items to lowest one, so that confirmation qty among all the line items are same. This is the first logic we are planning.
    Further there is one more additional process BOP need to be run for this header and sub items, which will change the confirmed qty based on the latest stock for individual line item. even in this case also the user exit SAVE Sale order is being called but we need to run the availability check run additionally because of which our requirment will be taken care.
    Regards,
    Babs

  • Availability check of raw material during sale order processing

    Dear experts,
                           When i am entering the finished good in sale order processing,system should check the raw material availabilty.Is it possible in STD sap
    Regards,
    murali.R

    thanks to you all for your reply,
    My customer is bright bar manufacturer,They just buy the steel bar & process it & sell it to the customer.So there is only one RAW MATERIAL.
    Their all the activities are mainly based on raw material.So customer wants.....when we enter the finished good system should check the RM stock,based on RM STOCK,sytem should do the availability check...& confirm the delivery date
    I have mapped customer requirement,after modifying item category & assignment......
    Sales BOM explosion & delivery group is maintained for header material.availability check is on at component level & header level.So now system consider the raw material stock & it conform the dates when  i do availability check combinely.
    I would like to know how it will affet the MRP incase of alternative BOM....FURTHER PROCESSING
    Is it the right practise.....Please reply...............

  • New sales order and Change sales order in item level or delete at item leve

    I got one requirement. Daily i have to display one report on new sales orders created on that day and any sales order item is modified or any item is deleted or any item is added.
                      How to get the sales order numbers and position numbers which will follow above creteria. I found one function module but it is not giving position numbers and new sales order details.
             Is there any BAPI for this requirement.

    I am using "CHANGEDOCUMENT_READ" function module to get the new sales orders created and changed sales order items on a particular time. This function module is getting data from CDHDR and CDPOS tables. But only change sales orders is coming. New sales orders which is created on that time is not getting.
              One of my friend is telling like we have to activate one change pointer to retrive new sales orders also. Which is like there will be one check box.
    Is any body having idea on this. Please reply me on briefly with the code to retrive new sales orders and changed sales orders

  • Credit check at sales order line item level

    We are trying to carry out credit checking at the line item level. Standard SD only has credit checking at the document level.
    Does anyone know of any enhancements or notes we can apply to achieve this.
    Thanks Steve

    Hi Steve,
    The field VBAP-CMGST is only at the header level that is the credit      
    status is only available at the header. So when you release a            
    sales order the entire order is released. It cannot be maintained        
    at the  item level.                                                                               
    Note 60672 explains that placing a delivery block on the schedule line   
    level will have this affect on credit management.  Credit bases things   
    on what can be delivered. Please check in the tranx OVZ7                                                                               
    In block quantity confirmation in delivery blocks there is a blocking    
    reason setup (ZI) which blocks confirmation if an item is incomplete.    
    Please see configuration in transaction OVZ7.                                                                               
    Unfortunately, in standard SAP, credit block is applicable to the        
    whole S/O document.                                                                               
    In general, credit is applicable to the customer [soldto/billto/payer].  
    In SAP, this 'customer' is part of header/document level, and not        
    item level.                                                                               
    You can not change this behaviour in IMG or userexit.  
    I hope those information can be useful
    regards
    Ruy Castro

  • User Exit for credit management  at confirmed quantity in sales order

    Dear All ,
    kinldy tell how to define a user exit and where i can write for credit check to be done to the confirmed quantity in the sales order .
    Also pls tell me that how to define the user exit and attach to customer reserve field in the customising for automatic credit control .
    regards
    Baranidharan Ramar

    Hi
    The following is the information from the sap documentation...you can also refer from IMG - SD - System modification - userexit - userexit for credit check
    Credit Check
    If you want to carry out your own individual credit checks, that differ from those in the standard system, you must define them in the following user exits:
    LVKMPTZZ
    LVKMPFZ1: USER_CREDIT_CHECK1
    LVKMPFZ2: USER_CREDIT_CHECK2
    LVKMPFZ3: USER_CREDIT_CHECK3
    User exit for availability check
    User exit USEREXIT_AVAIL_CHECK_CREDIT exists in Include MV45AFZF.
    This user exit allows you to determine whether the system should or should not carry out an availability check after a blocked document has been released or after a new credit check.
    Thanks,
    Ravi

  • Sales order line item check based on material status

    Hi
    I have the following requirement
    There are Distribution chain specific material status maintained in the material master ( Sales Org1 View). Now for some of these statuses we need to reject these items in the sales order @ line item level. A reason for rejection needs to be assigned for these line items.
    Is there any standard setting or a user exit is required. I believe user exit save_document_prepare could be used to carry out these checks & assign a reason for rejection. Pls suggest asap
    Thanks
    Ramesh

    Dear Ankit,
    The difference between reason for rejection and delivery block is,
    Reason for rejection you can find this field at header level and line item level, the use of this is once you mention any reason for rejection the TOR or Schedule line not been confirmed for that material,so that the material can be confirmed to another customer.
    If you set delivery block the material for sale order in case if the material not available it will rise TOR or if available it will confirm the schedule line and block the material for that customer or sale order.
    This is the major difference between two.
    Regards
    Ram

  • Capture START and END installation date on order line item

    Requirement: capture both start and finish dates for an installation program. Will likely require 2 new fields at order line item level.
    USEREXIT_MOVE_FIELD_TO_VBAP???
    Any suggestion for this enhancement???

    Hi
    U need to enhance the VBAP table by APPEND structure in order to add new fields you need.
    So in that exit you can fill your new fields:
    MOVE <......> TO VBAP-Z<......>.
    Max

  • Minimum and maximum quantities in sales order

    Hello friends,
    Can anyone tell me how to maintain minimum quantity in sales order, (Not Minimum order quantity of material master) as only maximum (target) quantity is maintainable in sales order at Item level? So after this development in sales order, one can enter two quantities (minimum and maximum) so that sale can be done between this quantity range.
    I know this is not possible without exits or developments, but please tell if someone has came across the same scenario which exits used by you.
    Thanks in advance
    Warm regards
    Amit

    Min/Max quantity by sales order line items, but not by material?
    You can have your abapper code the Additional Data B screen user exits at the line item level.  You will add two quantity fields - min qty and max qty.  You will also have to code USEREXIT_CHECK_VBAP to enforce the rule that order quantity is between the limits.

  • Tried to check on updates for CS6 64 bit - Received message saying application manager may be damaged - download and install new copy - when I try this I receive message ERROR 404 I have a PC - any help would be gratefully received - thanks - William

    Tried to check on updates for CS6 64 bit - Received message saying application manager may be damaged - download and install new copy - when I try this I receive message ERROR 404 I have a PC - any help would be gratefully received - thanks - William

    reset your preferences:
    dreamweaver:  http://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver-cs4-cs5.html
    flash:  http://helpx.adobe.com/flash/kb/re-create-preferences-flash-professional.html
    indesign:  https://forums.adobe.com/thread/526990
    lightroom:  http://www.lightroomforums.net/showthread.php?14226-Resetting-%28or-Trashing-%29-the-Light room-Preferences-file
    photoshop:  https://forums.adobe.com/thread/375776
    if that fails, uninstall ps, clean (Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6) and reinstall.  then use the manual updates.

Maybe you are looking for