Skip to Content
0
Apr 28, 2011 at 08:40 PM

Batch Numbers Tables SAP 8.8

857 Views

Hi Experts, In SAP 2005, we use copy function from deliveries to AR invoices and also a query for BatchNum,Date and Attribute on user defined fields under row level, and works great.

Example of BatchNum Query SAP2005A

declare @batch as nvarchar(100)
declare @txt nvarchar(max) 
set @txt = '' 
declare P cursor for SELECT T0.[BatchNum] 
  FROM OIBT T0 INNER JOIN IBT1 T1 ON T0.ItemCode = T1.ItemCode and T0.WhsCode = T1.WhsCode 
  and T0.BatchNUm = T1.BatchNum 
  WHERE T1.[BaseEntry] =$[$38.45.0] and T1.[BaseLinNum] =$[$38.46.0] 
open P 
fetch next from P into @batch 
while @@fetch_status = 0 
begin
 set @txt = @txt + @batch +','
 fetch next from P into @batch 
end 
close P 
deallocate P 
select @txt

And Now, i have an issue, we upgrade to SAP 8.8 PL20, but this query is very slow when we copy the delivery to AR Invoice.

My Partner Sent me a SAP NOTE 1455278 - Batch/Serial Print templates changes in 8.8 and told me that i have to re design the query.

I searched Information about this, and i found the next article (Page 19) and it says that the old tables have been replaced for new tables.

Batch Number

Old Tables OIBT, IBT1, OSRD

New Tables OBTN, OBTQ, OBTW, OITL, ITL1

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f81618-0ab4-2c10-0eab-f5255034e5d7?quicklink=index&overridelayout=true

My doubt is: wich tables of the new ones have to be joined so i could get the details of the batchs in the delivery and also they could be transfered to A/R INVOICE. Can anyone help me please?

Best regards,

Alessandro.