You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/abap-dev-create-table/abap-dev-create-table.md
+8-13Lines changed: 8 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,15 @@ time: 75
11
11
12
12
## Prerequisites
13
13
- You have a valid instance of one of the following:
14
-
- SAP Business Technology Platform (BTP) ABAP Environment. For more information, see **Tutorial**: [Create Your First ABAP Console Application](abap-environment-console-application), steps 1-2. On this instance, you have pulled the SAP ABAP Flight Reference Scenario. To pull this reference scenario from `Github`, see [ Downloading the ABAP Flight Reference Scenario](https://help.sap.com/viewer/923180ddb98240829d935862025004d6/Cloud/en-US/def316685ad14033b051fc4b88db07c8.html)
15
-
- On-premise[SAP AS ABAP Platform 1909, developer edition in SAP Cloud Appliance Library (CAL)](https://cal.sap.com/subscription?sguid=7bd4548f-a95b-4ee9-910a-08c74b4f6c37)
14
+
- SAP Business Technology Platform (BTP) ABAP Environment. For more information, see **Tutorial**: [Create Your First ABAP Console Application](abap-environment-console-application), steps 1-2.
-**Tutorial**: [Create an ABAP Project in ABAP Development Tools (ADT)](abap-create-project)
17
-
17
+
- On this instance, you have pulled the SAP ABAP Flight Reference Scenario. To pull this reference scenario from `Github`, see [Downloading the ABAP Flight Reference Scenario](https://help.sap.com/viewer/923180ddb98240829d935862025004d6/Cloud/en-US/def316685ad14033b051fc4b88db07c8.html)
18
18
19
19
20
20
## You will learn
21
21
- How to create a table in ABAP, representing a table in your database
22
-
<!-- - How to create a reusable **domain**, which provides technical attributes for data elements-->
22
+
-How to create a reusable **domain**, which provides technical attributes for data elements
23
23
- How to create an elementary data type, or **data element**
24
24
- How to fill the table with three rows of test data
25
25
@@ -41,8 +41,6 @@ The table in this tutorial will store bank account details for customers. The ta
41
41
> Throughout this tutorial, replace `###` or `000` with your initials or group number.
42
42
43
43
44
-
---
45
-
46
44
### Create table
47
45
48
46
Create a table in your package:
@@ -79,7 +77,7 @@ There are 3 ways to create a field for a database table:
79
77
80
78
- Use an **existing data element**: The most powerful: A data element describes both the technical and semantic attributes of a field, such as a currency, or a customer name. You can define properties such as search help and (translatable) column header, and then use the same data element in many contexts. You often define the technical attributes of the data element in a domain, so they can be reused.
81
79
82
-
- Create a **new data element**: If you want to reuse the benefits of data elements - i.e. semantic attributes such as reuse of translatable column headers or a check table, but a suitable one does not exist yet.
80
+
- Create a **new data element**: If you want to reuse the benefits of a data element - that is, semantic attributes, such as reuse of translatable column headers - but a suitable one does not exist yet.
83
81
84
82
<!-- border -->
85
83

@@ -178,8 +176,6 @@ Now add the key field **`bank_name`**, based on a new data element, `z_bank_name
178
176
key client : abap.clnt not null;
179
177
key account_number : abap.numc(8) not null;
180
178
key bank_name : z_bank_name_###;
181
-
@AbapCatalog.foreignKey.keyType : #KEY
182
-
@AbapCatalog.foreignKey.screenCheck : false
183
179
bank_customer_id : /dmo/customer_id not null;
184
180
city : /dmo/city;
185
181
balance : abap.curr(16,2);
@@ -243,7 +239,7 @@ Before you activate the table, change the technical settings at the top as follo
243
239
244
240
245
241
### Save and activate table code
246
-
<!-- remove for key -->
242
+
247
243
Now, save (`Ctrl+S`) and activate (`Ctrl+F3`) your table. Your code should look like this:
248
244
249
245
```ABAP
@@ -255,8 +251,6 @@ Now, save (`Ctrl+S`) and activate (`Ctrl+F3`) your table. Your code should look
255
251
define table zaccounts_### {
256
252
key client : abap.clnt not null;
257
253
key account_number : abap.numc(8) not null;
258
-
@AbapCatalog.foreignKey.keyType : #KEY
259
-
@AbapCatalog.foreignKey.screenCheck : false
260
254
bank_customer_id : /dmo/customer_id not null
261
255
bank_name : z_bank_name_###;
262
256
city : /dmo/city;
@@ -286,7 +280,8 @@ Finally, you will fill the table with three rows of test data:
286
280
287
281
2. Enter a name **`ZCL_FILL_ACCOUNTS_###`** and description for your class (replacing `###` with your group number or initials).
0 commit comments