Ever faced a problem where you felt you have done everything right but after executing there was no O/P or a wrong O/P . You break your head checking out each and every step where you have gone wrong but end up finding nothing.In this blog I will discuss about such a problem I went through in the initial days of my career when creating a table...
First, I will start with the creation of a table in SAP. I think most of you are already aware of this. Guys, who are new to SAP ABAP. This is for you....
Go to TCode SE11(ABAP Dictionary)
Give your desired name starting with 'Z' or 'Y' for the name of the table and press on create.
Delivery and Maintainence Tab
In the short description, Give the description about what the table is about.
Coming to delivery class, it determines the table type and how the table behaves when it is first installed, at upgrade, when it is transported, and when a client copy is performed. Select a table type based on what table you are creating.
Data Browser/Table View Maintenance: Select the option on how your table need to be maintained . I have selected the option Display/maintenance allowed with restrictions.
Going to the Fields Tab.
Enter the name of the filed in the first column , should start with 'Z' or 'Y'.
If the field is the key field for the table, select the checkbox under the column'K'. This field becomes the primary key for the table. Only field with unique values should be selected.
Under the column Data Element, enter the name of the data element.The Data Element gives the field labels and documentation for the table field. In short , it gives you the schematic attributes of a field.
Enter the name of the data element and press enter. A status message gets displayed telling that the data element is not active. Double click on the name of the data element to create a new one.
Enter the short description about the data element, What you mention in the short text becomes the documentation for the field.
In the data type tab it asks for the domain name, enter a domain name for the particular field. A Domain contains the technical attributes of a particular field such as data type and length etc.
Goto the Field label tab, Enter the label for the field.
Goto the data type tab and double click on the domain name for creating a new domain.
Enter the data type (ex: char, number etc) for the particular field and also the max length of the field. After that check for any syntax errors and then activate the domain.
Go Back, Activate the Data Element. Repeat the same procedure for creating some more fields.
After entering all the required fields, save it.
Then go to the technical settings, located on the top right corner.
One of the mandatory steps in creation of table.It defines how the table will be handed when it is created in the DB, buffering part and whether changes to the table have to be logged or not.
Enter the short text for the technical settings.
Enter the Data Class. Whenever SAP is installed, the database is partitioned into multiple schemas. The data class defines in which schema the table has to be stored. Size Category specifies the initial amount of memory that needs to be allocated for database table.
Coming to the Buffering (I will be explaining about this part in detail in my future posts) part, Define the buffering that has to be done on the table if needed. If changes to the table have to be logged select the checkbox 'log data changes'.
Save and Activate the Technical settings and go back . Check for syntax erros and activate the table. You can ignore the warnings, go ahead and activate the table.
Now your table is ready. You can create entries into the table by the following path.
Utilities --> Table Contents --> Create Entries.
You can see that the "create entries" part is disabled. This was the problem I faced initially when I started with my first table. Everything was looking OK except that I was unable to create entries into my table.
Guess what could the reason be? Its a minor problem.
Awaiting you comments on what the reason could be... I will explaining the reason in my next post.