Here are the steps required to create a table in SAP ABAP.
Step 1: Go to transaction SE11 and input a table name.
Step 2: Involves setting up attributes for the table
Step 3: Enter the fields/column names for the table
Step 4: Maintain Technical Settings
Steps to Create an Index for the Tables
Understanding ABAP Data Dictionaries
Data definitions also called as metadata are managed and created in the ABAP Dictionary. It allows maintaining a huge volume of data without data redundancy. The ABAP Dictionary describes the logical structure of all the dictionary objects used in Application development. It also provides you with the flexibility of accessing the data on the screen and allows you to maintain manage and create without any programmers intervention.
The data dictionaries can be categorized into the following.
- Database table
- Data types
- Search Help
- Lock Objects
Tables can be defined independently in the database in the ABAP Dictionary. The fields of the table are defined together with their data types and lengths.
A table definition has the following components:
A View is a logical representation of tables. This is just a way of organizing the data by combining more than one table by comparing the common fields which are called a join.
It’s an attribute to tell as to what kind of data is it going to hold like numbers, characters, integers etc. A data type can be an elementary data type or a reference data type.
A domain contains the technical attributes of the data type. Like the length, the actual data type ( like char, integer), The output characteristics and the value range which tells us as to what kind of data can be accepted as a valid input.
A Domain describes the value range of a field and is assigned to a data element. All fields that use the data element will have the value range of the domain. The value range is defined by specifying the type and length of the domain. Fixed value intervals can also be defined for the domain and are automatically used as check values on screen entries.
A Data element describes the business meaning of a domain. Information about the meaning of a field such as its label is assigned to the data element and is accessible from all screen fields that use the data element.
A search help is simply what you see in SAP when you key in the F4 button. It provides you with the list/range of values. A search help can be categorized into three types:
- Elementary Search help
- Collective Search Help
- Append Search Help
A lock object is the virtual link of a sap table which is used to synchronize the data when more than one user attempts to write to the Database table. These lock objects are called and handled inside the program based on the requirement.
What is a Logical Database?
A Logical Database is a special data-retrieval program delivered by SAP, with its own dynamic Selection Screens. You need to code only the processing logic (GET, CHECK, etc., statements). The logical database consists of a reading program in which the structure of the local database is reproduced with a selection screen.
- Check functions to validate that user input is complete and correct.
- Meaningful data selection.
- Central authorization checks for database accesses.
- Excellent read access performance while retaining the hierarchical data view determined by the application logic.
SAP stores the content in tables (Every data except start and stop logs are stored in the DATABASE, no prog/ no data is available in the file system)
There are four different types of table buffering options as specified by SAP. SAP stores the content in tables and buffering defines how the data is accessed.
1. FULL Buffering
2. Generic Buffering
3. Single Record Buffering
4. No Buffering
Table Buffering Options
The tables which are frequently used and rarely modified are eligible for buffering. (Also which are small in size)
Eg: T000 have all the clients and required to create a client copy. (This is fully buffered)
Tables which are relatively large, frequently used, rarely modified using a set of keys (Fields)
Eg: USR02; T001 Company info
Single Record Buffering:
The tables which are large in size, frequently used and rarely modified are buffered using a primary key.
The tables which are large frequently used, and frequently modified are not eligible for buffering. for example: VBAK (SALES), EKKO (PURCHASE)
Keep learning abap tutorials.