on 12-13-2012 5:22 AM
Dear All,
I have to add additional fields on Inventory audit report.
From where can I find the query to modify the report?
Thanks
Hi Irene Vas,
Inventory Audit Report is the standard report in SAP business one. You can't add additional field by query.
Please advice your exact requirement.
Thanks & Regards,
Nagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Irene Vas,
Not possible to add UDF in standard report. But you can create query to get UDF.
Try this query:
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @Whse nvarchar(10)
select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]'
select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]'
select @Whse = 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
Note: OINM -Ware house Journal table
OITM- Items table
Thanks & Regards,
Nagarajan
Hi Irene Vas...
The orange arrow will be displayed on all document transaction and mastercodes having a unique Id generate by SAP. specially numbers link BP codes, Item codes.
You could try using "FOR BROWSE" at the end of your query.
To your Query please find the solution in the below link SAP Note.
[https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1410595]
Cause
Consulting
Solution
The Orange Arrow may not show in the following cases:
1. The field does not represent keys of a table.
2. Queries that contain groupings.
3. Queries that are based on Archive tables ("A" tables).
4. Queries that contain UNION clause.
5. Queries that contains temporary tables.
6. Queries for Formatted Search.
7. Queries with parameters declared.
8. Queries with certain restricted names in comment section
You could try using "FOR BROWSE" at the end of your query.
FOR BROWSE means that the result displays the orange arrow to navigate into the master record or document behind it.
Hope Helpful
Regards
Kennedy
Thank you for the information.
Where can I find OINM view definition? I want to check underlying tables of this view.
When I query OIGE,OIGN, OPDN,OWTR tables with union all clause I get partial output.
But my concern is when I query OIGE table I get one record for the Document Number(SO) but in Inventory Audit Report/OINM there are two records for the same SO with quantity split.
Any advise?
Regards,
Irene
Hi Nagarajan K
I am trying to make modification an excel report as from Inventory Audit Report Criteria the table OINM & OITM I had used to find the results. I have attached a picture which I need as a output into SAP system.On the below is my desire output needed
Value of Quantiy and Cumulative value I took T0.[InQty]) ,T0.[OutQty] and T0.[CalcPrice]
from the Query but not getting proper one. Any one have any suggestions for this.
Right now getting this
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.