How to trigger Availability check in Sales Order 'save' user exit.

I have requirements which dictate that I change item categories of most of the line items in a user exit. If I do that the line items no longer confirm. I know that the availability check happens in 'move_Field_to_vbap' user exit. Is there any way I can re-trigger it on save. These orders will be coming through a bapi. Thanks in advance.

Hi!
Search the way (via menu) in VA01 to trigger the availability check manually. Then have a look, with routines are called.
Then call this (these) routines in the exit. If you see something like 'perform okcode_...', then this should work. Be careful not to trigger recursive loops by this way. Maybe  the prepare_save-exit is a better place to do this.
Regards,
Christian

Similar Messages

  • 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

  • How to ChangePlantfor each item of Sales order using User Exit SAVE_DOCUMEN

    Hi All,
    I have to change plant for Each line item of sales order using (MV45AFZZ) (USEREXIT_SAVE_DOCUMENT) based on first Schedule line.
    if Confirmed Quantity is Less than Ordered Quantity.
    based on first Schedule line.
    it has to select other Plant and need to populate it in line item of sales order.Please see the below code and let me knoe if any changes required... Thanks in Advance.
    data : wa_vbep like xvbep,
           Lv_matnr type mara-matnr,
           lv_werks type marc-werks.
    DATA: it_vbap TYPE STANDARD TABLE OF vbap,
          wa_vbap TYPE vbap.
    field-symbols: <wa_vbap> type VBAPVB.
    clear wa_vbap.
    *loop at xvbap into wa_vbap.
    loop at xvbap assigning <wa_vbap>.
    read table xvbep into wa_vbep with key posnr = <wa_vbap>-posnr.
    if wa_vbep-ETENR = '0001'.
    if sy-subrc = 0.
    IF wa_VBEP-BMENG LT wa_VBEP-WMENG.
        SELECT SINGLE DWERK
                     INTO lv_werks
                     FROM MVKE WHERE matnr = <wa_VBAP>-matnr
                                and  DWERK ne <wa_VBAP>-werks.
    if not Lv_werks is initial.
    if lv_werks EQ 1033.
    move '1002' to <wa_vbap>-werks.
    if sy-subrc eq 0.
      xvbap-werks =  <wa_vbap>-werks.
    modify xvbap from <wa_vbap> .
    endif.
    elseif lv_werks EQ 1003.
    move '1003' to <wa_vbap>-werks.
    elseif lv_werks EQ 1010.
    move '1010' to <wa_vbap>-werks.
    endif.
    endif.
    endif.
    endif.
    endif.
    endloop.
    endif.
    Regards,
    Sudhakar Reddy.A

    You have to use the form routine "USEREXIT_SAVE_DOCUMENT_PREPARE"
    regards
    Vinod

  • Availability check of sales order in planning strategy 40

    Dear friends,
    Kindly help me this query:
    From online SAP help in Demand Management, it said in planning strategy 40:
    "An accurate availability check is performed according to ATP (available to promise) logic during sales order processing. The system checks whether sufficient planned independent requirements have been planned to cover the sales order....  If there is insufficient coverage of components (the sales order quantities exceed the planned independent requirement quantities), the sales orders cannot be confirmed"
    According to above paragraph, I think that availability check of sales order is carried out against PIR, if PIR quantity cannot cover sales order quantity then order will not be confirmed, it also means stock on-hand will not be included in availability check. However, my testing reveal a different conclusion: sales order is confirmed against stock on-hand, not PIR. My questions are:
    1/ in planning strategy 40, how does system carry out availability check for sales order?
    2/ how to interpret above help from SAP?
    I got that help from this link: http://help.sap.com/saphelp_erp60_sp/helpdata/en/cb/7f9b7043b711d189410000e829fbbd/frameset.htm
    Many thanks for your clear answers.
    Regards,
    Duc.

    Dear duc pb ,
    In 40 its only ATP that works.
    you can do another test ,
    Create PIR 15 quantity.
    Create a stock of 10 quantity.
    and now create a sales order firszt of quantity 30, as both of the above after combining cant fullfill this demand, save order run MRP.
    system will create orders against PIR (15)  and remainibnbg quantity of sales order (5)
    run one more test, by creating PIR 15 quantity , no stock and a sales order of with quantity 10.
    share your findings.
    Thanks
    Ritesh

  • Availability check in sales order for DIEN materials.

    Hello,
    Is it possible to make availability check in sales orders for a service material e.g.: type DIEN? How can i customize it?

    The DIEN material type is not stock managed, so it does not make sense to check the availability. If you need to do something similar you could use material type UNBW, this material is quantity managed but not valuated, so maybe this can help you !
    Regards
    Roberto Mazzali

  • Changing Availability Checks in Sales orders

    hi there,
    Can i easily change the Availability Check in a sales order?
    i have 5 sales orde rtypes, and I sometimes want to change the Availability Check, how can i manage this?
    thanks

    There are three types of availability checks
    1. Availability Check with ATP Logic or Against Planning
    2. Availability Check Against Product Allocation
    3. Rule-based Availability Check
    For ATP logic, the Checking group and Checking rule combination determines the availability check parameters. The checking group is maintained in the material master, and not to Sales order type. Hence you can control by having different groups attached to different materials.
    If you have Advanced Planner Optimiser (APO) then you can use the Rule based availability check. You can attach a Business transaction to a Sales document type and thus control the availability check in sales order level also.
    Refer the below extracts:
    <b>Define business transaction</b>
    Path : spro -- img -- sd -- BF -- Av chk and TOR --- Rule based availabilty check
    In this step you can define the business transactions. These transactions must also be available in the APO planning system. Here the availability check control is carried out for the transactions.You can find the business transactions in the APO planning system (Field BPROC) under:
    Global ATP -> Settings -> Rule-based ATP -> Conditions -> Assign rule strategy.
    <b>Assign business transaction to sales order type</b> t code VOV8
    In this IMG activity, you assign the actions you defined previously to the order types. This activates the availability check settings for this order type, that were maintained in the APO planning system.
    Regards,

  • Availability check at Sales Order Create

    Dear Experts,
    I want to do availability check at sales order creation stage (VA01). My requirement is, the system should check the sales order line qty against the unrestricted stock. And if sufficient stocks not available it should prompt an error message.
    In more detail; unrestricted stock of material X is 100 PCs. I put a sales order for the same material for 101 PCs. Then systems should block me from saving the order.
    Can some please provide me detailed step-by-step action for configuration of above scenario. Thanks in advance for your support
    Regards,
    Ramindu

    HI,
    User exits in program FV45VFZZ
    USEREXIT_ADD_FIELD_TO_HEADER
    USEREXIT_ADD_FIELD_TO_LINE
    User exits in program FV45VFZY
    USEREXIT_DELIVERY_GROUPS
    USEREXIT_MVERF_INIT
    USEREXIT_QUOTA_KEY_VALUE
    User exits in program RV03VFZZ
    USEREXIT_AVAILABILITY_IN
    USEREXIT_AVAILABILITY_OUT
    USEREXIT_DARA_REFRESH
    USEREXIT_PLANT_SELECTION
    Check these user exits also very helpful to you.
    Regards,
    kishore.

  • Reg:How to add availability check in sales view

    hi all
    How to add availability check in sales view
    regards
    JK

    HI Janardan..
    Check out the help.sap link for Availability check. It has a lot of info.
    http://help.sap.com/saphelp_erp2005/helpdata/en/6b/2785347860ea35e10000009b38f83b/frameset.htm
    If it helps Reward with points..
    Regards Rk

  • Disable Availability Check on Sales Order  But Activate on Outbound Delv

    Greetings all experts !
    Currently, there's a new request to create a new processes whereby during the sales order creation, no availability check will be in place but material will still be posted to production planning ( TOR ).
    Availability check instead should be activated  during the creation of outbound delivery.
    I have already configured in such a way that the relevant sch line item ( VOV6 ) - availability check is unchecked and TOR is checked.
    But during creation of sales order, availability check is still in place for material specified.
    I have check on the necessary requirement class and requirement type settings. Fyi, requirement class used - availability check is ticked. Could this be the reason even though i have disabled availability check on sch line ?
    I have tried to untick the availability check setting in requirement class  ( OVZG ), and while this can disable the availability check in Sales order, but that configuration will also disable availability check in outbound delivery.
    My queries :
    1 ) What are the configurations that I need to look into to cater to the above request. To disable availabilty in sales order but instead, run availability in outbound delivery ?
    2 ) Is there any way I can disable the availability check on based on sales order type using userexit or function module ?
    3 ) Is there any additional function module/bapi/userexit that i can implement to force outbound delivery to run availability check ?
    My apologies for such lenghty message here but really really need some valuable feedback here as I'm totally at lost with the new requirement for now.
    Many thanks in advance.
    Warmest Regards,
    Edie O

    In SPRO
    goto SD>Schedule line>Define schedule line categories
    here check if the schedule line category associated with your mentioned order has a flag ticked for Availability.
    Availability check for sales
    You must carry out an availability check for the following transaction.
    The indicator is determined as a proposal in conjunction with the respective requirements type. It can be changed in individual shipping transactions. However, only one restriction is effective.
    Example
    You do not set an indicator for maintaining the requirements type. In this case, no availability check is carried out. This is independent of the selection in the respective transaction.
    You set an indicator for maintaining the requirements type. In this case you can decide whether or not you require an availability check for the relevant transaction.
    reward points if it helps
    regards
    Biju

  • How to Find  Credit Check Released Sales Orders /Deliveries?

    Hi Gurus,
       How to Find Credit Check Released Sales Orders /Deliveries for a particular Customer.
    Regrds,
    Binayak
    Message was edited by:  Binayak
            Binayak Ghosh

    Hi,
    You can chech inthe Tcode VKM2 Released SD documents, and VKM4 SD documents.
    reward if useful
    Regards
    syed

  • Sales Order Pricing User Exit Problem

    Hi,
    I am facing a problem related to coding in Sales Order pricing user exits. Scenario is as mentioned below:
    Based on Material Entered and Sold To in Sales Order, auto determination of a manual pricing condition happens. For doing this, coding has been done in USEREXIT_PRICING_PREPARE_TKOMP by changing XKOMV table. Auto determination of the manual price is happening properly.
    From Sales Overview Screen when user goes to the Conditions tab, Net Value is not getting calculated. When we navigate away to Schedule line tab and then come back to COnditions tab, Net Value is automatically getting calculated.
    AM i missing something in the coding part? As the data is getting populated automatically I guess some piece of code needs to be triggered. Can anyone shed some light into this.
    Thanks in advance,
    thunderans.

    Prabhu: After filling in XKOMV structure, I am calling FM PRICING. On doing this, the Sales Pricing is getting calculated but even then net value of order at header i.e VBAK-NETWR is not getting populated when we are in Sales Overview screen. When, I am getting into Conditions tab and coming back to Sales Overview screen, Net value is getting populated correctly. This portion of everything not getting populated at the same time is bothering me. The pricing conditon that I am  filling is a manual pricing condition.
    I put a breakpoint after FM PRICING which correctly populates XKOMV structure. How do I properly update Order Net Value in Sales Overview screen wihtout having to navigate to any other tab?
    Nicklas: I am looping at Order line within the user exit USEREXIT_PRICING_PREPARE_TKOMP and determining price. Once all line items are processed, I am using the FM PRICING for calculating Sales Prices.
    J@Y: Request to send me a bit more details into your approach.

  • Re-trigerring availability check in sales order

    Hello,
    I want to re-trigger availability check based on some critical field changes in sales order (like ship to party, delivery date etc ).
    how to achive the same. ?
    regards
    Pamela

    For such type of queries, please try on your own in your system, observe how system behaves and in that if you have any issue, please post here so that members will help.  In the past also, you have been asked not to post like this. 
    Really if you want to learn SD process, unless you try on your own, but expecting others' assistance, it will be very difficult for you to come up in the ladder.
    G. Lakshmipathi

  • Availability check on Sales order creation

    Dear Gurus,
    I'm trying to set the availablity check on Sales order creation VA01. I need to do this on saving the order. it there an SPRO for this. please help me out on this occation.
    many thanks..

    Hi
    If there is a stock of 1000 in unrestricted and if you have included sales requirements in OVZ9 (made a tick sales requirements in inward and outward movement) then if you create a order customer X with 100 quantities of that same material stock will be reserved for that customer X with 100 quantities
    But if you check in MMBE there wont be any reduction still it will be 1000 only
    If that order is delivered and pgi done then only In MMBE stocks will become 900
    To have a very proper reservation for that customer it is better to go to  t code MB1B movement type 412 E and that will reserve stocks for him with proper material document(reserving for sales order)
    If you do that unrestricted becomes 900 and sales order stocks become 100 in MMBE
    In case 1 there is chance of your 100 quantities can be reallocated to another customer thro back order processing
    In case 2 it is not possible it will be for that order only
    Or if you create delivery and dont do PGI then stocks will be reserved for that delivery
    But to have stocks reduced from MMBE you have to do PGI
    Regards
    Raja

  • How to  read header texts in the on save user exit of VA01

    Hi Experts,
    I have a requirement to read the header texts in the on save user exit.
    I have to check whether departmental code in header text is not initial or not.
    Can any one please pour in some points of how it can be done......
    Thanks in Advance.
    Prem

    Hi
    U can use fm READ_TEXT:
    DATA: THEAD LIKE THEAD,
          TLINES LIKE STANDARD TABLE OF TLINE WITH HEADER LINE.
    THEAD-TDID     = <text id>.
    THEAD-TDSPRAD  = <language>.
    THEAD-TDOBJECT = 'VBBK'.
    THEAD-TDNAME   = VBAK-VBELN.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
        ID                            = THEAD-TDID
        LANGUAGE                      = THEAD-TDSPRAD
        NAME                          = THEAD-TDNAME
        OBJECT                        = THEAD-TDOBJECT
      TABLES
        LINES                         = TLINES
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
       WRONG_ACCESS_TO_ARCHIVE       = 7
       OTHERS                        = 8
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    U can use it in all situations ( inserting and updating) because that fm returns the buffered text.
    Max

  • Regarding Availability check in Sales Order

    Hi All,
    We are using the Availability check with ATP.
    In the scope of check, activated "Include Sales requirements" to consider the open sales orders while doing the avalability check.
    But the Problem is while doing the Availability check, system is not considering the Open sales orders.
    For Example:
    I created 2 sales orders with ABC material. That point of time there was no stock available for that ABC material, that is the reason system has taken RLT to give the confirm qty and delivery date. Lets say delivery date is 30.07.2009.
    Today i received 100 qty and immidiately i created a sales order for 100 qty. system confirmed that 100 qty stock. Delivery date is today.
    My requirement is, i want to deliver the stock on first come and first serve basis by running back order processing.
    If there are any Back orders, how system is confirming the stock without considering the Back orders.
    Please let me know the possible reasons.
    Regards,
    Madhu.

    Hi Ankur,
    Thanks for your response.
    As  i explained in my example, while creating the Order1 for 100 qty there was no stock. That is the reason system has confirmed the qty after RLT time i.e 20th july.
    Before creating the 2 nd order, i recevied some stock. i created the second order, system confirmed the order qty i.e delivery date 12th.
    But my requirement is, system should not confirm the second order why because Order1 is open.
    In the night i run the back order rescheduling, based on the availability i want to deliver the Order1.
    Please let me know, how we can fulfill this requirement.
    If u need any more info, pl let me know.
    Regards,
    Madhu.

Maybe you are looking for

  • Excise & taxes in Third Party

    Hi,    How can we handle Excise & taxes in case of Third party Senerio. for both The case of Third party (with Notification & w/o notification). Regards Pavan

  • Why can't I delete or rename files in Word for Mac and other Office programs?

    When I try to delete or rename an Office for Mac file, I can't.  How do I delete/rename Word for Mac and other Office for Mac files?

  • Delete language template in use Cisco ISE

    Hi I have a problem updating my ise, there is a faulty language template in use as I can see in the log files, its not a system template so I want to proceed to delete it, but I can't because its still in use by a sponsor or a user, the problem is th

  • Solar Power charging issues

    Hi I have a 52 amp Brunton solar panel and two 14 amp Brunton SolarRolls attached to my MacBook Pro in direct sunlight. The MagSafe power lamp glows bright green but NOT orange which I believe indicates that my battery is charging. In full sunlight I

  • Commission Agent in Sales Order

    D/ Friends, 1. Pl advice how to configure Commission Agent (Forwarding Agent) in the Sales Order. 2. Weu2019ve to give commission to the Agent, so which condition type shd be used for that purpose & how Commission Agent will get credited with the com