Sales report with Batch number & expiry dates
Hello friends,
would any one please help me to frame this query to achieve the above ..
my query is as bellow, but I want to add the batch number & expiry dates along with the other information.....
SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[NumAtCard], T1.[ItemCode], T1.[Dscription], T1.[Quantity] FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.[ItemCode] >=[%0] AND T1.[ItemCode] <=[%1] AND T0.[DocDate] >=[%2] AND T0.[DocDate] <=[%3]
So which table to join to get the batch & expiry...
Rgds
Suman
HI
Batch table is OIBT, IBT1,OBTN
SELECT distinct T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[NumAtCard], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T4.[ExpDate] FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry inner join
IBT1 T2 on T1.ItemCode = t2.ItemCode and T0.objtype=T2.basetype and T2.baseentry=T1.Docentry inner join
oitm T3 on T1.Itemcode=T3.Itemcode inner join OIBT T4 on T1.Itemcode=T4.Itemcode WHERE T1.[ItemCode] >=[%0] AND T1.[ItemCode] <=[%1] AND T0.[DocDate] >=[%2] AND T0.[DocDate] <=[%3]
group by T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[NumAtCard], T1.[ItemCode], T1.[Dscription], T1.[Quantity],T4.[ExpDate]
Thanks
Mohammad Imran
Similar Messages
-
Inventory Audit Report with Batch Number
Hi all.
I am trying to build a query that similar to the inventory audit report but with batch number. I want to know which batch number of each item is being charged out in deliveries or goods issue and which batch of item is being received. I am using SAP B1 2007A. Following is the query that I used to generate the inventory report (warehouse, itemcode, description, price, opening balance, receipt, issue, closing) but I don't know where to get the batch number information for it.
Declare @StrtDate Datetime
Declare @EDate Datetime
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @Group nvarchar(10)
Declare @Whse nvarchar(10)
Set @FromDate = (Select min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >= @StrtDate)
Set @ToDate = (Select max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <= @EDate)
Set @Whse = (Select Max(s3.Warehouse) from dbo.OINM S3 Where S3.Warehouse = 'QA01')
Select
@Whse as 'Warehouse',
a.Itemcode,
max(a.Dscription) as 'Description',MAX(a.Price) as 'Price',
sum(a.OpeningBalance) as 'OpeningBalance',
sum(a.[IN]) as Receipt,
sum(a.OUT) as Issue,
(sum(a.OpeningBalance) + sum(a.[IN]) - Sum(a.OUT)) as Closing,
MAX(a.Price) * (sum(a.OpeningBalance) + sum(a.[IN]) - Sum(a.OUT)) as ClosingValue
from(
Select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,N1.Price,
(sum(N1.inqty)-sum(n1.outqty)) as 'OpeningBalance',
0 as [IN],
0 as OUT
From dbo.OINM N1
Where
N1.DocDate < @FromDate and N1.Warehouse = @Whse and N1.ItemCode Between '1C2K50NBAC' AND '7S2N40ADAM'
Group By
N1.Warehouse,N1.ItemCode,N1.Dscription,N1.Price
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,N1.price,
0 as 'OpeningBalance',
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,N1.price
Union All
select
N1.Warehouse,
N1.Itemcode,
N1.Dscription,N1.price,
0 as 'OpeningBalance',
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,N1.price) a, dbo.OITM I1
where a.ItemCode=I1.ItemCode
Group By a.Itemcode
Order By a.Itemcode
I wish to create the report like Inventory audit report merge with the batch number transactions report.
Thanks.Dear Shobah, it can be possible by some custom report. Try some complementary bi solution for better analysis with SAPB1.
-
Stock Report with Batch Number
Hi ,
My Client requires stock report with Batch numbers .required report format is
Item Code,BatchNumber,OpenQty,OpenVal,PurchaseQty,PurchaseVal,SalesQty,SalesVal,ClosQty,CloseVal
I tried using query on wiki for stock report but that query is written in 2007 and Batch tables and OINM table is changes in 8.81.
http://wiki.sdn.sap.com/wiki/display/B1/SAPB1SQLH-INItemInventoryOpeningandClosingStockper+warehouse
can any one help with stock report- batches.
Thanks,
PreetiHI,
use below query as basis and mofiy the fields required. it shows linking in batch and transaction tables:
SELECT distinct T0.ItemCode,T0.ItemName ,T0.DocDate ,T0.DocType ,T0.DocNum,T0.LocCode ,t4.DistNumber as [BatchNumber], T1.Quantity ,T5.CalcPrice as [Price]
FROM [OITL] T0
INNER JOIN [ITL1] T1 ON T1.[LogEntry] = T0.[LogEntry]
INNER JOIN OBTN T4 on T1.MdAbsEntry=T4.AbsEntry
INNER JOIN [OITM] T2 ON T2.[ItemCode] = T0.[ItemCode]
Inner JOin OINM T5 on T0.ItemCode =T5.ItemCode and T0.LocCode = T5.Warehouse and T0.AppDocNum = T5.BASE_REF
Thanks,
Neetu -
Stock Report with batch number and its Charactristc values
Our material are batch managed and Char values are entered at the time of GR. We need to prepare stock report showing batches for the material, their stock and characteristics values.
Like to know what tables we should use to find the char values. I could not find value in table CAWNHi,
For characteristcis link and values use below tables:
Characteristics :
CABN Characteristics ( o.a. batch/vendor)
CABNT Characteristics description
CAWN Characteristics ( o.a. material)
CAWNT Characteristics description
AUSP Characteristic Values
Class types and objects :
TCLAO Several class types for object
TCLA Class types ( vb. lfa1 => v10 en 010)
TCLAT Class type text
TCLT Classifiable objects
TCLC Classification status
Links :
INOB Link between Internal Number and Object
KLAH Class header data
KSSK Allocation Table: Object (vb.matnr) to Class
KSML Characteristics for a class (internal number)
for batch stock 0 use tables ilken MCHB, MCHA etc,
hope this helps
Reg
Dheeraj -
Production Report with batch number
Dear Experts,
I don't know how to include the batch number for the finished goods in the following query ,
SELECT T0.[DocNum] as Prod#, T0.[ItemCode],T0.[CmpltQty], T1.[ItemCode], T1.[IssuedQty], T2.[BatchNum],T0.[Comments] as Remark FROM OWOR T0 INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry left join IBT1 T2 on T2.[BsDocEntry] = t0.docentry and T1.[LineNum] = T2.[BsDocLine] WHERE T2.[BsDocType] = '202' and T2.[BaseType] = '60' and T0.[Status] IN ('r','l') and T0.[CmpltQty] <> '0' and T0.[DocNum]=[%0%] GROUP BY T0.[DocNum], T0.[ItemCode],T0.[CmpltQty], T1.[ItemCode], T1.[IssuedQty], T2.[BatchNum],T0.[CardCode],T0.[OriginNum],T0.[Comments] order by T0.[DocNum]
Help me Please.Dear sir,
The query is working
SELECT T0.[DocNum] as Prod#,T0.[OriginNum] as SalesOrd#,T0.[DueDate],T0.[PlannedQty] as PlanQty,case when (T3.[BaseType] = '59' and T3.[Direction] = '0' and T0.[ItemCode] = T3.[ItemCode] ) then 'Received' end as Direction,T0.[ItemCode], T3.[Quantity], T3.[BatchNum], case when (T2.[BaseType] = '60' and T2.[Direction] = '1' and T1.[ItemCode] = T2.[ItemCode] ) then 'issued' end Direction, T2.[Quantity], T2.[ItemCode], T2.[BatchNum] FROM OWOR T0 INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry left join IBT1 T2 on T2.[BsDocEntry] = t0.docentry and T2.[BsDocLine] = T1.[LineNum] left join IBT1 T3 on T3.[BsDocEntry] = t0.docentry and T0.[ItemCode] = T3.[ItemCode] WHERE T2.[BsDocType] = '202' and (T0.[Status] = 'R' OR T0.[Status] = 'L' )
Thankyou for the same -
Create Report with CR4E and XML Data Source
Hi all,
I have a problem when create a report with CR4E that should use a XML data source. It is not possible to choose fields from the field explorer, because ther are no fields from the XML-file. Is there a general problem when using an ODA data source in CR4E? At the moment I can only create reports with a database as data source.
Please help me with a tip.
Thanks
ArnoldHi,
After Installing CR4E Version 2 the code snippet for creating a XML-report not works as JSP. Has anywhere a hint to resolve the problem or a complete JSP-file?
reportClientDocument = new ReportClientDocument();
java.lang.NoClassDefFoundError: com/crystaldecisions/reports/common/data/CrystalResultSet
com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.<init>(Unknown Source)
org.apache.jsp.XMLDataSource_jsp._jspService(XMLDataSource_jsp.java:64)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Thanks
Arnold Meier -
Please any one provide crystal report for Location wise sales report with GP
Please any one provide crystal report for Location wise sales report with GP.Please its urgent
A report writer tool like Crystal reports is not available due to the cost involved in its licenses.Do you think that Oracle Reports is free then? It's $$$$.
You can download and test it for free, but if you want to use it in production you have to buy a license. -
Report with material number and planned delivery time
Is there any standard report with material number and planned delivery time ?
Hi,
I do not know any standard report. Please try SE16 + MARC...
BR
Csaba -
Process Order Details like batch number, mfg date flow to a new process ord
Hi Experts,
I have a doubt in Process Order.
I have two stage production.
1. Blending
2. Packing
I create a process order for blending and assign a batch number and manufacturing date for Blending operation.
Release the process order.
Final Confirmation of the process order.
I complete all the process, Goods Reciept is done.
Technically completed the Process Order.
Now my 1st stage Process order is completed and ready for the 2nd stage production i.e., Packing.
Now I create a new process order,
here I am having the problem that I need to enter all the details like batch number, manufacturing date etc..
I want to avoid this in the 2nd process order.
How to do this i.e., carry forwarding the details of the 1st process order into the 2nd process order.
Is there any setting required at the back end?
I was told about Push operation to rectify the above problem. But I am not clear about that.
Can any one clearly explain about that step- by - step.
Thanks in advance,
Regards,
B. Praveen
Praveenclosing thread
-
Is there a way on CONVERSION to create a sales order with a scheduled ship date in the past?
Is there a way on CONVERSION to create a sales order with a scheduled ship date in the past?
Customer wants to maintain the original scheduled ship date on converted ordered, but the scheduled dates is defaulting to sysdate for past due shipments on converted orders.Hi Friend,
As of now there is no functionality to display SSD,RD,PD backdated, max it can be sys date, not lower then that.
Regards
Shyam
Please see following Metalink Note ID for all in One solutions
Oracle E-Business : All In One Metalink Note ID's
If you are happy with the Document, please mark as Helpful by doing so this will provide assistance for other people looking for answers to their queries. -
Reg blocking of batch on expiry date
Dear all,
What are the selections to be done in QA07 for blocking a batch on expiry date which is 3 days from today, we also have batch status active.
Thanks in advance
MadhavHi
In QA07 select
1. Block batch at lot creation.
2.Initial Run in days : 3 or maore
3.click on the check box of Block batch
Also Mainatin shelf life data in MM and keep expiry date 3 days later.
schedule the batch run in the background.
I hope this will add some values
Regards
Sujit -
Can I run a sales report by invoice number?
I am trying to run a sales report by invoice number rather than by customer - can this be done?
Hi Connie
s u can run sales report by invoice no fot that pls find the query below
i think this will solve ur problem
SELECT T0.[DocNum][SO NO], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T2.[DocNum][Delivery No], T2.[CardName], T3.[ItemCode], T3.[Dscription], T3.[Quantity], T4.[DocNum][Invoice No], T4.[CardName], T5.[ItemCode], T5.[Dscription], T5.[Quantity] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry, ODLN T2 INNER JOIN DLN1 T3 ON T2.DocEntry = T3.DocEntry, OINV T4 INNER JOIN INV1 T5 ON T4.DocEntry = T5.DocEntry WHERE T5.[BaseRef] = T2.[DocNum] AND T3.[BaseRef] = T0.[DocNum] AND T5.[ItemCode] = T3.[ItemCode]
AND T5.[ItemCode] = T1.[ItemCode] AND T4.[DocNum] = [%0] GROUP BY T0.[DocNum], T0.[CardName], T1.[ItemCode], T1.[Dscription], T1.[Quantity], T2.[DocNum], T2.[CardName], T3.[ItemCode], T3.[Dscription], T3.[Quantity], T4.[DocNum], T4.[CardName], T5.[ItemCode], T5.[Dscription], T5.[Quantity]
Regards
Jenny
Edited by: Jennifer Anderson on Jul 28, 2010 11:21 AM -
Report with customer info for an Sales Order with batch details
Hi
Can any one please tell me the SAP REPORT with contains data of customers were shipped a specific product (material number) by batch number. report with the name and address of the customer, the sales order number and the number of products that were shipped.
Thanks
NickHi nick,
See if anybody has worked on SIS (sales information system) in your team.
He can help you out to create one info structure , by selecting desired characteristics, key figure with respective update rules. though its require lot of configuration but you can make it without abap development.
(I couldn"t make it in time to provide you detailed configuration but below given path will take you to the configuration area )
IMG - LG -Logistick information system -logistick data werhouse- data basis- field catalogue.
IMG - LG -Logistick information system -logistick data werhouse- data basis -
infostructure.
IMG - LG -Logistick information system -logistick data werhouse- data basis - updating - update defination & update rules.
( MC18, MC21, MC24,& MC30)this transaction help to create field catelogue, info system, update rule & generation log respectively.
karnesh -
Problems with Batch Number in WM Physical Inventory
I am trying to troubleshoot a client that has the following scenario:
1. Material in storage bin doesn't have batch number
2. Batch management has been activated.
3. A physical inventory document was created for the location where the material is.
4. The physical inventory has been counted.
5 When trying to write off differences in LI20 it is giving an error to enter a batch number.
I understand clearly that the system is interpreting that the batch number is required and missing in master data. I am not able to modify batch number for the quant in LS22.
The implications behind deactivating batch number right now would be too complicated and not the right procedure either.
What is the correct procedure in this case?
Thanks!Hi José, I do not think your point 2 can be right. If a user tries to switch on batch management when there is stock or any open transactional data (POs, Sales orders etc) the SAP throws an error. The only way to activate BM with stock in hand is, as Jurgen has pointed out, through a report or a direct table update that causes inconsistencies.
That said, please have a look at the below document. It details the report provided by SAP to deactivate/activate BM with stock. Please use them with the utmost caution, carefully reading all the disclaimers given by the author, before performing these steps to avoid further inconsistencies.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b009b1e5-f3df-2b10-7289-ff87d139dce1?QuickLink=index&… -
Hi Experts
We are Implementaing PP - PI for for a pharma company. Since the all the Process oriented, clientt is expecting all the reports with the batch number. For Information, we have configured such that, the batch number can be given as an input at the time when the order is getting created.
Kindly let me know the standard PP - PI / costing reports with the batch number
Thanks in advance
PalaniappanMenu Area SAP1 holds the most reporting transaction codes:
In SAP easy access screen execute SAP1
Logistics General >> Logistics Basic Data >> Batch Management, has some reports. Others, you can find in respective modules like material management etc. lot of them have batch related reports.
Maybe you are looking for
-
Need to view concurrent request output(pdf file of XML report)from OAFpage
Hi, I am submitting a concurrent request from OA page (on click of submit button). As of now, to view output of the request user has to open SRS form. Now the rquirement is to submit the request as well as to open the output file of the request in on
-
How does one mirror margins on Pages 5.5.2?
Earlier versions of Pages had a "Facing Pages" category in which to set margins as "inner" and "outer". This permitted margins on the bound side of the page to be different from those on the outer edge of the page. I am having difficulty finding so
-
BOE XI v3.1 Custom Installation
Running a Custom installation of BOE XI v3.1 is forcing the use of MySQL as our CMS database. One of the first installation screens has us choosing "Custom" or "New" installation. But there is no possibility of choosing an existing database server wi
-
Hi All, I have made some adjustments to an image using photoshop. I am happy with the image and closed down the layers and saved the file as a tiff (it was a neg scan). But i have since discovered that the file was not large enough for my printing re
-
Hi. I boughy A300 inspire today and installed everything and my speakers dont working. There are working only in Realtek HD Audio Menager.Can someone help me, please?