Stock on hand info

Hi All,
this query would be used to have info about stock on hand qty of batch item. I am not so sure about it, could you please make sure if it is wrong or not ?
The query:
SELECT T0.[ItemCode], T0.[ItemName], T0.[ItmsGrpCod], T2.[WhsCode], T1.[BatchNum], T1.[SuppSerial], T1.[IntrSerial],
T1.[PrdDate], T1.[InDate], T0.[OnHand],  T1.[BaseNum], T1.[BaseType] FROM OITM T0  INNER JOIN OIBT T1 ON T0.ItemCode =
T1.ItemCode INNER JOIN OWHS T2 ON T1.WhsCode = T2.WhsCode WHERE T1.[InDate]  between '01/01/2006' and '01/31/2007' and 
T0.[ManBtchNum]  = 'y' and  T0.[OnHand]  <> '0'
Thanks a lot.
Rajh

The query you've given is similar with the query in a certain SAP note I could not remember its no. It is just showing the info of current situation.
I just want to have the qty stock in hand of batch item until last december 2007. The fiscal year is started from january 2006, that's why I use indate field in the condition part.
If I use this query :
select distinct t0.itemcode, sum(isnull(t1. onhand,0)) in_stock, sum(isnull(t0.quantity,0)) on_batch,
sum(isnull(t1.IsCommited,0)) allocated, T0.[BatchNum], T2.[WhsCode], t0.[InDate] FROM
              OIBT T0 INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode
                 INNER JOIN OITW T2 ON T1.ItemCode = T2.ItemCode AND T0.WHSCODE = T2.WHSCODE
              where t1.manbtchnum = 'Y' AND t0.indate between '01/01/2006'
and '12/31/2007'
              group by t0.itemcode, T0.[BatchNum], T2.[WhsCode], t0.[InDate]
              having sum(isnull(t0.quantity,0)) <> 0 and t0.indate between '01/01/2006'
and '12/31/2007' and (sum(isnull(t1.onhand,0)) <> 0 or sum(isnull(t2.IsCommited,0)) <> 0)
the result is similar, still current qty stock on hand info of batched item.
I need to have the info because I want to create new database based on the last database. I mean I need backdated data. I will begin opening balance to the new database.
Tks.
Rajh

Similar Messages

  • Stock on hand at a point in time

    Hi Experts
    I am busy doing an inventory report in Crystal. I need to pull the stock on hand for all the items for each month (past 4 years, +-2500 items)
    At the moment, i am taking inqty - outqty where date <= (beginning of each month)
    My report is taking forever to process the info.
    Is there any other way I can get the stock on hand at previous points in time? Or any tricks to help SQL process the data quicker?

    Hi Bradely,
    I've a query pulling opening stock in qty from the system.
    Through unions on all the transaction tables i'm pulling the data warehousewise.
    It hardly takes any time.
    I'm trying to print stock value too. Which I'm unable to figure out.
    If you want I'll pass that query.
    Any idea about how to figure out stock value ?
    Thanks
    Malhaar

  • MTO Strategy consider the stock in hand

    Dear Experts,
    AM new in MRP Field, pls advise me about pure MTO Strategy which consider stock in hand. MRP run should consider the available stock for net requirement calculation. I tried with strategy 20,but it is not consider the stock.Pls advise,
    Regards,
    Vijesh

    Vijesh,
    MTO by definition will only consider Sales order stock.  This is the main planning difference between MTO and MTS.  Thus, if you have generic stock on hand (not sales order specific) it is supposed to be  excluded from MRP planning.
    If you wish for MTO planning to consider generic stock, you have to first convert the stock to Sales Order specific stock (Special stock type 'E') using a Material Movement transaction.  Or, you can stop using MTO and use an MTS strategy, such as 40.
    For more info about MTO planning see http://help.sap.com/erp2005_ehp_06/helpdata/EN/f4/7d2ed844af11d182b40000e829fbfe/frameset.htm
    Best Regards,
    DB49

  • How to calculate stock on hand initial based on VALUATED not Category group

    Dear Expert,
    Now, i want run SNP with initial stock on hand calculated by stock on hand based on VALUATED not category group like CC or CI. Because in ECC we used a lot of valuation types for materials.
    please show us.
    thanks so much
    hungth

    Hi,
    1) You need to answer the question whether you really need this 200 quantity in APO or not? Is your requirement only relevant to SNP? Or that even for GATP, PPDS, etc you don't want to get this 200 stock in APO. If you don't want this 200 quantity in APO at all, then what I said  earlier would be applicable. You could try to have enhancement in CIF so that valuation type AKDTCLT1(200 quantity) gets exluded in CIF and doesn't reach APO. I am not really sure how simple or complex this could be, but most likely should be possible.
    2) Once the stock is in APO, are you able to distinguish between the 2 stocks in anyway? As far as I know, it won't be possible to distinguish. You could see the version (batch from R/3), and the stock category. I am not sure if valuation type info would be available in any way in APO, but may be I am wrong. Even if you were somehow linking the stock valuation type to the storage location stock, I think only possibility for your would have been to block storage location specific stock to come to APO in CIF (for ALL storage locations), but the stock at Plant level would still come to APO.
    If somehow you are able to distinguish the stock based on valuation type, then Ada's solution could be used.
    Thanks - Pawan

  • Display stock on hand information on Monday mornings

    Can you think of any way for us to be able to display stock on hand information on Monday mornings?  If the data is loaded from a file that has a Sunday date in the file it will not be displayed in the current week.  Since this would only happen on Monday morning process chain runs, we either need to change the current week start day (it doesn't appear that that is possible based on your screenshot) or force the AvailProv info to load into the Monday time bucket.

    Hi Ram,
    I am working on a similar requirement for a report called Days Inventory on Hand. Can you share some information on this report. I would need to know the different criteria we need to consider while preparing this report. Would appreciate your help in this regard.
    Regards
    Vijay

  • Not getting Stock on hand in May Month,while getting in April(Urgent Please

    Hi,
    In my BW, there are countable records, those have posting date as 31.01.2008. and it has stock of 96.4 kg. Since "Stock On hand" is calculated on fly and it gives snap shot.
    I can see the same value 96.4 kg, for next all days till April 2008.
    But suddenly I see no record in query for month May 2008. Though it should give me the same 96.4 kg value in May month also. As it was doing for last three months.
    Please suggest any solution.
    Thanks and Regards
    Saurabh Tiwari

    Please check the TimesTen message logs (<tt_install_dir>/info/ ttmesg.log and terrors.log) on both nodes for messages relating to 'clock skew'. In order for replication to function the system clocks on all participating nodes must be synchronised to an accuracy of <= 250 ms. If they are not then replication will not operate. The symptoms you describe are typical of unsynchronised system clocks.
    Chris

  • Ageing Report(STOCK IN HAND)

    Dear All,
    Can I have ageing report for stock in hands (Lot based ) in PP/MM
    modules.
    Kindly give your advises .
    Thanks In Advance
    Rakesh Sehgal

    Hi Rakesh,
    pls check below two tcodes
    1. MC46 - Slow Moving Items
    2. MC50 - Dead stock items
    Regards,
    Sankaran

  • Calling MB5B from a program to determine stock on hand as on date

    Dear friends,
    I want to call transaction MB5b from my report passing (matnr, plant and selection date-sy-datum ) values from internal table (11500 records) and fetch the quantity field that gets displayed after executing. How to do that. can anyone write the code for that. Because writing full program for determining stock-on-hand seems meaningless as we can get that value from MB5b. Can we trap that parameter in the standard program RM07mlbd and import that parameter to the program. Any suggestions.
    Please write full code. I guarantee Points would be rewarded if solved.
    Regards.
    D.P.Mallick

    Hi,
    could you please post the code how it was done. I am facing a similar issue.
    Regards
    Mohan

  • Stock on hand problem

    Hi All,
    what are the steps to perform the uploading of actual qty of items in the warehouse every end of months ? we begin to calculate qty of items in the warehouses (disregarding qty in system (SBO)) from date 30 to date 4 of early of next month. We use stock taking template, inventory tracking and stock posting but some items will have negative stock on hand qty, what is the causes ? are the ordered and committed influence this stock ? Thanks in advance.
    Balaj

    The negative stock is because you have not checked in Admin > System Init > Document Settings > Block negative inventory.  Showing negative inventory is not a good business practise as  tangible goods can never be negative.  This On hand quantity is not affected by Ordered or committed.  This is purely what is physically in the warehouse.
    You must first change the setting to Block Negative Inventory.
    Then you must using Stock taking DTW template to import monthly stock balance and reconcile stock using Inventory Quantiy, Inventory tracking,.. option.
    Suda

  • Logic to get stock in hand.

    Hi All!
    What is the logic for the stcok in hand.
    There are several stocks like restricted stock,blocked stock,stock in quality inspection etc..
    How can i get the total in hand
    Regards
    Praneeth

    Hi Praneeth,
    The stock in hand is the quantity in Unrestricted use.
    The quantity in the Quality inspection can be rejected or accepted.
    If the quantity in the Quality inspection is rejected it can be sent to the blocked stock or scrapped.
    If the quantity in the Quality inspection is accepted it comes to the Unrestricted-use stock.
    So, the stock in the Unrestricted use is the stock in hand that can be used for delivey & billing.
    Kind Regards,
    Thangesh

  • Tables used for a Stock-In-Hand Report ?

    Hi,
    I need to generate a stock in hand report. For this report I only need to consider Purchasing Inventory Stock and not the Sales Order Stock. What tables do I have to use?, if possible the query!
    Thanks,
    Kishan

    Hi Kishan,
    Try and use FM 'BAPI_MATERIAL_AVAILABILITY'. I have used this FM in the past for Stock on Hand reports. Only drawback is that it only runs for one material / plant at a time!
    You cold also use FM 'AVAILABILITY_CHECK':
    Structure to hold ATP Controller: Control Parameters
      DATA: BEGIN OF st_atpca.
              INCLUDE STRUCTURE atpca.
      DATA: END OF st_atpca.
    Table to hold ATP: Requirements to be Checked/Considered
      DATA: BEGIN OF tbl_atpcs OCCURS 0.
              INCLUDE STRUCTURE atpcs.
      DATA: END OF tbl_atpcs.
    Table to hold ATP Server: ATP data for display
      DATA: BEGIN OF tbl_atpds OCCURS 0.
              INCLUDE STRUCTURE atpds.
      DATA: END OF tbl_atpds.
    Table to hold ATP Server: Material Table
      DATA: BEGIN OF tbl_atpmat OCCURS 0.
              INCLUDE STRUCTURE atpmat.
      DATA: END OF tbl_atpmat.
    Populate ST_ATPCA
      CLEAR st_atpca.
      st_atpca-anwdg  = '8'.    "Calling App - Explaination
      st_atpca-azerg  = 'T'.    "ATP Display Result
      st_atpca-rdmod  = 'A'.    "Read Mode - Totals
      st_atpca-xenqmd = 'N'.    "Do not read Blocks
    Populate TBL_ATPCS
      CLEAR tbl_atpcs.
      REFRESH tbl_atpcs.
      tbl_atpcs-matnr  = p_matnr.  "Material
      tbl_atpcs-werks  = p_werks.  "Plant
      tbl_atpcs-prreg  = 'A'.      "Checking Rule for Avail Check
      tbl_atpcs-chmod  = 'EXP'.    "ATP: Check mode
      tbl_atpcs-delkz  = 'VC'.     "MRP element indicator
      tbl_atpcs-bdter  = sy-datum. "Requirements date for the component
      tbl_atpcs-xline  = '1'.
      tbl_atpcs-trtyp  = 'A'.      "Transaction type - Display
      tbl_atpcs-idxatp = '1'.
      tbl_atpcs-resmd  = 'X'.      "Mode for Results of Check - Proposal
      tbl_atpcs-chkflg = 'X'.
      APPEND tbl_atpcs.
      CALL FUNCTION 'AVAILABILITY_CHECK'
           TABLES
                p_atpcsx  = tbl_atpcs
                p_atpdsx  = tbl_atpds
                p_atpmatx = tbl_atpmat
           CHANGING
                p_atpca   = st_atpca
           EXCEPTIONS
                error     = 1
                OTHERS    = 2.
    Would recommend giving both these FM's a go and see if they have what you want.
    Cheers,
    Pat.
    PS. If you find these suggestions helpful, kindly award Reward Points appropriately.

  • STOCK IN HAND

    CAN ANYBODY EXPLANIN ME HOW STOCK IN HAND IS CALCULATED? AND IN WHICH TABLE-FIELD STOCK IN HAND IS STORED.i.e. name of table for stock in hand?
    pls provide me some input.
    regards
    simran

    Its not very clear - can you please explain with examples.

  • Stock in hand against po no.

    hi all,
    i want to develope a report in which stock in hand(from mb52 tcode) will be displayed against p.o no.format like this
    plant          material             batch          stock in hand           po/sto no.
    my client wants the report in which stock that is placed in storage will be displayed by po sto no.
    currently we are using two step sto procedure by usung 351 and 101 movement type.
    pls help
    regards
    sumit bisla

    Make them understand that this not a logical requirement as you can't establish a link of PO/STO for stock in hand.
    Let me tell you why it is so..if suppose you have received goods against 2-3 PO/STO & Now you are issuing goods (stock transfers/Billing/Transfer posting/Goods Issue etc), at that time system does not consider the corrosponding STO/PO against which goods are received.
    Inventory of material will decrease based on batch/valuation type which you have selected.
    Refer Tcode ME80FN click on Change Veiw & select Purchase Order History with this you can get STO/PO-GRN Qty & Value details.
    Last button on Application tool Bar it is in line of filter, total etc icons

  • MM Report on Stock on Hand.

    I am looking for a report reflecting the u201CTop 500 materials in a descending stock-on-hand value sequenceu201D as on a specific date. (it should reflect the mat number; description; unit of issue; unit price; SOH value per mat and cumulative value.)
    How can I ge this in Invemtory Management.

    Dear All,
    My query regarding stock on hand (MB5B )
    1)When mb5b is used I am unable to take stock in a particular storage location.How to acheive this
    2)In MB5B all the materials in the plant are being displayed which should not be and only material which are involved in stock trasactions (ie, opening stock,issues, closing stock etc)
    Hope I am clear.
    How to over come the above problems.
    Pls provide your valuable inputs.
    Regards,

  • 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...

Maybe you are looking for