SAP Bit
Home
Get Started
  • Overview
  • Transaction Codes
  • Tables
  • Function Modules
  • Data Elements
  • Domains
  • IMG Activities
  • Overview
  • Standard RFCs
  • Custom RFCs
  • Overview
  • OData URLs
  • OData Services
GitHub
Home
Get Started
  • Overview
  • Transaction Codes
  • Tables
  • Function Modules
  • Data Elements
  • Domains
  • IMG Activities
  • Overview
  • Standard RFCs
  • Custom RFCs
  • Overview
  • OData URLs
  • OData Services
GitHub
  • SAP Objects

    • SAP Objects
    • Transaction Codes (T-Codes)
    • SAP Tables
    • Function Modules
    • Data Elements
    • Domains
    • IMG Activities

SAP Tables

Tables are database objects that store SAP data. Each table has a specific structure with defined fields and is used to store particular types of information within the SAP system.

Understanding SAP Tables

SAP tables are the foundation of data storage in SAP systems. They:

  • Store business data in a structured format
  • Have defined fields with specific data types
  • Can be related to other tables through key fields
  • Are accessed by SAP transactions and programs

Table Categories

SAP tables can be categorized based on their purpose and usage:

Transparent Tables

Transparent tables have a one-to-one correspondence with database tables. They are the most common type of tables in SAP.

Examples:

  • MARA (Material Master: General Data)
  • KNA1 (Customer Master: General Data)
  • BKPF (Accounting Document Header)

Pooled Tables

Pooled tables are stored together in a table pool to optimize database performance. Multiple logical tables share the same physical table space.

Examples:

  • CDPOS (Change Document Items)
  • NRIV (Number Range Intervals)

Cluster Tables

Cluster tables group related data together and store it in a compressed format. They are used for data that is frequently accessed together.

Examples:

  • PCL1 (Personnel Calendar Data)
  • INDX (Index Table for Various Applications)

Common SAP Tables by Module

Financial Accounting (FI)

TableDescriptionKey FieldsRelated T-Codes
BKPFAccounting Document HeaderBUKRS, BELNR, GJAHRFB01, FB03
BSEGAccounting Document SegmentBUKRS, BELNR, GJAHR, BUZEIFB01, FB03
SKA1G/L Account Master (Chart of Accounts)KTOPL, SAKNRFS00, OB_GLACC
SKATG/L Account Master TextSPRAS, KTOPL, SAKNRFS00, OB_GLACC

Materials Management (MM)

TableDescriptionKey FieldsRelated T-Codes
MARAMaterial Master: General DataMATNRMM01, MM02, MM03
MARCMaterial Master: Plant DataMATNR, WERKSMM01, MM02, MM03
MARDMaterial Master: Storage Location DataMATNR, WERKS, LGORTMM01, MM02, MM03
EKKOPurchasing Document HeaderEBELNME21N, ME23N
EKPOPurchasing Document ItemEBELN, EBELPME21N, ME23N

Sales and Distribution (SD)

TableDescriptionKey FieldsRelated T-Codes
VBAKSales Document: Header DataVBELNVA01, VA02, VA03
VBAPSales Document: Item DataVBELN, POSNRVA01, VA02, VA03
KNA1Customer Master: General DataKUNNRXD01, XD02, XD03
KNVVCustomer Master: Sales DataKUNNR, VKORG, VTWEG, SPARTXD01, XD02, XD03

Human Resources (HR)

TableDescriptionKey FieldsRelated T-Codes
PA0000HR Master Record: Infotype 0000 (Actions)PERNR, INFTY, ENDDA, BEGDAPA20, PA30, PA40
PA0001HR Master Record: Infotype 0001 (Org. Assignment)PERNR, INFTY, ENDDA, BEGDAPA20, PA30, PA40
PA0002HR Master Record: Infotype 0002 (Personal Data)PERNR, INFTY, ENDDA, BEGDAPA20, PA30, PA40
HRP1000HR Objects: Infotype 1000 (Object)PLVAR, OTYPE, OBJID, INFTY, ENDDA, BEGDAPP01, PPOM

Table Structure Components

SAP tables consist of several components:

Fields

Fields are the columns in a table that store specific data elements. Each field has:

  • Technical name (e.g., MATNR)
  • Data type (e.g., CHAR, NUMC, DEC)
  • Length
  • Associated data element

Keys

Keys uniquely identify records in a table:

  • Primary Key: Combination of fields that uniquely identifies a record
  • Foreign Key: Field(s) that reference the primary key of another table

Indexes

Indexes improve query performance by providing faster access paths to data:

  • Primary Index: Created automatically for the primary key
  • Secondary Indexes: Additional indexes created for frequently queried fields

Accessing Table Data

Several methods exist to access and manage table data:

Transactions

  • SE16: Data Browser
  • SE16N: Enhanced Data Browser
  • SE11: ABAP Dictionary Maintenance
  • SE14: Database Utility
  • SM30: Table Maintenance
  • SM31: Table Maintenance (New)

ABAP Programs

Tables can be accessed programmatically using:

  • SELECT statements
  • OPEN SQL
  • Native SQL
  • Table maintenance generators

Table Relationships

Tables are often related to each other through key fields, creating:

  • One-to-one relationships
  • One-to-many relationships
  • Many-to-many relationships (typically using junction tables)

Understanding these relationships is crucial for data modeling and reporting.

Best Practices for Working with Tables

  • Use standard SAP transactions for table maintenance when possible
  • Document custom tables thoroughly
  • Implement proper authorization checks for sensitive tables
  • Consider performance implications when querying large tables
  • Use appropriate buffering strategies for frequently accessed tables
  • Follow SAP naming conventions for custom tables (typically starting with 'Z' or 'Y')
Edit this page
Last Updated:: 4/12/25, 1:49 AM
Contributors: Taylor Brazelton
Prev
Transaction Codes (T-Codes)
Next
Function Modules