Available stock in SalesOrder

Hi,
We use this query to check the available stock in an Salesorder for BOM items with FMS.
I want to extend the query now with a WHERE clause to see only the items that are not enough in stock based on Quantity in Salesorder multiplied with the needed quantity in the BOM.
Is this possible to achieve in this QUERY.
SELECT CASE WHEN ISNULL (T3.ItemCode,T1.ItemCode) = T1.ItemCode THEN T1.ItemCode ELSE T3.ItemCode END 'Artikelnummer' ,
CASE WHEN ISNULL(T3.ItemName,T1.ItemName)=T1.ItemName THEN T1.ItemName ELSE T3.ItemName END 'Artikelomschrijving',
IsNUll(T3.Onhand, T1.Onhand) 'In Magazijn'
FROM ITT1 T0
INNER JOIN OITM T1 ON T1.ItemCode=T0.Code
LEFT JOIN ITT1 T2 ON T2.Father=T0.Code
LEFT JOIN OITM T3 ON T3.ItemCode=T2.Code
WHERE T0.Father=  $[$38.1.0]
Thanks
Mark

Hi Mark,
Try:
SELECT Distinct ISNULL (T3.ItemCode,T1.ItemCode)  'Artikelnummer',
ISNULL(T3.ItemName,T1.ItemName) 'Artikelomschrijving',
IsNUll(T3.Onhand, T1.Onhand) 'In Magazijn'
FROM ITT1 T0
INNER JOIN OITM T1 ON T1.ItemCode=T0.Code AND T1.Onhand< $[$38.11.number]*T0.Quantity
LEFT JOIN ITT1 T2 ON T2.Father=T0.Code
LEFT JOIN OITM T3 ON T3.ItemCode=T2.Code AND T3.Onhand< $[$38.11.number]*T0.Quantity*T2.Quantity
WHERE T0.Father  $[$38.1.0]
Thanks,
Gordon

Similar Messages

  • Available stock information in detail

    I have the following suggestion to improve the logistic part of SAP BO 200X.
    When an article is on stock and there are purchase- or production orders, the salesorder only checks the TOTAL availability of the article.
    Example. On stock Qty 100, the ordered Qty 200.Available stock is Qty 300.
    A customer order is Qty 300 and will be accepted because the available stock is Qty 300, but if the customer wants to know when these goods will be delivered there is no direct answer possible, unless the production or delivery date is known.
    (To find this information you need to do some exploring in divers other programs!)
    This is nessessary for the planning of the delivery date of this sales order, but also for the customer to inform him correctly.
    Proposed solution:
    -Make a button in the (marketing document) order line to display the detailed purchase- or productionorder.
    -Change the current calculation of the available stock and give more detailed information.
    Detail information should be at least: DocEntry; Qty ;Production or Delivery date.
    Kind regards.

    Hi,
    We have a small add-on for this functionality. The basic overview of the add-on is:
    It has a button/context Menu on the Sales Order Entry screen where user can select the Item in the detail grid and click the button / context menu this should populate the screen display the list of Open PO’s with DocEntry / Open QTY along with delivery date.
    This displays the details but there could be Committed Value that would need to be considered say for example…
    In Stock is – 100
    Committed is – 200
    Ordered is - 300
    Actual is - 200
    So Committed value has consumed the 100 Qty’s from In Stock and 100 QTY’s from Ordered. Say we have 3 Purchase / Production order each of QTY 100, so one needs to inform user that he can only use 2 purchase orders while committing the customers. For this we have one more column to the list that will show the QTY committed against the sales order if the committed value is greater than In Stock Value.
    Doc Entry     |       Delivery Date  |   Open QTY      |      Committed
    1001             |          01/10/2007     |        100        |             100
    1002              |         01/15/2007     |        100        |             000
    1003               |        01/20/2007     |        100        |             000
    Is this something similar to what you are looking for if yes then contact us off the forum for detailed specification of the product and pricing.
    If not, we would appreciate your points to enhance this add-on further as we are planning to further extend it. We had done similar small product on the item Master data screen that displayed the details for the committed column. What we had done was, we placed a button on the screen and on clicking the button it would display the list of sales orders (Order Number / Customer/ Delivary date / Whse / QTY / Price) that had this item ordered from the selected warehouse (row in the Grid).
    Cheers,
    Nits
    Manager - SAP Business One
    G r e y t r i x
    It's time to think outside the box.
    Migration, Integration, Customization and Modification Solutions
    E-mail: [[email protected]|[email protected]]  
    Web: [www.greytrix.com|www.greytrix.com]

  • Available stock report with confirm order quantity

    Dear,
    Is there any report which gives -
    Available Stock - Sales order confirmed = Free stock.
    Regards,
    Syed Hussain.

    Hi,
    Yes, you have to develop a mass-MD04 like transaction. But please consider that several factors influence the available qty (planning startegy, procurement proposals, etc).
    The available changes with time as well - I mean you may get different available stock levels if you check MD04 for this day and for next Wednesday because there might be e.g. requirements between the two.
    remark:
    Stock - SO quantity = Available qty > As I mentioned this may be not true since this rule doesn't consider the whole planning situation.
    Regards,
    Csaba

  • WM - TR & Open quantity reduced by available stock

    Dear All,
    The problem is:
    PrdOrds were released, TRs were generated and partially delivered (processed). After that inventory (stock counting) took place.
    Having finished the inventory we wanted to process the partially delivered TRs (LB10 > 'TO in foregr.') but SAP set the 'selected qty' in LT04 to 0 and gave the message: "Open quantity reduced by available stock" .
    We use dynamic bins, and all TOs have been confirmed. I've checked (in LT22) and I've found that the necessary quantities haven't been fully supplied for the dynamic bins of PrdOrds.
    Why SAP considers the quantities fully supplied? What is the reason? (During the inventory no differences were booked for the related materials) Shouldn't we create inventory doc. for dynamic bins?
    Thanks,
    Csaba

    Hi Jürgen,
    Thanks for your reply.
    This is the short history of this issue:
    1.
    total TR quantity was 30 pcs (originally)
    2.
    partially delivery, TO qty 16 pcs (TR reference)
    3.
    inventory - no inventory difference for that dynamic bin, qty was 16 pcs both before & after inventory
    4.
    problem detected - /WH couldn't process the TR as I said that's why they manually created a TO to post the goods to the dynamic bin/
    5.
    partial delivery, TO qty 14 pcs (w/o TR reference)
    (after point '4' we tried to process the TR in foreground as I said > problem discussed above. After that I processed it in background > result: TR quantity 30, open qty in TR 0, number of TO items 1 - no TO was generated)
    Thanks,
    Csaba

  • Stock to be moved to Available stock

    Hi Experts,
    New to WM.... Please help.
    During GR process user has done wrong postings and due to that stock lies as below
    982 post Change Area          stock for Put Away (0 pcs)             Pick Qty (50 pcs)
    Bin 01-06                               stock for Put Away (50 pcs)            Pick Qty (0 pcs)
    Total                    Available stock (0 pcs)         putaway (50 pcs)                           pick Quantity (50 pcs)
    Now please tell me what movement will bring the stock to Available Stock.
    Also note: All the TOs wrt this materials are confirmed. So I'm not finding any way
    Thanks in Advance
    Regards,
    Rajoo

    Thanks Sridhar,
    I've used the following transactions...
    Normal Process
    GR                MIGO
    Quality Inspection          QA32
    Post Change               LU04
    TO create & confirm          LT06 & LT12
    By mistake user has posted it wrong order
    GR                MIGO
    Quality Inspection          QA32
    TO create & confirm          LT06 & LT12
    Post Change               LU04
    Request for your guidance

  • Sales Block for order whose quantity exceeds % of available stock on hand

    Hello gurus,
    I am wondering if there is standard SAP functionality that could enable the following scenario:
    For a material in material group XYZ, if a sales order is entered that exceeds 50% of stock on hand, a delivery block is placed on the order.  If a sales order is entered that is under 50% of stock on hand, no delivery block is placed on the order.
    The number 50% is arbitrary and would be specified based on the material group.  As well, this can be based on the material.  I'm hoping there is configuration out there that would block the delivery creation if an item on the sales order exceeded a pre-defined % of available, unrestricted stock in the plant.  Any help would be greatly appreciated!

    Hi Andy,
    Let me summarise ur question - You have Material - A, B & C all of them belonging to a particular Mat. Group lets say - 444. Lets think if the stock of all the Materials - A, B & C is 100 CS's.
    When a Sales order is created for Material - A for Quantity of 60 CS - You want a Delivery block.
    If my understanding is yes, I think the requirement is too complex, but achiviable.
    Because -
    - If this can be achived its possible with only User exits, but the requirment is linked with Availability,
    - If we want to implement this in the Save user exit, the code has to go check the stock in availability and if the conditions are met needs to block the delivery,
    - you need to consider the stock situations as the re-scheduling will also be happening in the background,
    - Wht would happen if there are more than 1 material entered and both are different Material grounps. [Need to consider this scenario as well]
    Instead of Delivery block - You can implement the changes to Reject the line if the % crosses. That is reason for rejection. As this is more specific to line item.
    Create a Z* table and update it with the Material groups that you are planning to use. And give the %.
    Implement the code changes in the Save user exit in MV45AFZZ to check this table for each material group and validate it and then compare the Ordered Quantity with the available stock of that material. Not sure though from where you want to get the stock figures.
    I tried, but this might be a start. All the best.
    Thank you,
    Chaitu...

  • MRP - MD04 and special stocks - how to manipulate exclusion in Avail.Stock

    Hello,
    I have the following question about the Avalable stock which appears in the MD04 trx. for a material in a Plant.
    This Stock Available normally includes stock "Unrestricted Use" and one can customize the inclusion of Blocked Stock, Restricted use Stock, and "Stock in transfer" in this Stock Available.
    My question is related to the other types of stock which appear in the MD04 as included in the Available Stock (Quality control, returns, Consignment, Valuated Stock at Vendor,etc.)
    Where can I manipulate theis inclusion or exclusion of these types of stock in the "Stock Available" in the MD04? Is this Config or do I have to activate a user exit?
    The stock Type "Material Packing - Lending" also can be excluded from the Available Stock in the MD04?
    Thanks for any reply,
    Aart

    Thanks for the replies,
    Maybe I did not state my question well:
    My Client uses "Stock in Consignment" and "Stock of Packaging in Lending"  (both in Unrestricted use) in a Plant.
    He does not want these stock types to play a part in MRP as available stock. In the MD04 trx. SAP estandard seems to include always in its Availbale stock these kinfd of stocks. Is there a way I can exclude them?
    Thanks for any replies,
    Aart

  • Available Stock - MD04 - Movement  Types

    Hi All,
    I find it difficult how system calculates the stock quantity in MD04 transaction.
    Can this Available stock quantity be interpreted in terms of movement types ?
    for example like a difference between receipts and issues in MB51
    (Movement type 101 + Movement type 102)  - (Movement 601 + Movement type 602)
    Please advise.
    Meghna

    Dear,
    I have not understood your question, As I understood my answer is as below
    the stock what you have is the stock available as on that date in the plant(what you see in MMBE, unless otherwise any of the storage loc is not covered under MRP)
    To see exactly how this figure is achieved, got MMBE and place the curser on the plant stock and follow the menu path
    environment -->material movements....
    you will get all the movement type which contributed for this stock.

  • Donot run mrp for available stock in md01 ?

    hi frenz,,,
    i ve got one requirement,,,
    while running mrp theo transaction md01 ,the mrp plan must not consider the stock availability,,
    for e.g.,
    if stock available = 10.
    if requirement = 20.
    if user run mrp ,,it must plan for 20 only excluding the available stock ,,,
    how to use the badi ,,,
    MD_CHANGE_MRP_DATA and method CHANGE_MDPSX_MARD,,
    Thanks in advance,

    Hello,
    The scope of planning is used to control whether the total planning run is executed on a multi-plant level
    several plants
    one MRP area
    several MRP areas
    a combination of plants and MRP areas.
    Here the planning will cover all the material which is relevant for planning in all the above given areas.
    You can carry out the total planning run for the scope of planning online or in background mode. The planning run, however, must always be started with parallel processing.
    Hope it helps. Please revert back.
    Alok Tiwari

  • FM to check available stock

    Hi experts,
    You Know some FM that checks the available stock of some material in somer Storage Location ?
    Thanks in advance.
    Alexandre Nogueira

    Have you checked into this BAPI yet?
    report zrich_0003.
    data:  iwmdvsx type table of bapiwmdvs with header line,
           iwmdvex type table of bapiwmdve with header line.
    parameters: p_matnr type mara-matnr,
                p_werks type marc-werks,
                p_meins type mara-meins.
    call function 'BAPI_MATERIAL_AVAILABILITY'
      exporting
        plant            = p_werks
        material         = p_matnr
        unit             = p_meins
    *   CHECK_RULE       =
    *   STGE_LOC         =
    *   BATCH            =
    *   CUSTOMER         =
    *   DOC_NUMBER       =
    *   ITM_NUMBER       =
    *   WBS_ELEM         =
    *   STOCK_IND        =
    * IMPORTING
    *   ENDLEADTME       =
    *   AV_QTY_PLT       =
    *   DIALOGFLAG       =
    *   RETURN           =
      tables
        wmdvsx           = iwmdvsx
        wmdvex           = iwmdvex.
    check sy-subrc = 0.
    Oops, looks like I'm a tad late.    Oh well.
    Regards,
    RIch Heilman

  • Available stock shortfall of & in Interim storage bin message in BAPI_GOODSMVT_CREATE

    Hello Abapers,
    I have created a Zprogram and used a standard function module BAPI_GOODSMVT_CREATE.
    while processing this FM, Iam getting error messages in return table as "Available stock shortfall of & in Interim storage bin".
    Please help or suggest.
    Regards
    Pradeep

    Searching on the forum you can find threads about WM/PP interface settings.
    (Re: WM Staging - Supply area to Production prder)
    Whether WM/PP interface is active it depends on your config and master data as well.
    You should check:
    - config: SPRO > LE > WM > Interfaces > Define Production
    - master data: routing (proper work center is assigned), work center (proper production supply area), material master(FG) (production scheduling profile), control cycle (components)
    In standard system storage type 100 is defined as an interim storage type (you can compare it to storage type 902, 914, 916, etc). In control cycles (WM master data; LPK1/LPK2/LPK3) you define for each components which is the production storage type.
    In standard system storage type 914 is not used with material staging. 914 s.t. related scenario: GI (261) --> stock removel from normal storage type to interim storage type (914).
    100 s.t. related scenario: stock removal from normal s.t. to interim s.t. 100 --> GI (261).

  • Available stock in interim storage bin

    Dear all
    I Create GR Returns 161 with MIGO, I have message error
    "50012541 ; available stock in interim storage bin around  1,000.000 KG below target
    Message no. L9040
    Diagnosis
    In Customizing, the setting is such that no negative stock is allowed in storage type 916.  However, this posting will cause negative stock to exist in storage bin 0000000000 of storage type 916. "
    Can anyone help me ?
    thanks
    imron

    Dear
    I created cutomazing in Spro>Logistic Execution>Warehouse management>Activities>Transfer>Define Movement types :
    - Movement Type  = 161  (Returns PO)
    - Dest                  = 916
    - Shipment Type   =  A (Stck removal)
    - Requirement type =    B Purchase Order
    - manual TO creation not allowed
    - manual TR creation not allowed
    And then I created TO with LT01 using move type 161 and requirement type = B
    Now stock in Storage Type 916 was there with qty 1000
    But When try again to Create GR (MIGO-161- PO return)
    the error still  "50012541 ; available stock in interim storage bin around 1,000.000 KG below target
    Message no. L9040
    Diagnosis
    In Customizing, the setting is such that no negative stock is allowed in storage type 916. However, this posting will cause negative stock to exist in storage bin 0000000000 of storage type 916. "
    Can u help me, please
    thanks

  • Rationing available stock at the DC across multiple orders by priority

    Hi experts,
    We have a business requirement to ration available stock held at the DC across multiple orders in the situation of a shortage.
    The requirement is to do this rationing is based on the document type of the originating STO and Ordering Site classification, so that the most significant order type and most significant store gets the available inventory first.
    We have 5 primary store STO document types and we wish to classify them from 1 to 5, 1 being the most imporant.
    We also have circa 300 stores and likewise wish to classify them 1 - c.300, 1 being the most important.
    Using this classification data we want to generate Outbound Deliveries from the STOs.
    A simple example:
    We have a Qty of 20 pieces of Article 1 in the DC available:
    The following STOs have been generated:
    Doc. Type 1 - Store 1 -  Article: 1 Qty: 10
    Doc. Type 1 - Store 2 -  Article: 1 Qty: 5
    Doc. Type 2 - Store 1 -  Article: 1 Qty: 10
    Doc. Type 2 - Store 2 -  Article: 1 Qty: 15
    We would expect the following Outbound Deliveries to be generated:
    OBD 1 - Store 1 - Article: 1 Qty: 10
    OBD 2 - Store 2 - Article: 1 Qty: 5
    OBD 3 - Store 1 - Article: 1 Qty: 5
    We need this processing to take place in the shortest possible time, as we have strict timings around orders being available in the DC WMS for picking due to a short lead time.  We therefore want to maximise parallel processing, rather than just sequencing the running of VL10B to be one order type and one store at a time.
    Any ideas on how best to achieve this requirement and how you would approach it?
    Has anyone done similar types of rationing before?
    Many thanks in advance!
    David

    Hi James,
    Thanks for the information, we are using IS Retail 4.7. 
    The complexity we face is that we need to create outbound deliveries off a collective STO generated via Merchandise Distribution with SLS.  So this STO is effectively one site along the chain from the originating store.
    We're trying to ration the stock at the source DC across the collective STOs by Document Type and Originating store.
    So that the most important Order (IE promotion etc) and the most important / profitable store get the stock.
    For example, we wouldn't want our "New Store STOs" (of which the store may not have even opened yet)  and not be able to give any stock to our biggest store who's get a promotion this weekend.
    I know the simple answer is don't run out of stock, but we try to run a tight ship on quite a few articles, so we need to ensure we give it to the right store and for the right reason.
    Hope that helps explain the scenario in more detail.
    Many thanks,
    Dave

  • Overview of available stock in a certain period

    Hi all
    My customer wants, at the creation of a sale order and also in the article inventory stock, to have direct information in the really available stock at that moment, but also of the stock level in the future.
    Motivation: at creation of a sale order, but also in telephone contact with the customer, the question is often: ‘Can you provide rapidly and when?
    By examination in all purchase, sale and production orders, linked with the desired deliver date that is possible.
    Example / Case:
    Article, tab; Inventory Stock:
    In Stock;     Committed;     Ordered;     Available;
    100          80          120          140
    If a customer asks for 50, can this be delivered next week?
    The answer is Y. (by the SAP BO program)
    In reality: that depends on the ordered and committed quantity details.
    Should the 80 be delivered today of next month. And is this a single order or are these different orders with different delivery dates?
    The ordered 120 could be ready delivered from production today or next month. Or is it a purchase order that will arrive within the next week?
    SAP BO does not give a direct answer, you have to find these answers by opening a few programs or use the drag & relate.
    But there is no simple overview to give insight information in the stock availability by date.
    Has anyone encountered this problem and found or created a solution?
    Thanks in advance.

    What you are talking about is 'Available to Promise' and Unfortunately Out of the Box this functionality does not exists.
    The options you have available to handle this scenario would depend on where the Delivery Date on the Sales Order and Purchase Order is to picked.  In your scenario do you have different delivery dates at the Sales Order row level or Purchase Order row level.
    Please let me know if you just have one Document level delivery date or Row level delivery date and I would guide on How to go about creating a Query to get there.
    Regards
    Suda

  • Checking Stock (Available Stock)

    Hi,
    I have a requiremnt to develop a report to show Available Stock of the material.
    While displaying the stock it should check the quantity of the open orders and duduct that from the stock.
    i.e Available Stock = stock - quantity of open orders
    As I know we can see all open orders using transaction VA05
    or we can find all open orders in VBUK/VBUP with status = A
    from where we can calculate the quatity of open orders.
    but I have gone through one program in which the developer used table VBBE and field OMENG for quantity of open orders,
    here I have noticed that I have taken some orders where we get using transaction VA05 but those orders not exist in table VBBE so I am bit confused in this, please let me know if any one have clear idea on this...
    Thanks in Advance
    Venkatesh

    Hi
    Try Tcode CO09 to view the ATP quantities. The ATP quantities are the Available To Promise - which are not assigned to any sales orders or customers and are free for sale.
    Thanks,
    Ravi

Maybe you are looking for