Share on social networks!

Tables in SAP: We show you the types

What types of tables exist in SAP and what are their functions?

We mainly have three types of tables in SAP

  • Sorted table
  • Hash table
  • Standard table

Sorted table:

A table category of an internal table that is managed by a primary table index and is always sorted according to its primary table key. Sorting occurs according to the data type comparison rules of the key fields. The associated generic data type is sorted table.

Sorted tables are always stored correctly sorted by key. They also have a linear key, and, like standard tables, can be accessed using either the table index or the key. When the key is used, the response time is logarithmically related to the number of table entries, since the system uses a binary search. The key of a sorted table can be unique or non-unique, and you must specify UNIQUE or NON-UNIQUE in the table definition. Standard tables and sorted tables belong to the generic index group tables.

image

Hash table:

Hash tables are useful if you want to build and use an internal table that resembles a database table or to process large amounts of data.

Hash tables don't have an internal linear index. You can only access hash tables by specifying the key. The response time is constant, regardless of the number of table entries, because the lookup uses a hash algorithm. The key of a hash table must be unique, and you must specify UNIQUE in the table definition.

This table type is particularly suitable if you primarily want to use key access for table entries. Hash tables cannot be accessed using indexes. When using key access, the response time remains constant, regardless of the number of table entries. As with database tables, the key in a hash table is always unique.

Standard table

Tables in standard SAP have a linear index. You can access them using either the index or the key. If you use the key, the response time is linearly related to the number of table entries. The key of a standard table is always non-unique and cannot include any specification for uniqueness in the table definition.

SAP standard tables serve as the foundation for smooth business processes in this environment. As the core of system administration, they include essential system requirements and data, as well as confidential and business-critical information.

This type of table is particularly appropriate if you want to address individual table entries using the index. This is the fastest way to access table entries. The response time for accessing a standard table is linearly related to the number of table entries. If you need to use key access, standard tables are appropriate if you can populate and process the table in separate steps. For example, you can populate a standard table by adding records and then sorting it.

image

These are the three types of tables in SAP that you can use in a program. 

But identifying when to use one or the other requires a lot of experience to identify the best scenario. For now, you can work around any issues with the standard table.

SAP uses tables to store information, both parameterization and actual data. Tables contain one or more key fields and are linked to each other through common headers. In addition to standard tables, you can also create tables for your own use. SAP always recommends that the names begin with the letter Z.

The fastest way to access tables in SAP is through transaction SE16 (also the new Tx SE16N) Display Tables or SM30 Modify Tables (not recommended). Once you select the table you want to display, you can choose between viewing the field names or the technical SAP name. To do this, go to Options/User Parameters… and change the following option:

At the consulting level, it is always recommended NOT to modify anything standard, because you would lose SAP support. When changing tables that work in a standard way, we do not know the scope of the modification and it causes inconsistencies.

We show what a table of all the tables in SAP that we can have looks like and the fields that it shows us as an example.

Tables in SAP
Tables in SAP

In the next article, we'll show you the main SAP MM tables and how to locate them based on your search.

Discover our SAP training

Find out everything on our blog and train in SAP with our Sap S/4Hana Finance Official Certificate.

Leave a comment

EIP International Business School informs you that the data in this form will be processed by Mainjobs Internacional Educativa y Tecnológica, SAU as the party responsible for this website. The purpose of collecting and processing personal data is to manage your subscription to the newsletter as well as to send commercial information about the services of the data controller. The legitimacy is the explicit consent of the interested party. Data will not be transferred to third parties, except under legal obligation. You may exercise your rights of access, rectification, limitation and deletion of data at compliance@grupomainjobs.com, as well as the right to lodge a complaint with the supervisory authority. You can consult additional and detailed information on Data Protection in the Privacy Policy that you will find on our website.