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
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 -
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
SumanHI
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 -
Daily Production Report with Variance or receipt of Production
Hi All..
my one of the clients want the Daily Production Report with Variance or receipt of Product?
Please let me know what does it mean and how can I fetch this report
Thanks
RahulHi Rahul,
Try This
Daily Receipt From Production report
SELECT T1.[BaseRef] as 'Production Order No', T0.[DocNum] as 'Receipt No', T0.[DocDate] as 'Receipt Date', T0.[CardCode] as'Customer/Vendore Code', T0.[CardName], T2.[ItemCode], T2.[ItemName], T1.[Quantity] as 'Receipt Qty', T1.[OpenQty] as 'Open Qty against Pro Order' FROM OIGN T0 INNER JOIN IGN1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode WHERE T0.[DocDate] >=[%0] and T0.[DocDate] <=[%1] and
T1.[BaseRef] IS NOT NULL
Summary Report For Production Order
SELECT T0.[DocNum] as 'Production Order No', T0.[PostDate], T0.[DueDate], T0.[RlsDate], T0.[CloseDate], T2.[ItemCode], T2.[ItemName], T3.[CardCode], T3.[CardName], T0.[PlannedQty], T0.[CmpltQty], T0.[RjctQty] , (T0.[PlannedQty]-T0.[CmpltQty]-T0.[RjctQty] ) as 'Open Qty' FROM OWOR T0 INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode LEFT OUTER JOIN OCRD T3 ON T0.CardCode = T3.CardCode WHERE T0.[PostDate] >=[%0] and T0.[PostDate] <=[%1]
Thanks,
Srujal Patel -
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 -
Issue for Production Report With Production Order Details and Batch Number
Hi Guys,
I am looking for a batch report.I have tried it but i didnt get the desired results.Pls any body give me some solution.
I need to include the Batch number in this report and when i have done the same the values are repeating and also need to display the Item Description for (Description in Production Order - Parent Item)
SELECT distinct t0.docnum,T0.[DocDate], t4.IssuedQty as 'Consumed Qty', T1.[ItemCode] as 'Circle Codee',T1.[Dscription] as 'Circle Name',t3.itemcode
FROM [dbo].[OIGE] T0
INNER JOIN [dbo].[IGE1] T1 ON T0.DocEntry = T1.DocEntry
LEFT JOIN owor t3 on t1.baseref = t3.docnum
left join wor1 t4 on t3.docentry=t4.docentry
INNER JOIN OITM T5 ON T1.ItemCode = T5.ItemCode
INNER JOIN OITB T6 ON T5.ItmsGrpCod = T6.ItmsGrpCod
INNER JOIN IBT1 T7 ON T5.ItemCode = T7.ItemCode
INNER JOIN OIBT T8 ON T7.BatchNum = T8.Batchnum and T7.ItemCode = T8.itemcode
where t0.docdate between [%0] and [%1] and T6.[ItmsGrpNam] = 'Raw Materials' and t0.JrnlMemo = 'Issue for Production'
Any body provide me some idea for achieving this....
Regards,
Vamsi.Hi Bala.
Thanks for the query but still not acheived the result.
The Scenario is to know the quantity of the Coil (Raw MAterial) used IN making a product in different stages and from which batch and Whse the RawMaterial is Consumed in making of the Product(Production Order Parent Item)
------------- (Issue for Production )-----------------------| Production Order Qty(IssuedQty) Production Order | BatchNum
DocNo/Date | ( RawMaterial/Coil Code/Desription) | (Quantity issued for RM) ItemCode/Description | Batchnum
Regards,
Vamsi..
Edited by: VamsamP on Dec 1, 2010 5:06 PM -
Opportunity Product reporting with # of Periods and Frequency
We are just about to roll out out a business unit and they will be using the frequency, number of periods, and the start/close date fields on the revenue record.
In staging, I created a test report and it 'explodes' the product to have 12 individual entires, since I picked 12 as the number of periods. I set the qty to 60 and all 11 months have 60 but the first month has 61. Is there a reason for that?Product: you do get the dimensions and facts for the Product object... so you'd build a report with Product information
Opportunity-Product: you do get dimensions and facts for the Products related to an opportunity... so you'd build a report with Opportunity and Product information
Antonio
Bexpert, Brazil -
Run Report with Pass Number and Varchar Lexical Parameter values
Dear Sir/Madam
Due to an urgent change required to a report I would most appreciate it if you can please advise me if it is possible to get this report working by either passing in multiple lexical parameters or one signle lexical parameter when calling the SRW.RUN_REPORT command with the following methods:
Firstly: When calling report with a run_no and spr_cd passed in through one lexical:
cmd_line: REPORT=D:\DEV\REMITTANCE.rdf BACKGROUND=YES BATCH=NO DESFORMAT=PDF DESTYPE=FILE DESNAME=D:\DEV\REMITTANCE.pdf
CP_L_PARAM=RUN_NO=TO_NUMBER(28) AND SPR_CD=SUPP1
Both with a TO_NUMBER and without, whereby I attempt to do a SUBSTR within the query of the called report to derive the RUN_NO Oracle Reports fails to accept the SUBSTR.
Secondly: I am now trying to call the with passing two lexical parameters into the report as follows:
cmd_line: REPORT=D:\DEV\REMITTANCE.rdf BACKGROUND=YES BATCH=NO DESFORMAT=PDF DESTYPE=FILE DESNAME=D:\DEV\REMITTANCE.pdf
CP_L_RUN_NO=||TO_CHAR(lv_run_no)|| CP_L_SPR_CD=||lv_spr_cd;
NOTE: The above is an output of the actual command line and not what is passed into the command line, thus the quotes are missing. Please also note that the report is running fine with the only a hard coded RUN_NO value PASSED without the SPR_CD.
Unfortunately this is also causing issues as the RUN_NO is a number and as you know you can only pass in strings.
Your urgent help is required on this matter please as our client is expecting a solution this afternoon.
Hope to hear form you soon.
Kind regards
Andrew MasonDont Worry I've worked it out...
-
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. -
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&… -
Asset report with vendor number and vendor desc wise
Hi Gurus
The requirement is to generate asset reports with the below fields:
Asset class, Asset number & desc, vendor number & desc
Suppose say all asset balances should be reported by vendor name and desc.
I couldn't get the right results using an existing or a custom sort version. Do not want to go with a custom report or a SAP query.
Any pointers in this regard would be helpful.
Thanks
SekharHi,
You can use table ANLA.
Populate the asset field then go to settings tab and choose fields.
Check the following fields given below:
BUKRS
ANLN1
ANLKL
LIFNR
TXT50
then execute.
hope it helps.
regards,
otep -
Standard Report with IDOC Number and PR number
Hi
My client need the Standard report with the combination fields of " Purchasing Number , Requirements tracking number in PR,
IDOC number , IDOC Processing status. "
(Our PR will generates through IDOC from other system via XI interface)Hi Nagendra,
for Purchasing Number , Requirements tracking number in PR you can use -ME5A
Purchasing Number-EBAN-BANFN
Tracking number goto- MELB.
table name-EKPO
for IDOC number , IDOC Processing status -we09
For IDOC number -EDID4-DOCNUM
IDOC Processing status-EDIDC-STATUS
Regards,
Krishna.
Edited by: kris_hna on Sep 8, 2011 1:14 PM
Edited by: kris_hna on Sep 8, 2011 1:19 PM -
Stock ageing report with batch Management active
Hi Experts,
My client wants a Stock ageing report and batch management is active
According to my client, Inventory ageing report should show stock quantities and stock value as follows,
1. Below one year
2. Between one and two years
3. Above two years
What are the table and fields to be considered for this report.
Thanks
NDSWhat steps do you mean? taking an ABAP course and doing it yourself, or stepping to an ABAPer and let him know what he shall do?
you asked for a stock report, not for a movement report.
If I go into my warehouse and looking at all the stuff sitting there and want a report that should tell me how old this stuff is, then i am not intrested if there was a goods receipt movement.
However I would like to know the last movement date. In this case you have to look into table S032 or into the movements MSEG (with MKPF as header table)
Maybe you are looking for
-
So, after talking with charter (who basically told me to get bent, talk to apple...), i'm of the persuasion that there seems to be a problem with Charter's Personal Web Space FTP Upload system, and Mac OS X. Here's the 411: I go to ftp://webpages.cha
-
hello all, how do i change the font size for contact? also, can i chnage font size for all menu in phone? The changing of font size ibn 6288 only does for "Messaging" and "Web" under Settings>Display>Font Size. Any help appreciated...
-
Hi, I created an rdf for customer statement where i display invoices and receipts. my output displays invoice number,invoice amount,receivedamount and balance amount and i need to summarize the balance amount Now, my requirement is for invoice with s
-
Cross-Tab Conditional Formatting
Hello Everyone I have a question, I am working with on a cross-tab table version 2008 that requires a dollar symbol in some of the columns, but not all of them. I tried to fix this problem with a conditional formula, but for those columns that are ca
-
Problem after updating to 4.2
I have found that my screen rotation lock button has changed to become sound mute button! Can anyone tell me how to get back the screen rotation lock function?