Register Login

Working with stocks

Updated May 18, 2018

1. Transactions
2. Tables containing stock
3. How to read the stock on a date back in time

1. Transactions

MB51 Material document list
MR51 Accounting Documents for Material

MB5B Stock on posting date
MMBE Stock Overview
MB52 Display Warehouse Stocks of Material on Hand

MB54 Consignment From Vendor - Stock ( Table MKOL )
MBLB Stocks with Subcontractor (Table MSLB)
MBBS Valuated Special Stock



2. Tables containing stock

Own stock

MARD Storage Location Data for Material
MCHB Batch stocks


Note that batch stocks can be found both in MARD and MCHB, but only on batch level in MCHB. This meansd that if you does not need information about batch, you only have to read MARD.


Special stock indicator O Part prov. vedor

MSLB Special Stocks with Vendor

Use fields:

LBLAB Valuated stock with unrestricted use
LBINS Stock in quality inspection
LBEIN Total Stock of All Restricted Batches


Special stcock indicator V Ret. pkg. w. customer or W Consignment (Cust)

MSKU Special Stocks with Customer

Use fields:

KULAB Valuated stock with unrestricted use
KUINS Stock in quality inspection
KUEIN Total Stock of All Restricted Batches

Special stcock indicator K Consignment (Vendor) or M Ret. trans. pkg. vendor


MKOL Special Stocks from Vendor

Use fields:

SLABS Unrestricted-use consignment stock
SINSM Consignment stock in quality inspection
SEINM Restricted-use consignment stock
SSPEM Blocked consignment stock

Special stcock indicator Q Project stock

MSPR Project stock

Use fields:

PRLAB Valuated stock with unrestricted use
PRINS Stock in quality inspection
PRSPE Blocked stock
PREIN Total Stock of All Restricted Batches

Special stcock indicator E Orders on hand

MSKA Sales Order Stock

Use fields:

KALAB Valuated stock with unrestricted use
KAINS Stock in quality inspection
KASPE Blocked stock

KAEIN Total Stock of All Restricted Batches



3. How to read the stock on a date back in time

The tables above only containsan up-to-the-minute account of the stock. If you want to know the stock on a date back in time, you will have to read the stock transactions from table MSEG Document Segment: Material. and adjust the current stock with the stock movements.
Note that you have to read MKPF also, to select on the document date ( BUDAT )

Example:

SELECT (G_T_MSEG_FIELDS)
INTO CORRESPONDING FIELDS OF TABLE G_T_MSEG_LEAN
FROM MKPF AS MKPF JOIN MSEG AS MSEG
ON MKPF~MANDT = MSEG~MANDT AND
MKPF~MBLNR = MSEG~MBLNR AND
MKPF~MJAHR = MSEG~MJAHR

WHERE MSEG~MATNR IN MATNR
AND MSEG~WERKS IN G_RA_WERKS
AND MSEG~LGORT IN G_RA_LGORT
AND MSEG~CHARG IN CHARG
AND MSEG~BWTAR IN BWTAR
AND MSEG~BWART IN BWART
AND MKPF~BUDAT GE DATUM-LOW
AND MSEG~SOBKZ IN G_RA_SOBKZ.


×