Database Tables in ABAP
Client-dependent and client-independent table in ABAP
In SAP, highest level of organization structure is client. Whenever we login to SAP system, we login to a specific client. Data in the R/3 system is categorized as client dependent and client-independent.
Client dependent table:
Client dependent tables are always client-specific. These cannot be accessed from any other client.. First column of any client-dependent table is always client (type MANDT) by default and it’s a primary key, this field contains the client no.
A client-dependent table may have different dataset for different clients.
Client independent table:
Client-independent table are cross-client i.e. independent of any client, so accessible from any other client and changes made in this table under one client, will be reflected in all the other clients. Hence, a client-independent table will always have same dataset for all clients.
Identifying the client dependent and independent tables:
Open the table DD02L in SE11 or SE16 and observe the field CLIDEP.
Type of Data Dictionary Tables:
- Transparent Table: One table in Data Dictionary will have a replica at database level called as transparent table. These tables are created by us.
- Pooled Table: Many small tables in Data Dictionary will be clubbed together into one table at database level called as pooled table. This is used to store customization data. These tables are provided by SAP.
- Cluster Table: Few large tables in Data Dictionary will be clubbed together into one table at database level called as cluster table. This is used to store primary key information. These tables are provided by SAP. Cluster tables cannot be buffered since they are very large tables.
Attributes in Table creation
- Delivery Class: This controls the transport of table data for installation, upgrade, client copy and when transporting between customer systems.
- Data browser / Table View Maintenance: Gives authorization to view, insert, update or delete rows of a table
- Technical Settings: are required to improve the performance while the application server is interfacing with physical database.
- Data class: Specifies in which physical area of the database should the table be stored
- Size Category: Specifies about the number of records, the table can probably hold.
- Domain: provides technical definition or attributes for a field. We cannot delete/change a domain that is being used by/assigned to data elements.
- Data element: provides semantic attributes for a field in a specific business context. We cannot delete/change a data element that is being used by/assigned to table fields.
Approaches for creating Tables
There are two approaches you can use when creating tables:
In the bottom-up approach, you can create the domains first, then the data elements, and then the table.
In the top-down approach, you can create the table first, and then create the data elements and domains as you go along.