Re:Query for items having Stock for a particular warehouse ..!!!

Dear SAP Members,
I need a query to display a list of items having stock by considering all the marketing documents,goods receipt,BOM,Production Order,etc.
I have written query like this:
SELECT T0.[ItemCode], T0.[ItemName], T1.[ItmsGrpNam],T0.[OnHand],
T0.[IsCommited], T0.[OnOrder] FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
WHERE T1.[ItmsGrpNam] ='[%0]' or  T0.[DfltWH] ='[%1]'
The issue is
The InStock shows the total by calculating all warehouses stock but i need the total for the default warehouse.
Plz suggest or modify my query if i have missed out any fields.
With Regards,
Revathy

Hi Revathy,
Try this
SELECT T0.[ItemCode], T0.[ItemName], T1.[ItmsGrpNam],T2.[OnHand],
T0.[IsCommited], T0.[OnOrder] FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
inner join OITW T2 on T2.ItemCode =T0.ItemCode 
WHERE T1.[ItmsGrpNam] ='[%0]' and T0.[DfltWH] = T2.WhsCode
Or
SELECT T0.[ItemCode], T0.[ItemName], T1.[ItmsGrpNam],T2.[OnHand],
T0.[IsCommited], T0.[OnOrder] FROM OITM T0  INNER JOIN OITB T1 ON T0.ItmsGrpCod = T1.ItmsGrpCod
inner join OITW T2 on T2.ItemCode =T0.ItemCode 
WHERE T1.[ItmsGrpNam] ='[%0]' and T2.WhsCode ='[%1]'
Regards,
Bala

Similar Messages

  • HT201401 while syncing - been stuck on step 5 of 5 'waiting for items to copy' for an hour - help?

    while syncing - have been stuck on step 5 of 5 'waiting for items to copy' for an hour...........i'm suspecting there is a problem
    last night i attempted to upgrade to the most recent IOS - after that was done, i attempted to sync my phone
    got a message that said that 'Itunes has detected a Iphone in recovery mode. You must restore this Iphone before it can be used with Itunes'
    I was unfamiliar with 'restoring' so i just unplugged my phone - which was then stuck....
    i went to my local Apple store this a.m. and was told to go home and restore my phone - which i did and then it asked if i wanted to restore it again with my backed-up info - which i am currently attempting to do (see first line for current problem)
    p.s.  i started this process as 12:30 p.m.........................

    There is no fix. There are a variety of partial fixes that sometimes work for some people, but there's nothing that has consistently solved the issue. Just do a google search, you'll see thousands of forum posts about it.
    It's a bug in iTunes, and we're all hosed until Apple fixes it. Which they have shown zero desire to do (I've reported the bug to them through multiple channels multiple times, and they simply do not care).

  • Error message in PR for material having stock above reorder point

    Hi Experts,
                      We want the error message while creating Purchase Requisition (ME51N) for a material which is having stock (MMBE)  above Reorder point ( MRP1 View of material master-MM03) .Is there any user exit available for this requirement.
        MAXIMUM STOCK LEVEL
         With reference to this thread i checked the user exit   MEREQ001 . But this exit will contain include ZXM02U01 Which is showing error message - program names ZX..are reserved for includes of exit function groups .I want to open this include if i want to write the code for the above req.
    Regards,
    RAHUL S

    Hi Rahul,
    you can ignore the message "program names ZX..are reserved ..." - because you are in such a reserved function module. Just create the include, active your coding and activate the exit (transaction CMOD) -> then you have an active implementation of an user-exit.
    BR,
    Christian

  • Tables/FM for opening/closing stock for material on given posting date

    Hi All,
    I had requirement of find the opening/closing stock for material on given posting date. The values we can find out using TCode - MB5B.
    But I cannt use MB5B to extract data because I need to find detials for thousands of material.
    Can you please adivce if their is any FM or tables through which i can find this detial on any given date apart from current date.
    Thanks & Regards,

    Hi,
    [https://forums.sdn.sap.com/click.jspa?searchID=19631709&messageID=6593903]
    [https://forums.sdn.sap.com/click.jspa?searchID=19631709&messageID=6630975]

  • Table for field unrestricted stock for a material

    Hi,
    Which table holds the value of unrestricted stock for a material?
    Thanks in advance.
    Phani.

    Hi,
    Thanks for your replies...
    Does the fields suggested by you store the values of warehouse stock?
    Regards,
    Phani.

  • Need customised report for list of stock for  partially processed materials.

    Hi ,
    The requirement with process im explaining plz share  the report.
    This customised report related to partiallly processed materials:
    Suppose , after recieving material  from vendor as raw material they will transfer the mat to vendor for processing agsinst 57f4 challan, after completing the process, they will recieve this material , this process will continues to till becoming finished product, once after the finished product come, they will transfer to finished storage location, from there it will be issued to production.
    How to make the report, plz suggest me:
    The report format is :
    S.no    material      description     pending stock       challan pending stock       actual stock
    Pending stock: material to be issued to vendor for proceessing
    Challan pending stock: to be recieved from vendor after processing.
    Actual stock: pending stock+challan pending stock.

    You need these three informations
    Pending stock: material to be issued to vendor for proceessing
            You have to find all Subcon. POs from Table EKKO,EKPO. Po number need to be passed to EKET Table and need to fetch "Reservation Number". Take this number and goto RESB table to get all components. You can find issue documents from MSEG table by passing 541 and PO Number. You need not consider all 541 documents which have been converted to Challan as it will be already considered with point no. 2
       2. Challan pending stock: to be recieved from vendor after processing.
            From Table J_1IEXCDTL by selecting 57F4 take all the stock from all the Challans which are having "status" P -Inprocess. (Reconciliation and completion not done.)
       3. Actual stock: pending stock+challan pending stock.
            This is just calculation.
    I think there are many validations and considerations to be made. I think you can build from here.
    Regards
    Binoy

  • IOS for 2801 having support for MPLS

    Assalam o Alaikum,
    Is there any IOS for 2801 router which has the support for MPLS?

    Alaikum Al Salam,
    Please use Cisco Feature Navigator to find information about Cisco IOS software images and the supported features for your platform(s) :
    http://tools.cisco.com/ITDIT/CFN/jsp/index.jsp
    Search by feature and choose MPLS, and then choose Cisco 2801 as the platform, you'll get a list of the IOSs that support MPLS on your platform, and please always check the required DRAM and Flash.
    BR,
    Mohammed Mahmoud.

  • FG stock on a particular date for a specific customer

    Hi all,
    I need to develop one report in which i need FG stock for a particular customer on a particular date. For ex on 5/11/11 what was the FG stock against xyz customer.
    Is there any logic available for this requirement. can you please tell me which tables i should look for?
    Thanks

    FG stock for a particular customer on a particular date.
    Is it Make to Order stock? If it is not, then you may not find the details. If it is MTO, then use t.code MB5B. Using this, you can find stock on particular date.
    Regards,

  • Sync hanging on "waiting for items to copy" iPad Air 2

    Hi, have new iPad Air 2 (lucky me) am trying to sync photos in iTunes from iMac and it has stuck on "waiting for items to copy for over 2 hours after it uploaded them. What do I do now? Stop / eject / wait / cry ?  Please help if you can. Thank you very much.

    Hi maasailand giraffe,
    Welcome to the Support Communities!
    First of all, thanks for the detailed notes of the troubleshooting steps you've already tried.  It's hard to pinpoint exactly what is going on in your specific case, but I do have a few more ideas for you to try.
    Starting with just one of your iPads, when you get stuck on the "waiting for items to copy" step, just disconnect your iPhone.  There are probably some orphaned or corrupt files that need to be addressed.  I would suggest closing all of your open apps and then backing your iPad up to iCloud.  Then review the articles below to move or delete any big files on your device.  These can include Voice Memos (iPhone), music, photos on your camera roll, photos or videos that are attached to your Messages, email attachments, etc.
    iPhone, iPad, and iPod: Understanding capacity
    http://support.apple.com/kb/HT1867
    iOS: "Not enough free space" alert when trying to sync
    http://support.apple.com/kb/TS1503?viewlocale=en_US
    iOS: Import personal photos and videos from iOS devices to your computer
    http://support.apple.com/kb/ht4083
    How to delete content you've downloaded from the iTunes Store, App Store, iBooks Store, or Mac App Store
    http://support.apple.com/kb/HT5772
    Remember that you can download any content you have purchased directly to your iPad.
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/HT2519
    If you need to sync from iTunes, check your settings in the Summary tab to be sure you are only syncing items you have placed a checkmark in front of.
    iOS: Syncing with iTunes
    http://support.apple.com/kb/HT1386
    Give this a try on one of your iPads, and hopefully these steps will work for your other devices as well.
    Cheers,
    Judy

  • Stock on a particular day

    Hii this is Srikanth, i am working in a product based company, so i need a report details of  "Stock on a particular day".
    Because, my boss needs, if u give u date he need to get for that day stock for plant wise.
    for this he is going to enter i.e, input fields, material, date, item group and item code.
    He need out put fields like this,  Item code, item description, unit of measure and quantity. Plz give the solution for this.
    Moderator Message: I figure your Boss pays you to get those reports done. Dont expect the forum to get it done for you
    Edited by: kishan P on Oct 9, 2010 3:57 PM

    Hi,
    As ABAP'er you should be knowing the coding.
    You need to kn ow the Tables to find those fileds which need to display in output. First try to get the Table names from your Functionla Consultant.
    Regards,
    Shankar.

  • Logic to build report to get the stock on a particular date

    Dear Guru's,
    We are trying to build a report for getting the stock on a particular date. It is not possible to copy MB5B that option is ruled out. We have also tried to get the data from MBEWH but that is also  not helping as the table is not updated for all the periods.
    Please advice
    Thanks,
    Sam

    Dear Sameer,
    You can copy MB5B report and can modify as per your reuirement.
    If you want get stock a paticular date.It is hard to get, why because you have to fetch all the Material documents
    and you have to use MBEW table to get the current date stock and you have to do add/subtract from calculated stock.
    Due to this there will performance issues also.
    So try to copy MB5B and change as per your requirement.
    regards
    Subhash

  • Query for item warehouses stock in a row

    hi all,
    How to retreive item warehouse stock in a row using query ?
    SELECT T0.ItemCode, T1.ItemName, T2.ItmsGrpNam,
    (Select WhsCode from OITW Where
    WhsCode=T0.WhsCode and ItemCode=T0.ItemCode) as 'Wh',
    (Select OnHand From OITW Where
    Whscode = T0.WhsCode and Itemcode=T0.ItemCode) as 'Whstck'
    FROM OITW T0  INNER JOIN OITM T1 ON T0.ItemCode = T1.ItemCode INNER JOIN OITB T2 ON T1.ItmsGrpCod = T2.ItmsGrpCod
    WHERE T0.ItemCode NOT IN 'a-item'AND
    T2.ItmsGrpNam LIKE '%%test%%'
    and T0.Onhand > 0
    ORDER BY T0.ItemCode
    Anyone correct query so that it will retrieve item warehouse stock in a single row.
    Thanks
    Jeyakanthan

    I have tested your query, the result is just like you wish. The code can be simplified to:
    SELECT T0.ItemCode, T1.ItemName, T2.ItmsGrpNam, T0.WhsCode as 'Wh',T0.OnHand as 'Whstck'
    FROM DBO.OITW T0 
    INNER JOIN DBO.OITM T1 ON T0.ItemCode = T1.ItemCode
    INNER JOIN DBO.OITB T2 ON T1.ItmsGrpCod = T2.ItmsGrpCod
    WHERE T0.ItemCode NOT IN ('a-item') AND T2.ItmsGrpNam LIKE '%[%test%]%'
    and T0.Onhand > 0
    ORDER BY T0.ItemCode, T0.WhsCode
    If you want each item has only one row and warehouse on hand column-wised, you have to use as much as SELECT for each column in according to your number of warehouses. It would be look like this one:
    SELECT T0.ItemCode, T0.ItemName, T1.ItmsGrpNam,
    (SELECT OnHand FROM OITW WHERE ItemCode = T0.ItemCode AND WhsCode Like 'Whs1') AS 'Whs1 On Hand' ,
    (SELECT OnHand FROM OITW WHERE ItemCode = T0.ItemCode AND WhsCode Like 'Whs2') AS 'Whs2 On Hand' ,
    (SELECT OnHand FROM OITW WHERE ItemCode = T0.ItemCode AND WhsCode Like 'Whs3') AS 'Whs3 On Hand'
    FROM DBO.OITM T0 
    INNER JOIN DBO.OITB T1 ON T1.ItmsGrpCod = T0.ItmsGrpCod
    WHERE T0.ItemCode NOT IN ('a-item') AND T1.ItmsGrpNam LIKE '%[%test%]%'
    and T0.Onhand > 0
    ORDER BY T0.ItemCode
    Thanks,
    Gordon

  • Split Valuation For Material Having No Open PO & Stock

    Hi Experts,
    Will somebody throw light on split valuation where there is no any open PR, PO & Stock for that material but system does not allow to make material split valuated.
    System shows error meassge giving old PO nos list.
    (Logically all these POS whole business transcations/cycle is  completed )
    I want split valaution to be done to the material whose stock is nil also there is no any open PR,PO for that plant in the system.
    But I dont prefer to delete line items of the old PO for doing the split valuation.
    Please suggest solution
    Thanks in advance.
    Ramesh
    Edited by: RameshChandra  Soni on May 17, 2008 11:46 AM

    Hi,
    You can find severaé threads about this on this forum.
    Some hints:
    1. In MM02 try to set the split valuation > Save > SAP will give error message > Push the appearing 'Display errors' button > SAP will say what hinders you from being able to set the split valuation.
    2. As I remember stock has to be zero in current and previous period. (You can set your stock to zero in the previous period using MB1A201posting date in the past; after having set split valuation you can reset your stock level via MB1A+202).
    3. IMPORTANT: you have to archive all existing batch records.
    4. etc
    BR
    Csaba

  • Q30: Cannot find sales order for a committed stock item

    I have a few item numbers which show committed stock in item master data/stock but I cannot find an open sales order or even with an open line on a closed sales order. I have tried various query reports without success.
    Does anyone have a key to unlock this problem?
    Thanks,
    Robin

    Hi,
    Sorry but I am pretty new to SAP and on a learning curve so no idea what note 999124 is or even where/how I would use it.
    Can you explain further please?
    Robin
    Lakshmipathi     
    Posts: 17,513
    Registered: 8/9/07
    Forum Points: 34,462 
    Solved problem (10)
    Very helpful answer (6)
    Helpful answer (2)
       Re: Q30: Cannot find sales order for a committed stock item  
    Posted: Jan 12, 2011 3:18 PM    in response to: Robin Bellion           Reply 
    Check Note 999124 - Incorrect committed\On order quantity when changing orders
    thanks
    G. Lakshmipathi

  • Calculation for subcontracting item of type N (non stock) as it for type L(Stock)

    Hi Gurus,
    I have a Requirement for calculating the cost for Subcontracting  Non stock items N as it is getting calculated in standard functionality for subcontracting items of Type L.
    This will be done in CK11n ( used to calculate the standard cost estimate of the product) for header as well as component materials.
    please suggest the user exit or Badi where i can change.
    Please refer the below logic-
    BOM for the material 2000500 as Header and 1LPL0835298AB as a component and this component has an assembly with 7008508 as a component and this component is an Sub contracted item and this has an assembly with component 1LBA182151-3.
    Price calculation for the material 7008508 (Item Category as N). Since this is sub contracted item the price will picked from field EINE-NETPR.
    In EINA, pass the material (MATNR=7008508) to fetch the list of info records (INFNR) created for that material.
    Then it has to input those info records to EINE table along with Purchasing organization (EINE-EKORG=PT02).
    From the output of EINE table, it should compare the price (EINE-NETPR) of the PIR and should take the least price from those PIR`s.
    If the currency is other than PLN, then it should be converted to PLN based on conversion charges.
    For Material (MATNR=1LBA182151-3), it should pass the material number to table MBEW along with valuation area (BWKEY = WERKS).
    From the output, it should check the Price control (VPRSV) ‘V’ or ‘S’
    If ‘V’ the price will be picked from the field “VERPR”
    If ‘S’ the price will be picked from the field “STPRS”
    Also from the output, it should check the Price unit (PEINH) ‘1’ or other than ‘1’. If it is other than ‘1’ it should divide the VERPR or STPRS by PEINH. Then this is the price of the Material “1LBA182151-3”.
    The material (MATNR=1LBA182151-3) should be passed to table “MARA” and will take the Base unit of measure from that table “MEINS”.
    Br,
    Surya

    Hi Surya,
    Please put breakpoints in any of the below BADI's and check if any of them will trigger for your
    requirement:
    VALUATION_CK                            BAdI for Valuation in Product Costing
    CK_KALAMATCON2_CI                       BAdI for CI Fields for Table KALAMATCON2
    COSTINGRUN_CK                           Edit Costing Run
    COST_APPORTION_CK                       Maint Apportionment Structure Joint Production: Dist Rules
    CO_PROD_COSTING_CK                      Cost Management for Joint Products (Costing, Target Costs)
    DATA_EXTENSION_CK                       For Data Enrichment in Product Costing
    DYNPRO_EXTENSION_CK                     BAdI for Interface Enhancement in Costing
    ORDER_COSTING_CK                        Enables Header Data Changes in Preliminary Order Costing
    QUANTITY_STRUCT_CK                      Enables Quantity/Structure Changes in Costing
    SUR_STOCK_TRANSF_CK                     Overhead on Materials with Stock Transfer Between Plants
    Thanks
    Sri

Maybe you are looking for

  • Getting empty on file upload

    Hi all, I am using struts1.1 and iam trying to upload the files. when iam trying to get FileItem list using List fileItemsList = fileUpload.parseRequest(request); i am gtting empty list can any body please help me here i am attaching the code in acti

  • Missing words and lines in PDF

    Platform/tools: Windows XP Pro SP 2 or later FrameMaker 7.2 Adobe Acrobat 8 Professional (part of CS3) Adobe PDF print driver setting: High Quality Print, black and white (rather than color) When I create a PDF from FrameMaker, my process is to print

  • Purchase order Automatic creation

    Dear All, I want to configure the Transportation scenario, My requirement is when shipment is created a purchase order should get automaticaly for purchase of services from transporter... Can anyone hap me out with this??/ Regards Rasik Waghela

  • I Phone4S restore error 1611 how to solve

    I Phone4S restore error 1611 how to solve

  • Color changing shades when testing/exporting

    Hello! I'm having an issue where a color is showing up different between being on stage when working on it and when tested/exported. I've attached an image. The left is from when I'm working on it in captivate, and the right image is the tested versi