obtn Batchnumber-Information Batch: distnumber. Link: sysnumber
obtq Quantity per Batchnumber
obtw Quantity per Warehouse and Batchnumber
beas_whsbinitem Quantity per Warehouse. Linked via
batchnum=obtn.distnumber
oitl Transactions per Document-Line (Batches and Serialnumber)
itl1 Transaction per Batchnumber (Batches and Seriannumber)
osrn Serialnumber-Information distnumber = serialnumber (osri.intrserial)
osrq Quantity per Serialnumber and Warehouse (whscode)
oitl Transactions per Document-Line (Batches and Serialnumber)
itl1 Transaction per Batchnumber (Batches and Seriannumber)
if you work with batchnumbers or serialnumbers, you've more then one sub-entry per beas_oinm (transaction per document-line)
you need the linenumber from the serial-transaction or batchnumber-transaction
SAP2007: OINM |
Description |
SAP8.8: OIVL |
Document-Link |
transnum |
First primary key in sap 2007 |
oivk.transnum |
|
instance |
Second primary key in sap 2007 |
oivk.instance |
|
New primary key in sap 8.8 |
oivl.transseq |
||
transtype |
the document-object, 59=receipt, 60=issue, 67=transfer (and other) |
oivl.transtype |
line.objtype |
createdby |
the docentry (!!) |
oivl.createdby |
line.docentry |
base_ref |
docnum |
||
doclinenum |
linenum (0-based) |
oivl.doclinenum |
line.linenum |
ref1 |
Docnum |
oilm.ref2 |
|
itemcode |
oivl.itemcode |
||
inqty |
receipt-qty |
oivl.inqty |
|
outqty |
issue-qty |
oivl.outqty |
|
warehouse |
the Warehouse |
oivl.loccode |
New in SAP8.8:
Table oinm is only a view from oivl inner join oivk (transseq) inner join oilm (messageid)
beas work with the transnum-id from oivk (transseq=oinm.transseq and layerid=0)
all other information form oivl.
Link: documentline -> oitl -> itl1 (logentry,itemcode) -> obtn/osrn (sysnumber) get batchnum (distnumber)
Ibt1 / SRI1 |
ITL1 (new) |
OITL (new) Line-Transaction |
OSRD |
|
|
Transid -> oilv.transseq |
|
|
Logentry |
logentry |
|
Itemcode |
Itemcde |
Itemcode |
itemcode |
|
Sysnumber (OBTN.Distnumber) |
|
|
Batchnumer |
(obtn.Distnumber) |
|
|
Linenum |
|
|
|
|
Mdabsentry (the new linenum) |
|
|
Basetype |
|
Doctype |
doctype |
Baseentry |
|
Docentry |
docentry |
Basenum |
|
Docnum |
docnum |
Baselinenum |
|
Docline |
doclinenum |
Whscode |
|
Loccode |
whscode |
Direction |
|
|
direction |
Quantity (allwais positiv) |
Quantity (- out, + in) |
stockqty |
|
|
allocqty |
|
|
|
|
docqty |
docquty |
|
|
Definedqty (on release only) |
|
Example:
get all Batch- and Serial-Numbers from Goods Receipt PO with docentry 59
with bin-Transactions, Serial- and Batchnumber-Transactions
select opdn.docnum,opdn.cardname,pdn1.visorder +1 as visorder,pdn1.itemcode,pdn1.dscription,pdn1.whscode,pdn1.quantity,
case when oitm.mansernum='Y' then osrn.distnumber else obtn.distnumber end as batchnumber ,
beas_whsbinjournal.bincode
from pdn1
inner join oitm on oitm.itemcode = pdn1.itemcode
inner join opdn on opdn.docentry=pdn1.docentry
left outer join oitl on oitl.doctype=pdn1.objtype and oitl.docentry=pdn1.docentry and oitl.docline=pdn1.linenum
left outer join itl1 on itl1.logentry=oitl.logentry and itl1.itemcode=oitl.itemcode
left outer join obtn on obtn.sysnumber=itl1.sysnumber and obtn.itemcode=itl1.itemcode and oitm.manbtchnum='Y'
left outer join osrn on osrn.sysnumber=itl1.sysnumber and osrn.itemcode=itl1.itemcode and oitm.mansernum='Y'
inner join oivl on oivl.transtype=pdn1.objtype and oivl.createdby=pdn1.docentry and oivl.doclinenum=pdn1.linenum
inner join oivk on oivk.transseq=oivl.transseq and oivk.layerid=0
left outer join beas_whsbinjournal on beas_whsbinjournal.transnum=oivk.transnum and (case when oitm.mansernum='Y' then convert(varchar(30),osrn.sysnumber) when oitm.manbtchnum='Y' then obtn.distnumber else '' end) = beas_whsbinjournal.batchnum
where pdn1.docentry=59;
OIBT |
OBTN (New) |
OBTQ (Quantity) |
OBTW (QTY per Warehouse) |
|
Absentry (PK) |
absentry |
absentry |
|
sysnumber |
sysnumber |
sysnumber |
Itemcode |
Itemcode |
itemcode |
itemcode |
Batchnum |
Distnumber |
|
|
Whscode |
|
whscode |
whscode |
Suppserial |
Mnfserial |
|
|
Intrserial |
Lotnumber |
|
|
Expdate |
Expdate |
|
|
Prddate |
Mnfdate |
|
|
Indate |
Indate |
|
|
Located |
… |
|
location |
Notes |
Notes |
|
|
Quantity (per Whs)) |
|
Quantity |
|
Status |
Status |
|
|
BIN-Transaction-Table beas_oinm
transnum |
first primary key |
instance |
second primary key |
transtype |
the document-object, 59=receipt, 60=issue, 67=transfer (and other) |
transseq |
Transaction-Line, linked to oivl/oivk |
docentry |
docentry |
base_ref |
docnum |
doclinenum |
linenum (0-based) |
itemcode |
|
in0out1 |
sign for in/out 0 = receipt, 1=issue |
quantity |
full quantity |
openqty |
open quantity |
station_id |
created from station or web-client |
beas_version |
created with beas-version (not web-client-version!) |
oivl on transtype=documentline.objtype and createdby=documentline.docentry and doclinenum=documentline.linenum
oivk on transseq=oivl.transseq and oivk.layerid=0
beas_whsbinjournal on transnum=oivk.transnum
oige/ige1, oign/ign1 or other: Document-Header and Lines
oivk/oivl (sap-transaction, linked width document-number to document-lines ec ige1, egn1)
beas_oinm (link: transseq or transnum/instance: duplicate transaction on bin-warehouse)
oitl (sap-transaction batchnumbers and serialnumbers, link with document-entry)
itl1 (Batchnumer-transaction)
obtn (-> sysnumber: Batchnumber-Information) -> obtw (Batchnumber-Warehouse-Information)
odsn (Serialnumber-Information)
beas_whsbinjournal (all bin-transactions)
owhs (warehouse-definition)
beas_owhs (bin-warehouse-definition)
beas_whsarea (bin-warehouse-area)
beas_whsbin (bin's)
beas_whsbinitem (stock on this bin)
beas_whsbinjournal (transactions on this bin)