Monday, 6 January 2014

Creating a Table in SAP ABAP

Creating a Table in SAP ABAP

With the SAP GUI open, you will be able find the Data Dictionary in the SAP menu tree. This is done via the Tools menu. Open the ABAP Workbench and click the 'Development' folder, where the ABAP Dictionary can be found and double-clicked. Alternatively, use the transaction code SE11:
Now, the initial screen of the ABAP Dictionary will appear
Creating a Table in SAP ABAP

                 
To create a table, select the 'Database table' option. In this exercise a transparent table will be created. Other types of table do exist (such a cluster tables and pool tables), but at this early stage the transparent table variety is the important one to focus upon.
The table name must adhere to the customer-defined name space, meaning that the name must begin with the letter Z or Y, most commonly this will be Z. In this example, the table will show a list of employees within a company, so, in the 'Database table' area, type 'ZEMPLOYEES' and click the 'Create' button .  Once this is done, a new screen will appear
Creating a Table in SAP ABAP

                  
 Dictionary Main Table

  

In the 'Short text' field, a description for the table must be included, enter 'Employees':
Creating a Table in SAP ABAP

                     
In the 'Delivery and Maintenance' tab (which opens by default), look at the 'Delivery class' section, select the field and then click the drop-down button, where a list of Delivery classes will be shown and selected
Creating a Table in SAP ABAP

                 
For the table being created here, choose 'Application table', as the data held in the table fits the description 'master and transaction data'.
In the field below this, labelled 'Data Browser/Table View Maint.', choose the 'Display/Maintenance allowed' option, which will allow for data entry directly into the table later on. It should look like this
Creating a Table in SAP ABAP

Before going any further, click the 'Save' button   
A window appears titled 'Create Object Directory Entry'.
Nearly all development work done with SAP is usually done within a development environment, before being moved on to, for example, a quality assurance environment and on further to production. This window allows you to choose the appropriate Development class which is supported by other systems where the work may be moved on to. In this example scenario, though, developments will not be moved on to another system, so click 'Local object', so as to indicate to the system (via the phrase '$TMP' which appears) that the object is only to exist within the development system and not to be transported elsewhere. Once this is done, the status bar at the bottom will show that the object has been saved:
                     
Creating a Table in SAP ABAP


To check everything has worked as we want, select the 'Go to' menu and selects the 'Object directory entry' option, a similar pop-up box to the previous one will appear, where the 'Development class' field will show '$TMP', confirming this has been done correctly

No comments:

Post a Comment