Authorisations When writing programs using open SQL, one has to bear in mind the concepts of authorisation in an SAP system. An SAP system has its own security tools to ensure that users can only access data which they are authorised to see. This includes individual fields as well as individual records. The way authorisations […]
This is last video covering SAP Table Creation. You can watch the previous video here: Create A SAP Table Part 3. Watch that video first.
Field: Date Of Birth
The last final field that we’re going to create is ‘Date of Birth’. Create data element ‘ZDOB’. Use forward navigation to create it, saving the table along the way and choosing ‘Yes’ to create the data element. Enter ‘Date of Birth Data Element’ for the short text.
For the Domain, once again enter ZDOB and use forward navigation to create the domain and choose ‘Yes’ to save the data element. Assign it to the ‘local object’ and choose ‘Yes’ to create the domain. Enter ‘Date of Birth’ in the short text field.
Now, for the Data Type, ‘date of birth’ is a date field so we want to choose the appropriate date field from the drop-down box. Press the F4 key to bring up the drop-down box and choose the entry that says ‘DATS’. Press the enter key and you can see an information box has popped up just to tell us the attributes of the DATS field have been assigned to this domain.
This is a continuation of the previous video here: Create A SAP Table Part 2. Watch that video first.
In this article we’re going to continue creating our first data table. In the previous article, we went through every single step to create our first field data element and domain. Now we’re going to continue creating the four additional fields but a little bit faster.
The next field we want to create is the SURNAME field by keying in the word SURNAME. We don’t want to make this a key field, so do not check the box.
Under Data element, let’s create an element called ZSURNAME. We will do this by using forward navigation. To do so, just double-click on ZSURNAME. A pop-up window should come up. Choose Yes to save the table. Then choose Yes to create ZSURNAME as a data element when prompted by another pop-up window. Next, key in the Short text field with the text Surname Data Element.
We will create a brand new domain. We’ll use forward navigation again. Double click ZSURNAME. Choose Yes to save the data element when prompted. Assign it to the Local object development class. Choose Yes to create the domain. Then key in SURNAME in the Short text field.
This is a continuation of the previous video here: Create A SAP Table Part 1. Watch that video first.
Next we will take a quick peep at the Value range tab. Now this tab is all about setting valid value ranges for the domain that you are creating. If you set a value range and the user enters a value in a field outside the valid value range that you set up, they will be shown an error message and be requested to enter a valid entry.
There are three options to choose from when creating value ranges.
- The first is ‘Single Values’ – This is where you actually enter a list of individual valid values that a user can enter.
- The next is ‘Intervals’ – If you have many values but they are all related or in a sequence you can enter the lower limit and the upper limit for each range. For example, a lower limit of 1, an upper limit of 9, and that saves you entering 9 individual single values. This ensures a user can only enter a value that falls within the ranges that you specify.
- The last option you have is ‘Value table’ – When you have a large number of possible entries it is quite common to use a Value Table instead of a value range or list of single values. With a value table, you specify a complete valid value table entry list. But please note that if you use this option you must also introduce Foreign Keys to your table to ensure the user’s entries are tested against the values stored in the value table that you create.
In this lesson we are going to start creating our first SAP table. With your SAP GUI open and logged in, the first thing we’re going to do is find the Data Dictionary in the SAP menu.
Expand the Tools menu and choose the ABAP Workbench. Under the Development option you will see SE11 – ABAP Dictionary. Double click it, and you’ll then be presented with the first screen for the ABAP Dictionary.
Let’s go through the different options that we see on the screen.
- The first one we see is Database tables. This is where we can enter an existing table name and view the technical components of any SAP table.
- Then we have Views. A View is similar to a table but it does not contain data. It brings together fields from 1 or more other tables by defining relationships between fields of these tables.
- Then we have Data types. Data types are what can make up our database tables, and we’ll have a look at those soon.
- The other options available are Type groups, Domains, Search help and Lock objects.
Let’s focus on creating a table, first of all. So, what we want to do is click on the Database table option and we will focus on creating a transparent table. There are other types of tables such as Cluster Tables and Pool Tables, but you don’t need to concern yourself with those just now.
When you create a transparent table you need to ensure the table name adheres to the customer-defined name space. This means we need to start our tables with the letter Z or the letter Y. Most commonly, you’ll see the letter Z being used.
Welcome to the next module in this Beginners Guide to ABAP. In this module, we’re going to focus specifically on the Data Dictionary. The Data Dictionary (Transaction Code SE11) is the main tool that we use to look at, understand, and enhance the database and database tables that are used by our SAP system. We […]