Skip to content

Commit dca04a9

Browse files
Merge pull request #2622 from julieplummer20:main
Main
2 parents b9117a2 + da04537 commit dca04a9

File tree

1 file changed

+73
-77
lines changed

1 file changed

+73
-77
lines changed

tutorials/abap-environment-rap100-generate-ui-service/abap-environment-rap100-generate-ui-service.md

Lines changed: 73 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,82 @@ A Travel entity defines general travel data, such as the agency ID or customer I
106106
6. Save ![save icon](adt_save.png) and activate ![activate icon](adt_activate.png) the changes.
107107
108108
109+
### Generate transactional UI services
109110
110111
111-
### Create data generator class
112+
Create your OData v4 based UI services with the built-in ADT generator.
113+
The generated business service will be transactional, draft-enabled, and enriched with UI semantics for the generation of the Fiori elements app.
114+
115+
116+
1. Right-click your database table ![table](adt_tabl.png) **`ZRAP100_ATRAV###`** and select **Generate ABAP Repository Objects** from the context menu.
117+
118+
2. Maintain the required information (`###` is your group ID) and click **Next >**:
119+
- Description: **`Travel App ###`**
120+
- Generator: **`ABAP RESTful Application Programming Model: UI Service`**
121+
122+
![class](generate.png)
123+
124+
| **Generator: Cloud System** | **Generator: On Premise System** |
125+
|:----------------------------------------------------------------------------- |:-------------------------------------- |
126+
|1. Select **OData UI Service** and click **Next >**. ![table](newgenerator2.png) |1. Provide a description, select **ABAP RESTful Application Programming Model: UI Service** and click **Next >**. ![table](generatorxx1.png) |
127+
|2. Click **Next >**. ![table](newgenerator3.png) | |
128+
112129
130+
3. Maintain the required information on the **Configure Generator** dialog to provide the name of your data model and generate them.
131+
132+
133+
For that, navigate through the wizard tree **(Business Objects, Data Model, etc...)**, maintain the artefact names provided in the table below,
134+
and press **Next >**.
135+
136+
Verify the maintained entries and press **Next >** to confirm. The needed artifacts will be generated.
137+
138+
>**About Naming Conventions**
139+
The main aspects of the naming conventions of SAP S/4HANA's Virtual Data Model (VDM) are used in this exercise.
140+
More information on VDM can be found on the SAP Help portal: Here.
141+
142+
>**Attention**
143+
Please make sure to replace all the name proposals in the wizard with the names provided below.
144+
Doing this is important to ensure the correctness of the code snippets provided in the following exercises.
145+
146+
147+
| **RAP Layer** | **Artefacts** | **Artefact Names** |
148+
|----------------------------------------|---------------------------------|---------------------------------------------------------------|
149+
| **Business Object** | | |
150+
| | **Data Model** | CDS Entity Name: **`ZRAP100_R_TRAVELTP_###`** |
151+
| | | CDS Entity Name Alias: **`Travel`** |
152+
| | **Behavior** | Implementation Behavior Class: **`ZRAP100_BP_TRAVELTP_###`** |
153+
| | | Draft Table Name: **`ZRAP100_DTRAV###`** |
154+
| **Service Projection** | **Service Projection Entity** | CDS Entity Name: **`ZRAP100_C_TRAVELTP_###`** |
155+
| | **Service Projection Behavior** | Behavior Implementation Class: **`ZRAP100_BP_C_TRAVELTP_###`**|
156+
| **Business Service** | | |
157+
| | **Service Definition** | Service Definition Name: **`ZRAP100_UI_TRAVEL_###`** |
158+
| | **Service Binding** | Service Binding Name: **`ZRAP100_UI_TRAVEL_O4_###`** |
159+
| | | Binding Type: **`OData V4 - UI`** |
160+
161+
![class](new0x.png)
162+
163+
164+
4. Go to the **Project Explorer**, select your package ![package](adt_package.png) **`ZRAP100_###`**, refresh it by pressing **F5**, and check all generated ABAP repository objects
165+
166+
![class](newx.png)
167+
168+
Below is a brief explanation of the generated artefacts for the different RAP layers: Base BO, BO Projection, and Business Service.
169+
170+
**Base Business Object (BO) `ZRAP100_I_TRAVEL_###`**
171+
172+
![class](tb2.png)
173+
174+
**BO Projection `ZRAP100_C_TRAVEL_###`**
175+
176+
The BO projection represents the consumption specific view on the BO data model and behavior.
177+
178+
![class](tb3.png)
179+
180+
**Business Service**
181+
182+
![class](tb4.png)
183+
184+
### Create data generator class
113185
114186
Create an ABAP class![class](adt_class.png) to generate demo **travel** data.
115187
@@ -198,82 +270,6 @@ Create an ABAP class![class](adt_class.png) to generate demo **travel** data.
198270
![class](p5.png)
199271
200272
201-
### Generate transactional UI services
202-
203-
204-
Create your OData v4 based UI services with the built-in ADT generator.
205-
The generated business service will be transactional, draft-enabled, and enriched with UI semantics for the generation of the Fiori elements app.
206-
207-
208-
1. Right-click your database table ![table](adt_tabl.png) **`ZRAP100_ATRAV###`** and select **Generate ABAP Repository Objects** from the context menu.
209-
210-
2. Maintain the required information (`###` is your group ID) and click **Next >**:
211-
- Description: **`Travel App ###`**
212-
- Generator: **`ABAP RESTful Application Programming Model: UI Service`**
213-
214-
![class](generate.png)
215-
216-
| **Generator: Cloud System** | **Generator: On Premise System** |
217-
|:----------------------------------------------------------------------------- |:-------------------------------------- |
218-
|1. Select **OData UI Service** and click **Next >**. ![table](newgenerator2.png) |1. Provide a description, select **ABAP RESTful Application Programming Model: UI Service** and click **Next >**. ![table](generatorxx1.png) |
219-
|2. Click **Next >**. ![table](newgenerator3.png) | |
220-
221-
222-
3. Maintain the required information on the **Configure Generator** dialog to provide the name of your data model and generate them.
223-
224-
225-
For that, navigate through the wizard tree **(Business Objects, Data Model, etc...)**, maintain the artefact names provided in the table below,
226-
and press **Next >**.
227-
228-
Verify the maintained entries and press **Next >** to confirm. The needed artifacts will be generated.
229-
230-
>**About Naming Conventions**
231-
The main aspects of the naming conventions of SAP S/4HANA's Virtual Data Model (VDM) are used in this exercise.
232-
More information on VDM can be found on the SAP Help portal: Here.
233-
234-
>**Attention**
235-
Please make sure to replace all the name proposals in the wizard with the names provided below.
236-
Doing this is important to ensure the correctness of the code snippets provided in the following exercises.
237-
238-
239-
| **RAP Layer** | **Artefacts** | **Artefact Names** |
240-
|----------------------------------------|---------------------------------|---------------------------------------------------------------|
241-
| **Business Object** | | |
242-
| | **Data Model** | CDS Entity Name: **`ZRAP100_R_TRAVELTP_###`** |
243-
| | | CDS Entity Name Alias: **`Travel`** |
244-
| | **Behavior** | Implementation Behavior Class: **`ZRAP100_BP_TRAVELTP_###`** |
245-
| | | Draft Table Name: **`ZRAP100_DTRAV###`** |
246-
| **Service Projection** | **Service Projection Entity** | CDS Entity Name: **`ZRAP100_C_TRAVELTP_###`** |
247-
| | **Service Projection Behavior** | Behavior Implementation Class: **`ZRAP100_BP_C_TRAVELTP_###`**|
248-
| **Business Service** | | |
249-
| | **Service Definition** | Service Definition Name: **`ZRAP100_UI_TRAVEL_###`** |
250-
| | **Service Binding** | Service Binding Name: **`ZRAP100_UI_TRAVEL_O4_###`** |
251-
| | | Binding Type: **`OData V4 - UI`** |
252-
253-
![class](new0x.png)
254-
255-
256-
4. Go to the **Project Explorer**, select your package ![package](adt_package.png) **`ZRAP100_###`**, refresh it by pressing **F5**, and check all generated ABAP repository objects
257-
258-
![class](newx.png)
259-
260-
Below is a brief explanation of the generated artefacts for the different RAP layers: Base BO, BO Projection, and Business Service.
261-
262-
**Base Business Object (BO) `ZRAP100_I_TRAVEL_###`**
263-
264-
![class](tb2.png)
265-
266-
**BO Projection `ZRAP100_C_TRAVEL_###`**
267-
268-
The BO projection represents the consumption specific view on the BO data model and behavior.
269-
270-
![class](tb3.png)
271-
272-
**Business Service**
273-
274-
![class](tb4.png)
275-
276-
277273
### Preview travel app
278274
279275
>**Hint:** In **SAP S/4HANA on premise or private cloud systems** publishing the local service endpoint of your OData V4 service binding does not work from within ADT. Therefore you have to publish the service binding locally using transaction `/IWFND/V4_ADMIN` in these systems.

0 commit comments

Comments
 (0)