So the next field we want to create is the SURNAME field, so key in SURNAME.
We don't want to make this a key field.
In the data element, let's create an element ZSURNAME.
We'll use forward navigation, so double click on ZSURNAME.
Choose Yes to save the table.
Choose Yes to create ZSURNAME as a data element, key in the short text.
I will just key in Surname Data Element.
We will create a brand new domain.
And we'll use forward navigation again.
So double click ZSURNAME.
Choose Yes to save the data element.
Assign it to the Local object.
Choose Yes to create the domain, and then key in some short text.
We're going to use a data type of character this time.
So it's the second one.
So use the dropdown, bring up the data types in the ABAP dictionary dropdown box.
Choose CHAR, which is a character string.
We want to set the number of characters to 40 and Output length to 40 as well.
Hit the Enter key to make sure everything is okay, and choose the Activate button.
Now, notice I haven't clicked the Save button first because when we click the Activate button
it will save the object for us.
Again, choose the $TMP development class.
Choose the object that we want to activate.
Choose ZSURNAME domain and check the status bar to make sure everything is activated correctly.
And if it does then press the F3 key or hit the Back button to go back to the data element.
Make sure that domain attributes have come through.
If we stay up here we can see Surname, CHAR, Length of 40.
Go to the Filed labels tab.
I'm going to enter Surname into every single field label.
Click Enter or press Enter.
Thelength is automatically filled, then activate your data element.
Your data element will be selected in the inactive objects window again so just click
the Continue button.
Then check the status bar along the bottom to make sure everything is activated correctly.
In this case it does.
So again we'll press the F3 key to step back and we can see Surname data element and domain
attributes have been brought through into our table entry.
The next field we want to create is FORENAME and we'll choose ZFORENAME for our data element.
Double click the data element to create the object.
Click Yes to save the table, Yes to create the data element.
Enter some short text for the FORENAME data element.
In this case I'm choosing Forename Data Element.
For the Domain, enter ZFORENAME.
Double click the domain.
Choose Yes to save the data element.
Assign it to the Local object development class.
Choose Yes to create the domain.
Enter some short text for the domain.
Then similar to the Surname field we created we're going to choose a character data type,
CHAR, the length of 40 and an output length of 40.
Now activate the object.
Assign it to the local development class.
Make sure your object is selected in the inactive objects window and choose the Continue button
to activate the domain.
And when activated successfully press the Back button to go back to the data element.
Ensure that domain properties have come through which we still have in this case.
And now going to the field label, I'm now going to enter the word Forename into all
four field labels.
Press Enter to automatically fill in the length of each field label, and then click the Activate
button.
Select your data element in the inactive objects window and click the Continue button.
Check the status bar.
Everything has been activated successfully, so press the F3 key to step back to see our
table.
And again we see the data element and domain properties have come through for these fields
so we know everything is working correctly.
The next field we're going to enter is one called TITLE.
We'll create a data element called ZTITLE.
Double click the data element using forward navigation to create it.
Choose Yes to save the table.
Yes to create the data element.
Enter some short text for the title, I'm choosing Title Data Element.
In the domain, I can create a brand new domain called ZTITLE.
Double click it using forward navigation to create it.
Choose Yes to save the data element.
Assign it to the local object.
Yes to create the domain.
Fill in the short text.
I'll enter the word Title.
In Data type, we want to use CHAR string again.
But this time choose a length of 15 and an output length of 15 also.
Activate the domain.
Assign it to the local development class.
Ensure your domain is highlighted in the inactive objects window.
Click the continue button.
Once everything is activated press the F3 key to step back to the data element.
Click on the Field label and enter the word Title into each field label.
Press enter to automatically fill in the length of each Field label field then activate your
data element.
Once again select the object in the objects inactive window and click the continue button.
Once everything is activated successfully press the F3 key to step back to view your
table.