LEIN SAP (Storage unit header records) Table details
Dictionary Type: Table
Description: Storage unit header records
Description: Storage unit header records
Table field list including key, data, relationships and ABAP select examples
LEIN is a standard SAP Table which is used to store Storage unit header records data and is available within R/3 SAP systems depending on the version and release level.
The LEIN table consists of various fields, each holding specific information or linking keys about Storage unit header records data available in SAP. These include LENUM (Storage Unit Number), LGNUM (Warehouse Number / Warehouse Complex), LETYP (Storage Unit Type), LGTYP (Storage Type).. See below for full list along with technical details, documentation, text table, check tables, foreign key relationships, conversion routines, relevant tcodes and example ABAP select code etc. .
Delivery Class: A - Application table (master and transaction data)Display/Maintenance via tcode SM30: Display/Maintenance Allowed but with Restrictions
SAP enhancement categories: Can be enhanced (character-type or numeric)
SAP LEIN table fields - Full list of fields found in SAP data dictionary
Field | Description | Data Element | Data Type | length (Dec) | Check table | Conversion Routine | Domain Name | MemoryID | SHLP |
MANDT | Client | MANDT | CLNT | 3 | T000 | MANDT | |||
LENUM | Storage Unit Number | LENUM | CHAR | 20 | LENUM | LENUM | LEN | ||
LGNUM | Warehouse Number / Warehouse Complex | LGNUM | CHAR | 3 | T300 | LGNUM | LGN | ||
LETYP | Storage Unit Type | LVS_LETYP | CHAR | 3 | T307 | LVS_LETYP | |||
LGTYP | Storage Type | LGTYP | CHAR | 3 | T301 | LGTYP | LGT | H_T301 | |
LGPLA | Storage Bin | LGPLA | CHAR | 10 | Assigned to domain | LGPLA | LGP | LAG1 | |
SKZUA | Blocking Indicator: For Stock Removals (User) | LEIN_SKZUA | CHAR | 1 | XFELD | ||||
SKZUE | Blocking indicator: for putaways (user) | LEIN_SKZUE | CHAR | 1 | XFELD | ||||
SPGRU | Blocking reason | LVS_SPGRU | CHAR | 1 | T330 | LVS_SPGRU | |||
STATU | Status of Storage Unit | LEIN_STATU | CHAR | 1 | LEIN_STATU | ||||
ANZQU | Number of quants on storage unit | LEIN_ANZQU | DEC | 7 | LVS_ANZQU | ||||
BDATU | Date of last movement | LEIN_BDATU | DATS | 8 | DATUM | ||||
BZEIT | Time of last movement | LEIN_BZEIT | TIMS | 6 | UZEIT | ||||
BTANR | Transfer order number of last stock transfer | LEIN_BTANR | NUMC | 10 | TANUM | ||||
BTAPS | Item in transfer order of last stock transfer | LEIN_BTAPS | NUMC | 4 | TAPOS | ||||
MGEWI | Weight of materials on storage unit | LEIN_MGEWI | DEC | 11(3) | DEC8_3 | ||||
GEWEI | Weight Unit | GEWEI | UNIT | 3 | T006 | CUNIT | MEINS | ||
PLPOS | Position in storage bin | LVS_PLPOS | CHAR | 2 | LVS_PLPOS | ||||
AOFTA | Number of open transfer order items on storage unit | LEIN_AOFTA | DEC | 5 | LVS_ANZPS | ||||
REFNR | Group | LVS_REFNR | CHAR | 10 | T311 | ALPHA | LVS_REFNR | REFNR | H_LVS_REFNR |
UVTYP | Stor.type to which rem.goods are posted after compl.st.rem. | LEIN_UVTYP | CHAR | 3 | T301 | LGTYP | |||
UVPLA | Stor.bin to which rem.goods are posted after compl.stck rem. | LEIN_UVPLA | CHAR | 10 | Assigned to domain | LGPLA | |||
KKAPV | Capacity usage of storage unit type | LVS_KKAPV | DEC | 11(3) | DEC8_3 | ||||
OKAPV | Old capacity usage of storage unit | LEIN_OKAPV | DEC | 11(3) | DEC8_3 | ||||
NPLEI | Dest.stor.bin changeable during confirmation | LVS_NPLEI | CHAR | 1 | LVS_NPLEI | ||||
UVPOS | Position in transfer bin | LEIN_UVPOS | CHAR | 2 | LVS_PLPOS | ||||
UVQNR | Quant | LVS_LQNUM | NUMC | 10 | LVS_LQNUM | LQN | |||
WETYP | Storage type where GR posting takes place | LEIN_WETYP | CHAR | 3 | Assigned to domain | LGTYP | |||
WEPLA | Storage bin where GR posting takes place | LEIN_WEPLA | CHAR | 10 | Assigned to domain | LGPLA | |||
WESTA | Goods Movement Status for Storage Bin | LEIN_WESTA | CHAR | 1 | LEIN_WESTA | ||||
WEAQU | Number of quants with missing GR posting | LEIN_WEAQU | DEC | 7 | LEIN_WEAQU | ||||
VBELN | Delivery | VBELN_VL | CHAR | 10 | Assigned to domain | ALPHA | VBELN | VL |
Key field | Non-key field |
How do I retrieve data from SAP table LEIN using ABAP code
The following ABAP code Example will allow you to do a basic selection on LEIN to SELECT all data from the tableDATA: WA_LEIN TYPE LEIN.
SELECT SINGLE *
FROM LEIN
INTO CORRESPONDING FIELDS OF WA_LEIN
WHERE...
How to access SAP table LEIN
Within an ECC or HANA version of SAP you can also view further information about LEIN and the data within it using relevant transactions such asSE11 (ABAP Dictionary Maintenance)
SM30 (Maintain Table Data)
SE80 (Object Navigator)
SE16 (Data Browser).
Search for further information about these or an SAP related objects