Query for Inventory Activity for whse & dates

I am using the query below to report Inventory Activity by Whse for a selected date range. Can anyone please advise on how to add a column for Inventory Unit of Measure (OITM.InvntryUom) to this query? This would make the report more useful. Even more useful would be to also integrate batch numbers into this same query. Would this be possible also?
The columns returned by this query currently are: Whse, ItemCode, ItemName, OpeningBalance, InQty, OutQty, and EndingBal.
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @Whse nvarchar(10)
Set @FromDate = (Select min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]')
Set @ToDate = (Select max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]')
Set @Whse = (Select Max(s2.Warehouse) from dbo.OINM S2 Where S2.Warehouse = '[%2]')
Select
@Whse as 'Warehouse',
a.Itemcode,
max(a.Dscription) as [Item Name],
sum(a.[Opening Balance]) as [Opening Balance],
sum(a.[IN]) as [IN],
sum(a.OUT) as OUT,
((sum(a.[Opening Balance]) + sum(a.[IN])) - Sum(a.OUT)) as Closing
from(
Select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
(sum(N1.inqty)-sum(n1.outqty)) as [Opening Balance],
0 as [IN],
0 as OUT
From dbo.OINM N1
Where
N1.DocDate < @FromDate
and N1.Warehouse = @Whse
Group By
N1.Warehouse,N1.ItemCode,N1.Dscription
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
0 as [Opening Balance],
sum(N1.inqty) as [IN],
0 as OUT
From dbo.OINM N1
Where
N1.DocDate >= @FromDate and N1.DocDate <= @ToDate and
N1.Inqty >0
and N1.Warehouse = @Whse
Group By
N1.Warehouse,N1.ItemCode,N1.Dscription
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
0 as [Opening Balance],
0 as [IN],
sum(N1.outqty) as OUT
From dbo.OINM N1
Where
N1.DocDate >= @FromDate and N1.DocDate <=@ToDate and
N1.OutQty > 0
and N1.Warehouse = @Whse
Group By
N1.Warehouse,N1.ItemCode,N1.Dscription) a, dbo.OITM I1
where
a.ItemCode=I1.ItemCode 
Group By
a.Itemcode
Having sum(a.[Opening Balance]) + sum(a.[IN]) + sum(a.OUT) > 0
Order By a.Itemcode

Try this one:
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @Whse nvarchar(10)
Set @FromDate = (Select min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]')
Set @ToDate = (Select max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]')
Set @Whse = (Select Max(s2.Warehouse) from dbo.OINM S2 Where S2.Warehouse = '[%2]')
Select
@Whse as 'Warehouse',
a.Itemcode,
max(a.Dscription) as ItemName,
sum(a.OpeningBalance) as OpeningBalance,
sum(a.INq)  as 'IN',
sum(a.OUT) as OUT,
((sum(a.OpeningBalance) + sum(a.INq)) - Sum(a.OUT)) as Closing
,(Select  i.InvntryUom from OITM i where i.ItemCode=a.Itemcode) as UOM
from(
Select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
(sum(N1.inqty)-sum(n1.outqty)) as OpeningBalance,
0 as INq,
0 as OUT
From dbo.OINM N1
Where
N1.DocDate < @FromDate
and N1.Warehouse = @Whse
Group By
N1.Warehouse,N1.ItemCode,N1.Dscription
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
0 as OpeningBalance,
sum(N1.inqty) ,
0 as OUT
From dbo.OINM N1
Where
N1.DocDate >= @FromDate and N1.DocDate <= @ToDate and
N1.Inqty >0
and N1.Warehouse = @Whse
Group By
N1.Warehouse,N1.ItemCode,N1.Dscription
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,
0 as OpeningBalance,
0 ,
sum(N1.outqty) as OUT
From dbo.OINM N1
Where
N1.DocDate >= @FromDate and N1.DocDate <=@ToDate and
N1.OutQty > 0
and N1.Warehouse = @Whse
Group By
N1.Warehouse,N1.ItemCode,N1.Dscription) a, dbo.OITM I1
where
a.ItemCode=I1.ItemCode
Group By
a.Itemcode
Having sum(a.OpeningBalance) + sum(a.INq) + sum(a.OUT) > 0
Order By a.Itemcode

Similar Messages

  • Table for Inventory Status for Serialized materials

    Hello,
    Can anyone please provide the table name for finding out inventory status (i.e. unrestricted, Quality Inspection, Blocked) for serial numbers. I am trying to find out, in which inventory status does a particular serial# belonging to a particular material# is in?

    Hello Azz:
    Regarding the serial number status, you have to check the combination of three different tables:                                                                               
    EQUI - Equipment master data. In this table make note of the field 'Object number' (OBJNR), which is the primary key for:                                                                               
    JEST - Individual Object Status. This table contains the technical expression of the status in field 'Object status' (STAT), which is the primary key for:                                                                               
    TJ02 - System status. In this table you can find the texts for the system status in the fields TXT04 and TXT30.
    Then, here you have some other tables which you might also need:
    EQBS - Serial Number Stock Segment.
    SER01 - Document Header for Serial Numbers for Delivery.                                                                               
    SER02 - Document Header for Serial Nos for Maint.Contract (SD Order). 
    SER03 - Document Header for Serial Numbers for Goods Movements.                                                                               
    SER04 - Document Header for Serial Numbers for Inspection Lot.                                                                               
    SER05 - Document Header for Serial Numbers for PP Order.                                                                               
    SER06 - Document Header for Serial Numbers for Handling Unit-Content. 
    SER07 - Document Header for Serial Numbers in Physical Inventory.                                                                               
    SER08 - Document Header for Purchase Order Item Serial Numbers. 
    I hope this helps!
    Esther.

  • Inserting Revision for Inventory Items for just one org

    Hi,
    When I inserted inventory items using API , I got a rev 000 by default. I need to add another revision (001) for all items for one of the organizations. Can you please tell me how to insert revision.
    I am using Oracle 11i
    Thanks
    Aali

    Revision is controlled at the org level. So all you need to insert records in the mtl_item_revisions_interface and launch the "Import Items" program.
    See http://techoracleapps.blogspot.com/2010/03/item-revision.html for sample code.
    Hope this helps,
    Sandeep Gandhi

  • Is it possible to query software inventory report for Oracle SQL developer installation?

    Hi all
    My company requires to generate a report of all kinds of Oracle database access tool. I can find Toad installation from Add/Remove Program and therefore can query for Toad.
    However, Oracle SQL developer is using Java. I cannot see an entry for Oracle SQL developer from Add/Remove Program. Is there a way to query inventory for Oracle SQL developer installation?
    Thanks a lot.
    Regards
    Lic

    You might be able to use software inventory to report on the version of sqldeveloper.exe.
    As the app looks like just a zip you extract to a custom location that might be one method.

  • Report for Inventory Status for Serialized Materials

    I am trying to generate a report which would display the material #, all serial #s related to that material and the stock type for each of these serial#s. I currently following this approach, I will fetch all the material number from MARC for a particular plant, then for each MATNR, will check for EQUNR and SERNR in table EQUI. Then for each EQUNR will then check stock type in table EQBS. I believe each EQUNR is associated with one and only one SERNR (AM I CORRECT?). I will then display the MATNR, SERNR and LBBSA on the report. Can somebody tell me if the approach is correct? Just wanted your opinion.
    Also I have another issue. Whenever I try to find the stock type for a particular EQUNR in table EQBS, it gives a message saying that no data exists for this EQUNR in this table. I wanted to know what could be the possible reasons for this. I am currently investigating on the following reasons, 1. I think the material is flagged for deletion so that all the EQUNRs and SERNRs associated with that material will be deleted. However, I don’t know how to see all the material associated with a particular EQUNR? Another reason I think is that that EQUNR, or that SERNR does not have any quantity in SAP so no stock type. I could be wrong, but still searching. Can you think of something which could cause this problem (i.e. the message saying that no data exists for this EQUNR in table EQBS?)
    Thank you for your help.

    Hello Azz,
    Have you tried transaction code IQ09 report? I this this will meet your requirement to some extent.
    Regards
    Arif Mansuri

  • Opening stock for inventory cube for april 2011

    Hi all,
    I have loaded the issues and reciepts (material movements from 2li_03_bx) and it is working fine.
    How to obtain the opening balance for 04.2011
    I can see there is on key figure 0valstkvalue which is non cumulative key figure which stores the last value.
    if use the key figure and use an offset based upon the calendar year month i will obtain the closing balance of 03.2011 which is the opening balance of 04.2011.
    but then last month 03.2011 only contains issues and receipts and it doesnt contain the opening balance
    i will given an example
    opening balance 04.2011 ( to be obtained)   
    issues : 120
    receipts : 130
    closing without opening is 10
    month of 03.2011
    issues : 150
    receipts : 200
    closing is 50 without opening
    if i use the ovalstk value key figure i am getting only 50 as closing balance which is wrong as per the user
    can you pls advise how to get the correct opening balance for 04.2011
    thanks

    Hi murali,
    My earlier month thats is 03.2011
    will contain only
    issues and reciepts isnt it . and it doesnt contain opening balance isnt it???
    so only issues - receipts will give the closing balance 
    for eg 03.2011
    issues = 100
    receipts = 120
    closing balance = 20 but the users data is 40 is the closing balance since opening balance is 20 for 03.2011
    Can you pls let me know how to handle it geting closing balance 20 plus adding the opening balance of 03.2011 too
    which gives 40 as closing balance for 03.2011
    thanks

  • For each activity for sibling Loops

    Hi All,
    I have a below type of xml structrure. I am trying to use XSLT for transforming this format to separate xml which I will to insert data in DB using db adapter
    <Loop-2000A>
    <Element-628>1</Element-628>
    <Element-734 xsi:nil="true"/>
    <Element-735>20</Element-735>
    <Element-736>1</Element-736>
    </Loop-2000A>
    <Loop-2000B>
    <Element-98>PR</Element-98>
    <Element-1065>2</Element-1065>
    <Element-1035>ABC PQR</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    <Loop-2000B>
    <Element-98>PR1</Element-98>
    <Element-1065>22</Element-1065>
    <Element-1035>abcd DDH</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    <Loop-2000B>
    <Element-98>PR2</Element-98>
    <Element-1065>24</Element-1065>
    <Element-1035>pqrDCH</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    <Loop-2000A>
    <Element-628>1</Element-628>
    <Element-734 xsi:nil="true"/>
    <Element-735>20</Element-735>
    <Element-736>1</Element-736>
    </Loop-2000A>
    <Loop-2000B>
    <Element-98>PL</Element-98>
    <Element-1065>12</Element-1065>
    <Element-1035>RAS BKU</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    <Loop-2000B>
    <Element-98>PS2</Element-98>
    <Element-1065>28</Element-1065>
    <Element-1035>pqrDMH</Element-1035>
    <Element-1036 xsi:nil="true"/>
    <Element-1037 xsi:nil="true"/>
    <Element-1038 xsi:nil="true"/>
    <Element-1039 xsi:nil="true"/>
    <Element-66>PI</Element-66>
    <Element-67>953893470</Element-67>
    </Loop-2000B>
    In this case LOOP-2000A reprsents hospitals.while LOOP-2000B represents patients.One hospital can have multiple patients.Though in xml,LOOP-2000B is not child of LOOP-2000A. Actually it is like that:one LOOP-2000A is followed by many LOOP-2000B..that means one hospital has that many patients.Then next loop 2000A is followed by another set of LOOP 2000B which represents next hospital has that many patients.
    I have a requirement where I need to insert records in DB,where each patient will have one record in DB.I am trying to use for-each at loop 2000A and subsequently for-each at LOOP-2000B,but it is not working.It is not iterating on next set of patients.It is always copying the same patient.
    Any pointers in this regard will be helpful.

    The xml was,
    <ns:A xmlns ns="A">
    <ns:a>1</ns:a>
    <ns:a>2</ns:a>
    <ns:a>3</ns:a>
    <ns:A>
    Edited by: Prabu on Aug 30, 2010 12:55 PM
    Edited by: Prabu on Aug 30, 2010 12:55 PM
    Edited by: Prabu on Aug 30, 2010 12:56 PM

  • Inventory Ageing for Batch item

    Hi,
      Please let me know if any one has query for inventory ageing for Batch management item.
    regards
    Suresh S

    Use following query:
    SELECT T0.WhsCode, T0.ItemCode, T0.ItemName, T0.BatchNum, T0.CreateDate,
    DateDiff(dd, T0.CreateDate, GetDate()) As Days, T0.Quantity,
    case when (datediff(dd, createdate, getdate())<=30) then 'Upto 30 Days'
         when (datediff(dd, createdate, getdate())>30 and datediff(dd, createdate, getdate())<=60) then '31 to 60 Days'
         when (datediff(dd, createdate, getdate())>60 and datediff(dd, createdate, getdate())<=90) then '61 to 90 Days'
         else 'More than 90 Days'
         end as days
    FROM OIBT T0
    WHERE T0.Quantity > 0
    ORDER BY T0.WhsCode, T0.ItemCode, T0.CreateDate
    Edited by: Rahul Jain on Jan 30, 2009 10:28 AM

  • CIN activation for comapny code in IDES..?

    Hi all
    Can anybody explain me from basic settings for CIN activation for my own company code which is configured in IDES.
    I have created 1 manufacturing plant & 1 depot plant.
    Please explain me all the configuarion for CIN (Both plants-manufacturing and depot).
    Please forward me documnets , if possible pls suggest all the precaution for this CIN configuration.
    Thanks
    sap-mm

    hi,
    covers all of the tasks associated with Country Version India (CIN), including Customizing, day-to-day operations, and reporting.
    In Customizing and master data, the Excise Manager is authorized to:
    Work with the CIN Implementation Guide (IMG)
    Use the health check tool
    Define number ranges for excise invoices
    Maintain excise master data
    Make retrospective price amendments
    In your day-to-day operations, this role allows you to:
    Capture, change, display, post, and cancel incoming excise invoices
    Capture excise invoices at depots
    Complete subcontracting challans and perform quantity reconciliation
    Post excise invoice journal vouchers
    Track forms
    Activities in Financial Accounting (FI)
    The Excise Manager can:
    Create the excise registers
    Transfer outstanding CENVAT credit on capital goods to the appropriate CENVAT accounts
    So in this way roles are divided for excise clerk, supervisor, manager, tds clerk etc...
    A Country Version is designed specifically to cater the business operations of that country over and above the generic SAP system functionalities. It comprises of functionalities degined for the laws and business practices pertaining to the country.
    Most of the country-specific functions for India relate to Financials and Logistics.
    The main areas are as follows:
    Excise duty and the central value-added tax system (CENVAT)
    Withholding tax (also known as tax deducted at source)
    Sales tax
    Maintenance and printing of statutory excise registers
    The official help documentation for Country Version India:
    http://help.sap.com/saphelp_erp2005/helpdata/en/09/ebf138cdd78a4be10000000a114084/frameset.htm
    For further details refer below links..
    https://wiki.sdn.sap.com/wiki/display/ERPLO/CIN+Configuration
    https://wiki.sdn.sap.com/wiki/display/ERPLO/CINConfiguration%28India%29
    ***CIN CONFUGURATION***
    1.1 Maintain Excise Registration
    SAPSPRO Basic settingIndia  tax on Goods Movements Logistics general Ref. IMG Maintain Excise Registrations
    APPLICABLE
    1.2 Maintain Company Code Settings
    tax on Goods Logistics general  SAP Ref. IMG SPRO Maintain Company Code Basic setting India Movements Settings
    APPLICABLE
    1.3 Maintain Plant Settings
    SAP Ref.SPRO  Basic setting India  tax on Goods Movements Logistics general IMG Maintain Plant Settings
    APPLICABLE
    1.4 Maintain Excise Groups
    SPRO BasicIndia  tax on Goods Movements Logistics general  SAP Ref. IMG  Maintain Excise Groupssetting
    APPLICABLE
    1.5 Maintain Series Groups
    India  tax on Goods Movements Logistics general  SAP Ref. IMG SPRO Maintain Series GroupsBasic setting
    APPLICABLE
    1.6 Maintain Excise Duty Indicators
    tax on Goods Logistics general  SAP Ref. IMG SPRO Maintain Excise Duty Basic setting India Movements Indicators
    APPLICABLE
    1.7 Maintain Sub transaction Type with Text
    India  tax on Goods Movements Logistics general  SAP Ref. IMG SPRO Maintain Sub transaction Type with TextBasic setting
    APPLICABLE
    1.8 Determination of Excise Duty
    tax Logistics general  SAP Ref. IMG SPRO Select Tax Calculation Determination of Excise DutyIndia on Goods Movements Procedure
    APPLICABLE
    1.9 Maintain Excise Defaults
    SAP Ref.SPRO Determination of ExciseIndia  tax on Goods Movements Logistics general IMG Maintain Excise DefaultsDuty
    APPLICABLE
    1.10 Condition-Based Excise Determination
    tax on Goods Logistics general  SAP Ref. IMG SPRO Define Tax Code for Condition-Based Excise DeterminationIndia Movements Purchasing Documents
    APPLICABLE
    1.11 Condition-Based Excise Determination
    tax on Goods Logistics general  SAP Ref. IMG SPRO Assign Tax Code to Condition-Based Excise DeterminationIndia Movements Company Codes
    APPLICABLE
    1.12 Classify Condition Types
    SAPSPRO Condition-BasedIndia  tax on Goods Movements Logistics general Ref. IMG Classify Condition TypesExcise Determination
    APPLICABLE
    1.13 Maintain Chapter IDs
    tax on Goods Logistics general  SAP Ref. IMG SPRO Maintain Chapter ids Master dataIndia Movements
    APPLICABLE
    1.14 Assign Users to Material Master Screen Sequence for Excise Duty
    SPRO  Master dataIndia  tax on Goods Movements Logistics general SAP Ref. IMG Assign Users to Material Master Screen Sequence for Excise Duty
    APPLICABLE
    1.15 Specify Excise Accounts per Excise Transaction
    tax on Goods Logistics general  SAP Ref. IMG SPRO Specify Excise Accounts per Excise Account determinationIndia Movements Transaction
    APPLICABLE
    1.16 Specify G/L Accounts per Excise Transaction
    tax on Goods Logistics general  SAP Ref. IMG SPRO Specify G/L Accounts per Excise Account determinationIndia Movements Transaction
    APPLICABLE
    1.17 Incoming Excise Invoices
    SAPSPRO BusinessIndia  tax on Goods Movements Logistics general Ref. IMG Incoming Excise InvoicesTransactions
    APPLICABLE
    1.18 Define Processing Modes Per Transaction
     Logistics general  SAP Ref. IMG SPRO Define Processing Modes Business TransactionsIndia tax on Goods Movements Per Transaction
    APPLICABLE
    1.19 Define Reference Documents Per Transaction
    tax on Goods Logistics general  SAP Ref. IMG SPRO Define Reference Documents Per Business TransactionsIndia Movements Transaction
    APPLICABLE
    1.20 Maintain Rejection Codes
    SAPSPRO BusinessIndia  tax on Goods Movements Logistics general Ref. IMG Maintain Rejection CodesTransactions
    APPLICABLE
    1.21 Specify Which Movement Types Involve Excise Invoices
    Logistics SAP Ref. IMG SPRO Specify Which Business TransactionsIndia  tax on Goods Movementsgeneral Movement Types Involve Excise Invoices
    APPLICABLE
    1.22 Outgoing Excise Invoices
    tax on Goods Logistics general  SAP Ref. IMG SPRO Assign Outgoing Excise Invoices  Business TransactionsIndia Movements Billing Types to Delivery Types
    APPLICABLE
    1.23 Maintain Default Excise Groups and Series Groups
     Logistics general  SAP Ref. IMG SPRO  Outgoing Excise Invoices  Business TransactionsIndia tax on Goods Movements Maintain Default Excise Groups and Series Groups
    APPLICABLE
    1.24 Subcontracting Attributes
    tax on Logistics general  SAP Ref. IMG SPRO Subcontracting Subcontracting Business TransactionsIndia Goods Movements Attributes
    APPLICABLE
    1.25 Maintain Movement Type Groups
    SPRO BusinessIndia  tax on Goods Movements Logistics general SAP Ref. IMG Subcontracting SubcontractingTransactions Attributes
    APPLICABLE
    1.26 Utilization Determination
    SAPSPRO BusinessIndia  tax on Goods Movements Logistics general Ref. IMG Utilization UtilizationTransactions Determination
    APPLICABLE
    1.27 Specify SAP script Forms
    SPRO BusinessIndia  tax on Goods Movements Logistics general SAP Ref. IMG Specify SAP script Excise RegistersTransactions Forms
    APPLICABLE
    1.28 Number Ranges
     SAP Ref. IMG SPRO Number ToolsIndia  tax on Goods MovementsLogistics general Ranges
    APPLICABLE
    1.29 Message Control
     SAP Ref. IMG SPRO Message ToolsIndia  tax on Goods MovementsLogistics general Control
    APPLICABLE
    J1I2
    Prepare a sales tax register
    J1I3
    Create outgoing excise invoices in batches
    J1I5
    Update the RG 1 and Part I registers
    J1IEX
    Incoming Excise Invoices (central transaction)
    J1IEX_C
    Capture an incoming excise invoice (excise clerk)
    J1IEX_P
    Post an incoming excise invoice (excise supervisor)
    J1IF01
    Create a subcontracting challan
    J1IF11
    Change a subcontracting challan
    J1IF12
    Display a subcontracting challan
    J1IF13
    Complete, reverse, or recredit a subcontracting challan
    J1IFQ
    Reconcile quantities for subcontracting challan
    J1IFR
    List subcontracting challan
    J1IH
    Make a CENVAT adjustment posting
    J1IIN
    Create an outgoing excise invoice
    J1IJ
    Assign excise invoices to a delivery for sales from depots
    J1INJV
    Adjust withholding tax Item
    J1INREP
    Reprint a withholding tax certificate for a vendor
    J1IQ
    Year-End Income Tax Depreciation Report
    J1IR
    Download register data
    J1IS
    Process an excise invoice (outgoing) for other movements
    J1IU
    Process exemption forms
    J1IW
    Verify and post an incoming excise invoice
    J1IX
    Create an incoming excise invoice (without reference to purchase order)
    J2I8
    Transfer excise duty to CENVAT account
    J2IU
    Remit excise duty fortnightly
    J2I9
    Monthly CENVAT return
    J1IG
    Excise invoice entry at depot
    J1IGA
    Create additional excise entry at depot
    J2I5
    Extract data for excise registers
    J2I6
    Print excise registers
    Regards
    Priyanka.P

  • Re:Query For Inventory Transfer..!!!

    Dear Members,
    My Scenario is,
    I want to take a report for inventory transfer that contains
    1. Itemcode
    2.Item description
    3.quantity
    4.inventory quantity on the previous day.
    I have taken the tables owtr,wtr1,oitm and oitw.But the issue is if my document date is like 30.11.2010 i want the inventory quantity value as  on 29.11.2010.
    I need only query not SAP Reports.Plz suggest a suitable query for this issue.
    With Regards,
    Revathy

    Hi Revathy,
    You have to use OINM table to get your desired Stock on past dates.
    Have a look at these queries.
    1. Stock per itemwise
    select t1.ItemCode,max(t1.dscription) [Name],(sum(isnull(t1.InQty,0)) - sum(isnull(t1.OutQty,0)) ) [ClsStock],(sum(t1.transvalue)) [ClsValue]
    from OINM t1
    where  t1.DocDate <= '[%1]'
    group by
    t1.ItemCode
    2.Stock per item per warehouse wise
    select t1.ItemCode,max(t1.dscription) [Name],t1.warehouse [Warehouse],
    (select whsname from owhs o1 where ((o1.whscode) = (t1.warehouse))) [WarehouseName],
    (sum(isnull(t1.InQty,0)) - sum(isnull(t1.OutQty,0)) ) [ClsStock],(sum(t1.transvalue)) [ClsValue]
    from OINM t1
    where t1.DocDate <= '[%1]'
    group by
    t1.ItemCode,t1.warehouse
    Regards,
    Bala
    Edited by: Balakumar Viswanathan on Dec 10, 2010 5:22 PM

  • Can anyone share the query for inventory aging report

    Is there any standard reports for inventory aging in oracle ebs 12.1.3 ....... If not can anyone share the query for inventory aging report

    Hi,
    It may not be so simple as you are trying to reproduce the historical value.  I believe you have to create a temporary table first.  Or you may use Command feather to get the required data in advance.
    Thanks,
    Gordon

  • Is SSAS the right tool for my active data monitoring?

    I'm looking for a solution for actively monitoring many millions of records for abnormalities in data trends.  I'm familiar with warehouses, star and snowflake schemas, all of that good stuff.  I'm really interested in SSAS as the front end tool
    or any other Microsoft tool that may lay on top of it.
    I have a ton of client databases, all with nearly identical structure, which have data loaded to them weekly or monthly.  I want to automatically monitor this data when it's loaded (when new records are added to the database, basically).  I would
    assume that this would be done through processing a cube periodically - I can trigger a reprocessing of the cube programmatically or whatever. I want to automatically get some kind of alerts when individual metrics that I have defined are outside of a threshold
    that I have defined (one field as a percentage of another, a standard deviation range as compared to previous months, etc).
    I have something like this in place already, but it's all home grown and becoming a maintenance nightmare.  We want to expand it to other areas, add more metrics to monitor, etc etc.  If there's a product out there (ideally SSAS which I already
    own a license for) that makes this more manageable that would be fantastic.
    Any other information you might be able to provide - articles, other product information, companion products, other tools, whatever - would be greatly appreciated also!  Thanks!

    I'm looking for a solution for actively monitoring many millions of records for abnormalities in data trends.  I'm familiar with warehouses, star and snowflake schemas, all of that good stuff.  I'm really interested in SSAS as the front end tool
    or any other Microsoft tool that may lay on top of it.
    I have a ton of client databases, all with nearly identical structure
    Hi Mateoc,
    In your scenario, you said that you have a ton of client databases, all with nearly identical structure,
    so you can use SQL Server Integration Services (SSIS) to load the data to Data Warehouse. Then create a SQL Server Analysis Services Multidimensional database using this data warehouse as the data source.
    SQL Server Analysis Services (SSAS) Multidimensional model is used when having large amount of data with complex requirements. In order to improve query performance, there will be a cube doing heavy time-consuming processing and then synchronize it
    to query cubes.
    Reference
    http://blog.aditi.com/data/choosing-between-analysis-services-multidimensional-and-tabular-models-part-3/
    http://blogs.technet.com/b/pfelatam/archive/2012/07/25/analysis-services-tabular-mode-vs-multidimensional-mode.aspx
    http://www.element61.be/e/resourc-detail.asp?ResourceId=485
    Regards,
    Charlie Liao
    TechNet Community Support

  • I have had my IPAD2 for quite a while but haven't activated my cellular data for about a year.  I am now trying to activate and when I go to cellular data, turn it on and try to tap view account i just get a message that says "connection to server lost".

    I have had my IPAD2 for quite a while but haven't activated my cellular data for about a year.  I am now trying to activate and when I go to cellular data, turn it on and try to tap view account i just get a message that says "connection to server lost".  I could swear the last time I used cellular data you would see the signal in the upper left corner and I only see "no service" there, I am in a location where I know I should have service.  Is there something I should do to my IPAD?  I tried resetting, I tried clearing cookies and history in Safari (after reading a post n these discussions).  I don't know what to do next. My IOS version is 6.1.3.  I did go into Network from the general tab and I see it says "SIM not provisioned".    HELP and Thank you in advance.

    Hello Theresa818,
    Thank you for using Apple Support Communities!
    It sounds like the cellular data will not activate for some reason on the iPad.
    I found this article that will help you resolve this issue here, named iPad (Wi-Fi + Cellular Models): Troubleshooting a cellular data connection, found here http://support.apple.com/kb/TS4249
    Check for a carrier settings update.
    Update your iPad.
    Toggle the Cellular Data setting off and on under Settings > Cellular Data.
    Restart your iPad.
    Tap Settings > General > About. Locate the Carrier entry and make sure that your carrier is correct.
    If your SIM card has SIM PIN enabled, try turning it off: Tap Settings > Cellular Data > SIM PIN.
    Make sure you're in an area of good coverage. If the cellular data connection works in another area, contact your carrier to report the original affected area.
    Reset network settings: Tap Settings > General > Reset > Reset Network Settings.
    Restore the iPad as new.
    If none of the above steps resolves the issue, make an appointment at an Apple Retail Store, contact your carrier, or contact AppleCare to troubleshoot further.
    I know you may have done one or two of the steps here, so you can skip those.
    Take care,
    Sterling

  • Query of queries testing for null or empty dates

    I'm having problems with this query (within a function). The
    last condition in the where clause needs to check for an empty or
    null date and then check against the current date (which is fine),
    im aware that the syntax is wrong but wondered if someone could
    correct it for me to get it working.
    <cfquery name="filterQuery" dbtype="query"
    maxrows="#arguments.top#">
    select * from getAllSaved
    where
    workFlowStatusId = <cfqueryparam
    cfsqltype="CF_SQL_INTEGER"
    value="#application.const.WORKFLOW_LIVE#" />
    and
    dateArchive > <cfqueryparam cfsqltype="CF_SQL_DATE"
    value="#now()#" />
    and
    dateLive <= <cfqueryparam cfsqltype="CF_SQL_DATE"
    value="#now()#" />
    and
    (dateExpiry is null or dateExpiry = '') or dateExpiry >
    <cfqueryparam cfsqltype="CF_SQL_DATE" value="#now()#" />
    </cfquery>

    I feel stupid, although i'd put a fiver on having tried that!
    thanks

  • List of logon/logoff activity for a user in specfied date range

    Hello all,
    We have a requirement to check the activity of two users. It is requested that we get their logon/logoff and timeout activity in our PRD system for a specfic range of dates.  To retrieve that info do we have to be auditing their user ID's or can it be retrieved via ST03N or some other report?
    I was not sure whether this information would be available via a lookup in the USR02 table or not.
    Any help would be greatly appreciated.
    Thank you!

    Unfortunately login has more than one spot as it is dependent on contexts and authorizations even.
    Logoff could be network problems with a keepalive timeout, or server side session end, or client side termination (there are many clients).
    Hopefully we will have more infos. Perhaps we can influence the authentication and client protocol because SAML supports single-log-off which might work with message based authentication but lead to a rather long log... 
    Cheers,
    Julius

Maybe you are looking for