├── .abapgit.xml
├── LICENSE
├── README.md
├── docs
├── 2020-09-17 Live Coding.pptx
└── scenario.pptx
├── images
├── API_Business_Hub.png
├── API_Business_Hub_Product_01.png
├── API_Business_Hub_Product_02.png
├── BD_00.png
├── BI_00.png
├── MDE_00.png
├── MDE_01.png
├── RAP_overview.png
├── RAP_overview_0.png
├── SB_00.png
├── SB_01.png
├── SB_02.png
├── SD_00.png
├── cds_custom_01.png
├── cds_custom_02.png
├── cds_custom_03.png
├── cds_custom_04.png
├── cds_custom_05.png
├── cds_rating_00.png
├── cds_rating_01.png
├── cds_rating_02.png
├── comic.png
├── download_edmx.png
├── fiori_00.png
├── scenario (Small).png
├── scenario.png
├── stars_00.png
└── validation_00.png
└── src
├── package.devc.xml
├── yssc_livecoding.msag.xml
├── z_lc_products_999.srvd.srvdsrv
├── z_lc_products_999.srvd.xml
├── zbp_lc_i_prodrating_999.clas.abap
├── zbp_lc_i_prodrating_999.clas.locals_imp.abap
├── zbp_lc_i_prodrating_999.clas.xml
├── zcl_ce_lc_products_999.clas.abap
├── zcl_ce_lc_products_999.clas.xml
├── zlc_i_prodrating_999.bdef.asbdef
├── zlc_i_prodrating_999.bdef.xml
├── zlc_i_prodrating_999.ddls.asddls
├── zlc_i_prodrating_999.ddls.baseinfo
├── zlc_i_prodrating_999.ddls.xml
├── zlc_i_prodrating_999.ddlx.asddlxs
├── zlc_i_prodrating_999.ddlx.xml
├── zlc_i_productrating_999.srvd.srvdsrv
├── zlc_i_productrating_999.srvd.xml
├── zlc_prodd99.tabl.xml
├── zlc_prodrate_999.tabl.xml
├── zlc_productrating.srvb.xml
├── zz_ce_product.ddls.asddls
├── zz_ce_product.ddls.baseinfo
├── zz_ce_product.ddls.xml
├── zz_lc_a_product.bdef.asbdef
├── zz_lc_a_product.bdef.xml
├── zz_lc_a_product.ddls.asddls
├── zz_lc_a_product.ddls.baseinfo
└── zz_lc_a_product.ddls.xml
/.abapgit.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | E
6 | /src/
7 | PREFIX
8 |
9 | - /.gitignore
10 | - /LICENSE
11 | - /README.md
12 | - /package.json
13 | - /.travis.yml
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Sören Schlegel
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Live-Coding Session
2 |
3 | The aim of this Session, is to show how fast you can develop solutions with RAP and Steampunk, that would normally cost you days!
4 |
5 | - [Live-Coding Session](#live-coding-session)
6 | - [Our Scenario](#our-scenario)
7 | - [Intention](#intention)
8 | - [What's RAP](#whats-rap)
9 | - [Getting the Products](#getting-the-products)
10 | - [Create Table](#create-table)
11 | - [Create Business Object](#create-business-object)
12 | - [Create CDS Root View](#create-cds-root-view)
13 | - [Create Behavior Definition](#create-behavior-definition)
14 | - [Create Behavior Implementation](#create-behavior-implementation)
15 | - [Create the Service Definition](#create-the-service-definition)
16 | - [Create the Service Binding](#create-the-service-binding)
17 | - [Define Metadata-Annotations](#define-metadata-annotations)
18 | - [Consume OData-Service](#consume-odata-service)
19 | - [Get the Metadata](#get-the-metadata)
20 | - [Create OData Consumption Model](#create-odata-consumption-model)
21 | - [Create a Custom Entity](#create-a-custom-entity)
22 | - [Extend the CDS View](#extend-the-cds-view)
23 | - [Validate User-Input](#validate-user-input)
24 | - [Define Validation](#define-validation)
25 | - [Code to Check](#code-to-check)
26 | - [Beautify the UI](#beautify-the-ui)
27 | - [Build your first BO with RAP-Generator (optional)](#build-your-first-bo-with-rap-generator-optional)
28 |
29 | ## Our Scenario
30 |
31 | In a short time, we want to build a simple application, where a customer can rank a product. But to make it more exotic and show the strength of the cloud, our product list is not on the same system, but somewhere on an other system and has to be consumed via OData.
32 |
33 | .png)
34 |
35 | ## Intention
36 |
37 | The SAP technology stack has evolved in recent years and many developers and companies have been unable to keep up with the latest capabilities. Especially the latest versions offer a lot of tools and capabilities to be better than ever before - but a system upgrade also requires an upgrade of the employees' skillset to unleash the full power.
38 |
39 | 
40 | By [Andreas Gautsch](https://twitter.com/andreas_gautsch/status/1306320809623986177?s=20)
41 |
42 | ## What's RAP
43 |
44 | The ABAP RESTful Programming Model is the newest way and technology provided by SAP to create modern, RESTful applications with web based UIs - especially focused naturally on SAP UI5.
45 | Google delivers a lot of information on this technology by simply searching for "SAP RAP". Of course useful sources to get in touch with it, are as follows:
46 |
47 | - [Official documentation](https://help.sap.com/viewer/923180ddb98240829d935862025004d6/Cloud/en-US/289477a81eec4d4e84c0302fb6835035.html?q=abap%20restful%20programming)
48 | - [Blog Post by Sony Sukumar Kattoor as overview](https://blogs.sap.com/2019/05/23/sap-cloud-platform-abap-restful-programming-model-rap-for-beginners/)
49 | - [Almost every post by André Fischer](https://people.sap.com/andre.fischer)
50 | - [...and also Florian Wahl](https://people.sap.com/florian.wahl)
51 |
52 | In very short terms explained:
53 | In former days, SAP logic was encapsulated by Business Objects, build out of Function Modules and Function Groups. But without any consistency in naming and functionality, a lot of experience was needed to find the right FM for the right task - if one such even existed!
54 | Since S/4HANA, we have new **first class citizens** - and these are CDS Views! With Core Data Service Views, SAP invented a wrapper for a lot of Application Server Side logic. In former days hidden in Function Modules, programmed in ABAP and containing the knowledge how the data of a Business Object belong together - not very much "Code-Pushdown" as SAP preaches it since the first days of SAP HANA. All this changed with CDS, but these are Database **VIEWS** and as in every other database like Oracle or MS SQL, Views are read-only.
55 | Based on these CDS Views, SAP redesigns the existing Business Objects to make them also easily consumable via OData and by doing this, also for SAP UI5.
56 | 
57 |
58 | The foundation for a Business Object is now a CDS View (or a [CDS View Entity which is the successor for CDS Views with ABAP Platform 2020](https://blogs.sap.com/2020/09/02/a-new-generation-of-cds-views-cds-view-entities/)).
59 | These Views are connected to a Behavior Definition, which defines the possible actions and a Behavior Implementation, which implements the logic. Out of this, we define a Service Definition, which lists the exposed entities and at least, we enter our protocol we want to use, i.e. OData V2 or OData V4.
60 |
61 | 
62 |
63 | ## Getting the Products
64 |
65 | This example should be a demo on how to bring cloud and on-Prem together, so for this, we need another system to connect to. The easiest way is the demo system provided by SAP via the [SAP API Business Hub](https://api.sap.com/).
66 | Select on that page the SAP S/4HANA Cloud - perhaps an account registration before may be required for you.
67 |
68 | 
69 |
70 | On the next page we search for *product* and take a closer look, at the probably best fitting service according to description:
71 |
72 | 
73 |
74 | Here we find everything we need to get our product information. We can test the API Calls directly and also create Code Snippets for consuming this service in multiple, different programming languages.
75 |
76 | 
77 |
78 | ## Create Table
79 |
80 | At first step, we have to think about what we need for a simple product rating and create a database table based on these identified requirements.
81 |
82 | ```abap
83 | @EndUserText.label : 'Product-Rating'
84 | @AbapCatalog.enhancementCategory : #NOT_EXTENSIBLE
85 | @AbapCatalog.tableCategory : #TRANSPARENT
86 | @AbapCatalog.deliveryClass : #A
87 | @AbapCatalog.dataMaintenance : #RESTRICTED
88 | define table zlc_prodrate_999 {
89 | key client : abap.clnt not null;
90 | key rating_uuid : sysuuid_x16 not null;
91 | forename : abap.char(40);
92 | surname : abap.char(40);
93 | email : abap.char(60);
94 | product : abap.char(40);
95 | rating : abap.int1;
96 | }
97 | ```
98 |
99 | ## Create Business Object
100 |
101 | ### Create CDS Root View
102 |
103 | After creating the table, just right click it and select **New Data Definition** to create a CDS Root View, based on our Database.
104 |
105 | 
106 |
107 | The next steps are "as always":
108 |
109 | 
110 |
111 | 
112 |
113 | The result should look like this:
114 |
115 | ```abap
116 | @AccessControl.authorizationCheck: #CHECK
117 | @EndUserText.label: 'CDS-View for Product Rating'
118 | define root view entity ZLC_I_ProdRating_999
119 | as select from zlc_prodrate_999
120 | {
121 | //ZLC_PRODRATE_999
122 | key rating_uuid,
123 | forename,
124 | surname,
125 | email,
126 | product,
127 | rating
128 | // _association_name // Make association public
129 | }
130 | ```
131 |
132 | ### Create Behavior Definition
133 |
134 | Now, we need to make our BO "intelligent". To do this, we create a Behavior Definition - again with some wizard support via right click on the DDLS and selecting **New Behavior Definition**. For sure we'll use **Implementation Type: Managed** because we don't want to loose time with implementing all the coding by ourself.
135 |
136 | 
137 |
138 | We define a very simple one and with our next step, we'll implement the Behavior Implementation, which is currently commented out.
139 |
140 | ```abap
141 | managed; // implementation in class zbp_lc_i_prodrating_999 unique;
142 |
143 | define behavior for ZLC_I_ProdRating_999 alias prod_rating
144 | persistent table zlc_prodrate_999
145 | lock master
146 |
147 | {
148 | create;
149 | update;
150 | delete;
151 |
152 | field ( numbering : managed ) rating_uuid;
153 | }
154 | ```
155 |
156 | `field ( numbering : managed ) rating_uuid;` is needed, so that the GUIDs are created automatically and the developer doesn't need to care about :-) .
157 |
158 | ### Create Behavior Implementation
159 |
160 | And again, we use the wizard to create out Behavior Implementation and use the before suggested name.
161 |
162 | 
163 |
164 | Simple activating the Behavior Implementation is at the moment everything that needs to be done.
165 |
166 | After the creation of the implementation, we need to comment in the class name in the Behavior Definition.
167 |
168 | ```abap
169 | managed implementation in class zbp_lc_i_prodrating_999 unique;
170 | ```
171 |
172 | ### Create the Service Definition
173 |
174 | First time after a while, we don't have an ultra easy wizard :-( - but it's ok.
175 | Simple create a Service Definition by finding the right button in the context-menu.
176 |
177 | 
178 |
179 | The work is very easy: with the command `expose`, we describe what entities should be exposed to our service - well, Rocket-Science!
180 |
181 | ```abap
182 | @EndUserText.label: 'Service Definition for Product Rating'
183 | define service ZLC_I_ProductRating_999 {
184 | expose ZLC_I_ProdRating_999;
185 | }
186 | ```
187 |
188 | ### Create the Service Binding
189 |
190 | The complete logic is contained in the CDS View Entity and the corresponding Behavior Definition and Implementation.
191 | The Service Definition exposes all relevant and needed entities.
192 | The last open point to define, is how the data can be consumed - in detail: Which protocol?
193 | This is done via the Service Binding, and therefore, one has to be created.
194 |
195 | 
196 |
197 | A Service Binding brings a Service Definition and a protocol together and creates an Endpoint out of these information, for a later consumption by third party tools.
198 |
199 | 
200 |
201 | 
202 |
203 | Clicking the **Preview...**-Button opens a browser windows and shows a first preview of our App - not that sexy and not fully functional so far, because of the missing annotations.
204 |
205 | 
206 |
207 | ### Define Metadata-Annotations
208 |
209 | In this scenario, we use the capabilities of Fiori-Elements, but this is based on annotations and for this, we need to add them to our CDS Entity.
210 |
211 | In general, we have three possibilities:
212 |
213 | - Define them via UI-Tools like WebIDE in a separate Annotations.xml
214 | - Write them inline, directly into the used CDS View
215 | - Create a separate Metadata-Extension-Object (MDE) on ABAP-Level
216 |
217 | We will use the MDE - a little bit more work, but better to maintain in a bigger project.
218 |
219 | Right-Click on the CDS DDLS and select "New Metadata Extension" from context-menu.
220 |
221 | 
222 |
223 | We select the same name as for our CDS View - just make it simple.
224 |
225 | 
226 |
227 | Before we can start with the MDE, we first need to allow this on CDS level by adding the Annotation `@Metadata.allowExtensions: true`.
228 |
229 | Defining annotations is again a special snowflake, where a developer can invest a lot of time - in this example it is strapped down to a minimum!
230 |
231 | ```abap
232 | @Metadata.layer: #CUSTOMER
233 |
234 | @UI: {
235 | headerInfo: { typeName: 'Product Rating', typeNamePlural: 'Product Rating' } }
236 |
237 | @Search.searchable: true
238 | annotate view ZLC_I_ProdRating_999 with
239 | {
240 |
241 | @UI.facet: [ {
242 | id: 'idCollection',
243 | type: #COLLECTION,
244 | label: 'Product Rating',
245 | position: 10
246 | },
247 | {
248 | id: 'idIdentification',
249 | parentId: 'idCollection',
250 | type: #IDENTIFICATION_REFERENCE,
251 | label: 'General Information',
252 | position: 10
253 | } ]
254 |
255 | //ZLC_I_ProdRating_999
256 | @UI.hidden: false
257 | rating_uuid;
258 |
259 | @UI:{
260 | lineItem: [{
261 | position: 10,
262 | importance: #HIGH,
263 | type: #STANDARD,
264 | label: 'Käse'
265 | }],
266 | identification: [{
267 | position: 10,
268 | label: 'Forename'
269 | }]
270 | }
271 | @Search.defaultSearchElement: true
272 | forename;
273 |
274 | @UI:{
275 | lineItem: [{
276 | position: 20,
277 | importance: #HIGH,
278 | type: #STANDARD,
279 | label: 'Surname'
280 | }],
281 | identification: [{
282 | position: 20,
283 | label: 'Surname'
284 | }]
285 | }
286 | @Search.defaultSearchElement: true
287 | surname;
288 |
289 | @UI:{
290 | lineItem: [{
291 | position: 30,
292 | type: #STANDARD,
293 | label: 'E-Mail'
294 | }],
295 | identification: [{
296 | position: 30,
297 | label: 'E-Mail'
298 | }]
299 | }
300 | email;
301 |
302 | @UI:{
303 | lineItem: [{
304 | position: 40,
305 | type: #STANDARD,
306 | label: 'Product'
307 | }],
308 | identification: [{
309 | position: 40,
310 | label: 'Product'
311 | }]
312 | }
313 | product;
314 |
315 | @UI:{
316 | lineItem: [{
317 | position: 50,
318 | type: #STANDARD,
319 | label: 'Rating'
320 | }],
321 | identification: [{
322 | position: 50,
323 | label: 'Rating'
324 | }]
325 | }
326 | rating;
327 | }
328 | ```
329 |
330 | ## Consume OData-Service
331 |
332 | ### Get the Metadata
333 |
334 | For consumption of the products, we have to go back to [SAP API Business Hub](https://api.sap.com/) and our selected product-service. Click on [**Details**](https://api.sap.com/api/API_PRODUCT_SRV/overview) and then **Download API Specification** and select **EDMX** for Downloading the Service Metadata.
335 |
336 | 
337 |
338 | ### Create OData Consumption Model
339 |
340 | As the next step, we have to tell our development what to consume, by creating a Service Consumption Model.
341 |
342 | 
343 |
344 | In our case, we consume OData.
345 |
346 | 
347 |
348 | ...and for this, we need to upload our XML / EDMX.
349 |
350 | 
351 |
352 | From all the provided entities, we only need the products.
353 |
354 | 
355 |
356 | As a result, the wizard creates three objects.
357 |
358 | - Service Definition for exposing via some "Proxy"
359 | - A Data Definition for referencing to the Entity-Properties
360 | - And at last, the Behavior Definition - this is needed for the Service Definition
361 |
362 | 
363 |
364 | ## Create a Custom Entity
365 |
366 | First, we have to create a so called CDS Custom Entity. This is the coolest way, to combine CDS and classical ABAP.
367 | In the step before, the wizard created an abstract entity for us, where we find the complete definition of the product entity. We only need a subset of the fields.
368 |
369 | ```abap
370 | /********** GENERATED on 09/16/2020 at 11:34:37 by CB0000000122**************/
371 | @OData.entitySet.name: 'A_Product'
372 | @OData.entityType.name: 'A_ProductType'
373 | define root abstract entity ZZ_LC_A_PRODUCT {
374 | key Product : abap.char( 40 ) ;
375 | @Odata.property.valueControl: 'ProductType_vc'
376 | ProductType : abap.char( 4 ) ;
377 | ProductType_vc : RAP_CP_ODATA_VALUE_CONTROL ;
378 | @Odata.property.valueControl: 'CrossPlantStatus_vc'
379 | CrossPlantStatus : abap.char( 2 ) ;
380 | CrossPlantStatus_vc : RAP_CP_ODATA_VALUE_CONTROL ;
381 | @Odata.property.valueControl: 'CrossPlantStatusValidityDat_vc'
382 | CrossPlantStatusValidityDate : RAP_CP_ODATA_V2_EDM_DATETIME ;
383 | CrossPlantStatusValidityDat_vc : RAP_CP_ODATA_VALUE_CONTROL ;
384 | ...
385 | ```
386 |
387 | So once again: we create a CDS View, but this time with some other keywords:
388 | - `define custom entity` - yeah! As said: we want to create a custom entity
389 | - `@ObjectModel.query.implementedBy: 'ABAP:ZCL_CE_LC_PRODUCTS_999'` - the query and the logic, is implemented in the entered class
390 |
391 | ```abap
392 | @EndUserText.label: 'Custom Entity for Products'
393 | @ObjectModel.query.implementedBy: 'ABAP:ZCL_CE_LC_PRODUCTS_999'
394 | define custom entity ZZ_CE_Product
395 | {
396 | key Product : abap.char( 40 );
397 | @OData.property.valueControl : 'ProductType_vc'
398 | ProductType : abap.char( 4 );
399 | ProductType_vc : rap_cp_odata_value_control;
400 | @OData.property.valueControl : 'CrossPlantStatus_vc'
401 | CrossPlantStatus : abap.char( 2 );
402 | CrossPlantStatus_vc : rap_cp_odata_value_control;
403 | @OData.property.valueControl : 'CrossPlantStatusValidityDat_vc'
404 | CrossPlantStatusValidityDate : rap_cp_odata_v2_edm_datetime;
405 | CrossPlantStatusValidityDat_vc : rap_cp_odata_value_control;
406 | }
407 | ```
408 |
409 | This class has to be created afterwards, to get it to run. And this class needs to implement the interface `if_rap_query_provider`.
410 | Ok - here we have to implement some coding, which can be found in the GitHub-Repository in the class [`ZCL_CE_LC_PRODUCTS_999`](src/zcl_ce_lc_products_999.clas.abap).
411 |
412 | ## Extend the CDS View
413 |
414 | Now we have to bring both our entities together. This can be done via a simple adaption of our Product-Rating-View.
415 |
416 | ```abap
417 | @AccessControl.authorizationCheck: #CHECK
418 | @EndUserText.label: 'CDS-View for Product Rating'
419 | @Metadata.allowExtensions: true
420 | define root view entity ZLC_I_ProdRating_999
421 | as select from zlc_prodrate_999
422 | association [1] to zz_ce_product as _Product on _Product.Product = $projection.product
423 | {
424 | key rating_uuid,
425 | forename,
426 | surname,
427 | email,
428 | product,
429 | rating,
430 | _Product
431 | }
432 | ```
433 |
434 | And also our metadata has to be adapted, by defining the search help for product. Just add the following lines, right above the "product".
435 |
436 | ```abap
437 | @Consumption.valueHelpDefinition: [{
438 | entity: { name: 'ZZ_CE_PRODUCT',
439 | element: 'Product' } }]
440 | product;
441 | ```
442 |
443 | ## Validate User-Input
444 |
445 | For the moment, we simple write the values to the database, but in most use-cases, we have to expect wrong user inputs. As an example, we want to check for correct email-addresses.
446 | To handle this, we have multiple small steps to.
447 |
448 | ### Define Validation
449 |
450 | First step, is to define a validation in the Behavior Definition, by simple adding one line:
451 |
452 | ```abap
453 | validation check_email on save { field email; }
454 | ```
455 |
456 | By selecting the validation name and pressing `CTRL+F1` we see the power of Eclipse and the Quickfixes!
457 |
458 | 
459 |
460 | This creates a local handler class including method definitions in the Behavior Implementation.
461 |
462 | ### Code to Check
463 |
464 | Supported by the Quickfix, our Behavior Implementation looks now as follows, if you click on the tab "Local Types".
465 |
466 | ```abap
467 | CLASS lhc_prod_rating DEFINITION INHERITING FROM cl_abap_behavior_handler.
468 |
469 | PRIVATE SECTION.
470 |
471 | METHODS check_email FOR VALIDATE ON SAVE
472 | IMPORTING keys FOR prod_rating~check_email.
473 |
474 | ENDCLASS.
475 |
476 | CLASS lhc_prod_rating IMPLEMENTATION.
477 |
478 | METHOD check_email.
479 |
480 | ENDMETHOD.
481 |
482 | ENDCLASS.
483 | ```
484 |
485 | Nice feature, but sadly at the moment without any intelligence. We have to code something and this is the first time, we get in touch with [EML - the Entity-Manipulation-Language](https://help.sap.com/viewer/923180ddb98240829d935862025004d6/Cloud/en-US/af7782de6b9140e29a24eae607bf4138.html) (don't mix it up with "Enterprise Machine Learning"). This is our new Weapon, to access RAP created Business Objects :-) .
486 |
487 | So what do we have to do? Let's take a look at the coding and explain it afterwards.
488 |
489 | ```abap
490 | METHOD check_email.
491 |
492 | READ ENTITIES OF ZLC_I_ProdRating_999 IN LOCAL MODE
493 | ENTITY prod_rating
494 | FIELDS ( email )
495 | WITH CORRESPONDING #( keys )
496 | RESULT DATA(lt_ratings).
497 |
498 | LOOP AT lt_ratings INTO DATA(ls_rating).
499 |
500 | DATA(lo_regex) = NEW cl_abap_regex(
501 | pattern = '^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$'
502 | ignore_case = abap_true ).
503 |
504 |
505 | DATA(lo_matcher) = lo_regex->create_matcher( text = ls_rating-email ).
506 |
507 | IF lo_matcher->match( ) IS INITIAL.
508 |
509 | APPEND VALUE #( %key = ls_rating-%key ) TO failed-prod_rating.
510 |
511 | APPEND VALUE #( %key = ls_rating-%key
512 | %msg = new_message( id = 'YSSC_LIVECODING'
513 | number = '001'
514 | v1 = ls_rating-email
515 | severity = if_abap_behv_message=>severity-error )
516 | %element-email = if_abap_behv=>mk-on ) TO reported-prod_rating.
517 |
518 | ENDIF.
519 |
520 | ENDLOOP.
521 |
522 | ENDMETHOD.
523 | ```
524 |
525 | At the beginning, we see how to query a Business Object, via `READ ENTITIES OF` to read all the actual changed Entries.
526 |
527 | Then we check each entry via a REGEX (very powerful, but very hard to understand if you use once a year).
528 |
529 | If the mail-address doesn't match the regex, then we simple add the key of the entry to the error list and generate also an errormessage for the user in the frontend.
530 |
531 | ## Beautify the UI
532 |
533 | We have a nice Fiori UI but it can still beautified. This is a job for annotations.
534 |
535 | Let's make our rating look Amazon-like, be using stars instead of simple numbers.
536 |
537 | 
538 |
539 | This can be achieved with just some few lines of "Code" (no real code - just annotations!).
540 |
541 | In our MDE, we add some lines, to show the stars in the detailpage.
542 |
543 | ```abap
544 | @UI.facet: [ {
545 | id: 'idHeader',
546 | type: #DATAPOINT_REFERENCE,
547 | position: 10,
548 | purpose: #HEADER,
549 | targetQualifier: 'rating'
550 | },
551 | ```
552 |
553 | ...and also some annotations directly for the element:
554 |
555 | ```abap
556 | @UI:{
557 | lineItem: [{
558 | position: 50,
559 | type: #AS_DATAPOINT,
560 | label: 'Rating'
561 | }],
562 | identification: [{
563 | position: 50,
564 | type: #STANDARD,
565 | label: 'Rating [0-5]'
566 | }],
567 | dataPoint: {
568 | title: 'Product Rating',
569 | visualization: #RATING,
570 | targetValue: 5
571 | }
572 | }
573 | rating;
574 | ```
575 |
576 | The most important: We define `rating` as a `dataPoint` with information like targetValue and visualization Type.
577 |
578 | ## Build your first BO with RAP-Generator (optional)
579 |
580 | coming soon...
581 |
--------------------------------------------------------------------------------
/docs/2020-09-17 Live Coding.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/docs/2020-09-17 Live Coding.pptx
--------------------------------------------------------------------------------
/docs/scenario.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/docs/scenario.pptx
--------------------------------------------------------------------------------
/images/API_Business_Hub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/API_Business_Hub.png
--------------------------------------------------------------------------------
/images/API_Business_Hub_Product_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/API_Business_Hub_Product_01.png
--------------------------------------------------------------------------------
/images/API_Business_Hub_Product_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/API_Business_Hub_Product_02.png
--------------------------------------------------------------------------------
/images/BD_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/BD_00.png
--------------------------------------------------------------------------------
/images/BI_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/BI_00.png
--------------------------------------------------------------------------------
/images/MDE_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/MDE_00.png
--------------------------------------------------------------------------------
/images/MDE_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/MDE_01.png
--------------------------------------------------------------------------------
/images/RAP_overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/RAP_overview.png
--------------------------------------------------------------------------------
/images/RAP_overview_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/RAP_overview_0.png
--------------------------------------------------------------------------------
/images/SB_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/SB_00.png
--------------------------------------------------------------------------------
/images/SB_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/SB_01.png
--------------------------------------------------------------------------------
/images/SB_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/SB_02.png
--------------------------------------------------------------------------------
/images/SD_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/SD_00.png
--------------------------------------------------------------------------------
/images/cds_custom_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/cds_custom_01.png
--------------------------------------------------------------------------------
/images/cds_custom_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/cds_custom_02.png
--------------------------------------------------------------------------------
/images/cds_custom_03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/cds_custom_03.png
--------------------------------------------------------------------------------
/images/cds_custom_04.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/cds_custom_04.png
--------------------------------------------------------------------------------
/images/cds_custom_05.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/cds_custom_05.png
--------------------------------------------------------------------------------
/images/cds_rating_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/cds_rating_00.png
--------------------------------------------------------------------------------
/images/cds_rating_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/cds_rating_01.png
--------------------------------------------------------------------------------
/images/cds_rating_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/cds_rating_02.png
--------------------------------------------------------------------------------
/images/comic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/comic.png
--------------------------------------------------------------------------------
/images/download_edmx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/download_edmx.png
--------------------------------------------------------------------------------
/images/fiori_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/fiori_00.png
--------------------------------------------------------------------------------
/images/scenario (Small).png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/scenario (Small).png
--------------------------------------------------------------------------------
/images/scenario.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/scenario.png
--------------------------------------------------------------------------------
/images/stars_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/stars_00.png
--------------------------------------------------------------------------------
/images/validation_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/soschlegel/abap.livecoding/98e367c9df11228d5569456e898cf9c4132faae5/images/validation_00.png
--------------------------------------------------------------------------------
/src/package.devc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Live-Coding-Session
7 | X
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/yssc_livecoding.msag.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | YSSC_LIVECODING
7 | E
8 | Message-Class
9 |
10 |
11 |
12 | E
13 | YSSC_LIVECODING
14 | 001
15 | Email &1 is not valid
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/z_lc_products_999.srvd.srvdsrv:
--------------------------------------------------------------------------------
1 | @EndUserText.label: 'Z_LC_PRODUCTS_999'
2 | @OData.schema.name: 'API_PRODUCT_SRV'
3 | define service Z_LC_PRODUCTS_999 {
4 | expose ZZ_LC_A_PRODUCT;
5 | }
--------------------------------------------------------------------------------
/src/z_lc_products_999.srvd.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Z_LC_PRODUCTS_999
7 | SRVD/SRV
8 | Z_LC_PRODUCTS_999
9 | EN
10 |
11 | -
12 |
13 |
14 |
-
15 | etag
16 | 19710401000000001text/plain_r0TR2wlHZsfhgp9Fob8iH+qKBvQ=
17 |
18 |
19 |
20 | ./z_lc_products_999/source/main
21 | http://www.sap.com/adt/relations/source
22 | text/plain
23 | Source Content
24 |
25 | -
26 |
27 |
28 |
-
29 | etag
30 |
31 |
32 |
33 | ./z_lc_products_999/source/main
34 | http://www.sap.com/adt/relations/source
35 | text/html
36 | Source Content (HTML)
37 |
38 | -
39 | ./z_lc_products_999/source/main/versions
40 | http://www.sap.com/adt/relations/versions
41 | Historic versions
42 |
43 |
44 | EN
45 | ./z_lc_products_999/source/main
46 | ABAP_SOURCE
47 | 9
48 | Service consumption model
49 | S
50 | Service Definition
51 | 5
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/src/zbp_lc_i_prodrating_999.clas.abap:
--------------------------------------------------------------------------------
1 | CLASS zbp_lc_i_prodrating_999 DEFINITION PUBLIC ABSTRACT FINAL FOR BEHAVIOR OF zlc_i_prodrating_999.
2 | ENDCLASS.
3 |
4 | CLASS zbp_lc_i_prodrating_999 IMPLEMENTATION.
5 | ENDCLASS.
6 |
--------------------------------------------------------------------------------
/src/zbp_lc_i_prodrating_999.clas.locals_imp.abap:
--------------------------------------------------------------------------------
1 | CLASS lhc_prod_rating DEFINITION INHERITING FROM cl_abap_behavior_handler.
2 |
3 | PRIVATE SECTION.
4 |
5 | METHODS check_email FOR VALIDATE ON SAVE
6 | IMPORTING keys FOR prod_rating~check_email.
7 |
8 | METHODS get_features FOR FEATURES
9 | IMPORTING keys REQUEST requested_features FOR prod_rating RESULT result.
10 |
11 | ENDCLASS.
12 |
13 | CLASS lhc_prod_rating IMPLEMENTATION.
14 |
15 | METHOD check_email.
16 |
17 | READ ENTITIES OF ZLC_I_ProdRating_999 IN LOCAL MODE
18 | ENTITY prod_rating
19 | FIELDS ( email )
20 | WITH CORRESPONDING #( keys )
21 | RESULT DATA(lt_ratings).
22 |
23 | LOOP AT lt_ratings INTO DATA(ls_rating).
24 |
25 | DATA(lo_regex) = NEW cl_abap_regex(
26 | pattern = '^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$'
27 | ignore_case = abap_true ).
28 |
29 |
30 | DATA(lo_matcher) = lo_regex->create_matcher( text = ls_rating-email ).
31 |
32 | IF lo_matcher->match( ) IS INITIAL.
33 |
34 | APPEND VALUE #( %key = ls_rating-%key ) TO failed-prod_rating.
35 |
36 | APPEND VALUE #( %key = ls_rating-%key
37 | %msg = new_message( id = 'YSSC_LIVECODING'
38 | number = '001'
39 | v1 = ls_rating-email
40 | severity = if_abap_behv_message=>severity-error )
41 | %element-email = if_abap_behv=>mk-on ) TO reported-prod_rating.
42 |
43 | ENDIF.
44 |
45 | ENDLOOP.
46 |
47 | ENDMETHOD.
48 |
49 | METHOD get_features.
50 |
51 | ENDMETHOD.
52 |
53 | ENDCLASS.
54 |
--------------------------------------------------------------------------------
/src/zbp_lc_i_prodrating_999.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZBP_LC_I_PRODRATING_999
7 | E
8 | Behavior Implementation for ZLC_I_PRODRATING_999
9 | 06
10 | 1
11 | X
12 | X
13 | X
14 | ZLC_I_PRODRATING_999
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/zcl_ce_lc_products_999.clas.abap:
--------------------------------------------------------------------------------
1 | CLASS zcl_ce_lc_products_999 DEFINITION
2 | PUBLIC
3 | FINAL
4 | CREATE PUBLIC .
5 |
6 | PUBLIC SECTION.
7 | INTERFACES if_oo_adt_classrun.
8 | INTERFACES if_rap_query_provider.
9 |
10 | CONSTANTS:
11 | gc_url TYPE string VALUE 'https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/',
12 | gc_service_root TYPE string VALUE 'API_PRODUCT_SRV/'.
13 |
14 | TYPES t_product_range TYPE RANGE OF zz_lc_a_product-product.
15 | TYPES t_business_data TYPE TABLE OF zz_lc_a_product.
16 |
17 | METHODS:
18 | get_products
19 | IMPORTING
20 | it_filter_cond TYPE if_rap_query_filter=>tt_name_range_pairs OPTIONAL
21 | top TYPE i OPTIONAL
22 | skip TYPE i OPTIONAL
23 | EXPORTING
24 | et_business_data TYPE t_business_data
25 | RAISING
26 | /iwbep/cx_cp_remote
27 | /iwbep/cx_gateway
28 | cx_web_http_client_error
29 | cx_http_dest_provider_error.
30 |
31 |
32 | PROTECTED SECTION.
33 | PRIVATE SECTION.
34 | ENDCLASS.
35 |
36 |
37 |
38 | CLASS zcl_ce_lc_products_999 IMPLEMENTATION.
39 |
40 | METHOD get_products.
41 |
42 | DATA: lt_business_data TYPE TABLE OF zz_lc_a_product,
43 | lo_http_client TYPE REF TO if_web_http_client,
44 | lo_client_proxy TYPE REF TO /iwbep/if_cp_client_proxy,
45 | lo_request TYPE REF TO /iwbep/if_cp_request_read_list,
46 | lo_response TYPE REF TO /iwbep/if_cp_response_read_lst.
47 |
48 | DATA: lo_filter_factory TYPE REF TO /iwbep/if_cp_filter_factory,
49 | lo_filter_node_root TYPE REF TO /iwbep/if_cp_filter_node.
50 |
51 | TRY.
52 | " Create http client
53 | " Details depend on your connection settings
54 | lo_http_client = cl_web_http_client_manager=>create_by_http_destination(
55 | cl_http_destination_provider=>create_by_url(
56 | i_url = gc_url ) ).
57 |
58 | DATA(lo_http_request) = lo_http_client->get_http_request( ).
59 | lo_http_request->set_header_fields(
60 | VALUE #(
61 | ( name = 'Accept' value = 'application/json' )
62 | ( name = 'APIKey' value = 'XXX' )
63 | ) ).
64 |
65 |
66 | lo_client_proxy = cl_web_odata_client_factory=>create_v2_remote_proxy(
67 | EXPORTING
68 | iv_service_definition_name = 'Z_LC_PRODUCTS_999'
69 | io_http_client = lo_http_client
70 | iv_relative_service_root = gc_service_root ).
71 |
72 | " Navigate to the resource and create a request for the read operation
73 | lo_request = lo_client_proxy->create_resource_for_entity_set( 'A_PRODUCT' )->create_request_for_read( ).
74 |
75 |
76 |
77 | " Create the filter tree
78 | lo_filter_factory = lo_request->create_filter_factory( ).
79 |
80 |
81 | LOOP AT it_filter_cond INTO DATA(ls_filter_cond).
82 | DATA(lo_filter_node) = lo_filter_factory->create_by_range( iv_property_path = ls_filter_cond-name
83 | it_range = ls_filter_cond-range ).
84 |
85 | IF lo_filter_node_root IS INITIAL.
86 | lo_filter_node_root = lo_filter_node.
87 | ELSE.
88 | lo_filter_node_root = lo_filter_node_root->and( lo_filter_node ).
89 |
90 | ENDIF.
91 |
92 | ENDLOOP.
93 |
94 | IF lo_filter_node_root IS NOT INITIAL.
95 | lo_request->set_filter( lo_filter_node_root ).
96 | ENDIF.
97 |
98 |
99 |
100 | lo_request->set_top( 50 )->set_skip( 0 ).
101 |
102 | " Execute the request and retrieve the business data
103 | lo_response = lo_request->execute( ).
104 | lo_response->get_business_data( IMPORTING et_business_data = et_business_data ).
105 |
106 | CATCH /iwbep/cx_cp_remote INTO DATA(lx_remote).
107 | " Handle remote Exception
108 | " It contains details about the problems of your http(s) connection
109 |
110 | CATCH /iwbep/cx_gateway INTO DATA(lx_gateway).
111 | " Handle Exception
112 |
113 | ENDTRY.
114 |
115 | ENDMETHOD.
116 |
117 | METHOD if_oo_adt_classrun~main.
118 |
119 | DATA business_data TYPE TABLE OF zz_lc_a_product.
120 | DATA filter_conditions TYPE if_rap_query_filter=>tt_name_range_pairs .
121 | DATA ranges_table TYPE if_rap_query_filter=>tt_range_option .
122 | ranges_table = VALUE #( ( sign = 'I' option = 'CP' low = '*AVC*' ) ).
123 | filter_conditions = VALUE #( ( name = 'PRODUCT' range = ranges_table ) ).
124 |
125 | TRY.
126 | get_products(
127 | EXPORTING
128 | it_filter_cond = filter_conditions
129 | top = 3
130 | skip = 1
131 | IMPORTING
132 | et_business_data = business_data
133 | ) .
134 | out->write( business_data ).
135 |
136 | CATCH cx_root INTO DATA(exception).
137 |
138 | out->write( cl_message_helper=>get_latest_t100_exception( exception )->if_message~get_longtext( ) ).
139 |
140 | ENDTRY.
141 |
142 | ENDMETHOD.
143 |
144 | METHOD if_rap_query_provider~select.
145 |
146 | DATA lt_business_data TYPE TABLE OF zz_lc_a_product.
147 | DATA(lv_top) = io_request->get_paging( )->get_page_size( ).
148 | DATA(lv_skip) = io_request->get_paging( )->get_offset( ).
149 | DATA(lt_fields) = io_request->get_requested_elements( ).
150 | DATA(lt_sort) = io_request->get_sort_elements( ).
151 |
152 | TRY.
153 | DATA(lt_filter_cond) = io_request->get_filter( )->get_as_ranges( ).
154 |
155 | get_products(
156 | EXPORTING
157 | it_filter_cond = lt_filter_cond
158 | top = CONV i( lv_top )
159 | skip = CONV i( lv_skip )
160 | IMPORTING
161 | et_business_data = lt_business_data
162 | ) .
163 |
164 | io_response->set_total_number_of_records( lines( lt_business_data ) ).
165 | io_response->set_data( lt_business_data ).
166 |
167 | CATCH cx_root INTO DATA(lx_root).
168 | DATA(exception_message) = cl_message_helper=>get_latest_t100_exception( lx_root )->if_message~get_longtext( ).
169 | ENDTRY.
170 |
171 |
172 | ENDMETHOD.
173 |
174 | ENDCLASS.
175 |
--------------------------------------------------------------------------------
/src/zcl_ce_lc_products_999.clas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZCL_CE_LC_PRODUCTS_999
7 | E
8 | Call the Service localy
9 | 1
10 | X
11 | X
12 | X
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/zlc_i_prodrating_999.bdef.asbdef:
--------------------------------------------------------------------------------
1 | managed implementation in class zbp_lc_i_prodrating_999 unique;
2 | with draft;
3 |
4 | define behavior for ZLC_I_ProdRating_999 alias prod_rating
5 | persistent table zlc_prodrate_999
6 | lock master total etag LastChangedAt
7 | draft table zlc_prodd99
8 |
9 | {
10 |
11 | field ( numbering : managed, readonly ) rating_uuid;
12 | field ( readonly ) LastChangedAt;
13 | field ( mandatory ) email;
14 | field ( mandatory : create ) product;
15 | create;
16 | update;
17 | delete;
18 |
19 | validation check_email on save { field email; }
20 |
21 | mapping for zlc_prodrate_999
22 | {
23 | LastChangedAt = lastchangedat;
24 | }
25 |
26 |
27 |
28 | }
--------------------------------------------------------------------------------
/src/zlc_i_prodrating_999.bdef.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZLC_I_PRODRATING_999
7 | BDEF/BDO
8 | Behavior for ZLC_I_PRODRATING_999
9 | 60
10 | EN
11 |
12 | -
13 | ./zlc_i_prodrating_999/source/main
14 | http://www.sap.com/adt/relations/source
15 | text/plain
16 | Source Content
17 |
18 | -
19 | ./zlc_i_prodrating_999/source/main
20 | http://www.sap.com/adt/relations/source
21 | text/html
22 | Source Content (HTML)
23 |
24 | -
25 | ./zlc_i_prodrating_999/source/main/versions
26 | http://www.sap.com/adt/relations/versions
27 | Historic versions
28 |
29 | -
30 | ./zlc_i_prodrating_999/objectstructure
31 | http://www.sap.com/adt/relations/objectstructure
32 | Object Structure
33 |
34 | -
35 | /sap/bc/adt/vit/wb/object_type/bdefbdo/object_name/ZLC_I_PRODRATING_999
36 | self
37 | application/vnd.sap.sapgui
38 | Representation in SAP GUI
39 |
40 |
41 | EN
42 | ./zlc_i_prodrating_999/source/main
43 | ABAP_SOURCE
44 | true
45 | true
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/zlc_i_prodrating_999.ddls.asddls:
--------------------------------------------------------------------------------
1 | @AccessControl.authorizationCheck: #CHECK
2 | @EndUserText.label: 'CDS-View for Product Rating'
3 | @Metadata.allowExtensions: true
4 | define root view entity ZLC_I_ProdRating_999
5 | as select from zlc_prodrate_999
6 | association [1] to zz_ce_product as _Product on _Product.Product = $projection.product
7 | {
8 | key rating_uuid,
9 | forename,
10 | surname,
11 | email,
12 | product,
13 | rating,
14 | lastchangedat as LastChangedAt,
15 | _Product
16 | }
17 |
--------------------------------------------------------------------------------
/src/zlc_i_prodrating_999.ddls.baseinfo:
--------------------------------------------------------------------------------
1 | {
2 | "BASEINFO":
3 | {
4 | "FROM":
5 | [
6 | "ZLC_PRODRATE_999"
7 | ],
8 | "ASSOCIATED":
9 | [
10 | "ZZ_CE_PRODUCT"
11 | ],
12 | "BASE":
13 | [],
14 | "ANNO_REF":
15 | [],
16 | "VERSION":0
17 | }
18 | }
--------------------------------------------------------------------------------
/src/zlc_i_prodrating_999.ddls.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZLC_I_PRODRATING_999
7 | E
8 | CDS-View for Product Rating
9 | W
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/zlc_i_prodrating_999.ddlx.asddlxs:
--------------------------------------------------------------------------------
1 | @Metadata.layer: #CUSTOMER
2 |
3 | @UI: {
4 | headerInfo: { typeName: 'Product Rating', typeNamePlural: 'Product Rating' } }
5 |
6 | @Search.searchable: true
7 | annotate view ZLC_I_ProdRating_999 with
8 | {
9 |
10 | @UI.facet: [ {
11 | id: 'idHeader',
12 | type: #DATAPOINT_REFERENCE,
13 | position: 10,
14 | purpose: #HEADER,
15 | targetQualifier: 'rating'
16 | },
17 | {
18 | id: 'idCollection',
19 | type: #COLLECTION,
20 | label: 'Product Rating',
21 | position: 10
22 | },
23 | {
24 | id: 'idIdentification',
25 | parentId: 'idCollection',
26 | type: #IDENTIFICATION_REFERENCE,
27 | label: 'General Information',
28 | position: 10
29 | } ]
30 |
31 | //ZLC_I_ProdRating_999
32 | @UI.hidden: false
33 | rating_uuid;
34 |
35 | @UI:{
36 | lineItem: [{
37 | position: 10,
38 | importance: #HIGH,
39 | type: #STANDARD,
40 | label: 'Käse'
41 | }],
42 | identification: [{
43 | position: 10,
44 | label: 'Forename'
45 | }]
46 | }
47 | @Search.defaultSearchElement: true
48 | forename;
49 |
50 | @UI:{
51 | lineItem: [{
52 | position: 20,
53 | importance: #HIGH,
54 | type: #STANDARD,
55 | label: 'Surname'
56 | }],
57 | identification: [{
58 | position: 20,
59 | label: 'Surname'
60 | }]
61 | }
62 | @Search.defaultSearchElement: true
63 | surname;
64 |
65 | @UI:{
66 | lineItem: [{
67 | position: 30,
68 | type: #STANDARD,
69 | label: 'E-Mail'
70 | }],
71 | identification: [{
72 | position: 30,
73 | label: 'E-Mail'
74 | }]
75 | }
76 | email;
77 |
78 | @UI:{
79 | lineItem: [{
80 | position: 40,
81 | type: #STANDARD,
82 | label: 'Product'
83 | }],
84 | identification: [{
85 | position: 40,
86 | label: 'Product'
87 | }]
88 | }
89 | @Consumption.valueHelpDefinition: [{
90 | entity: { name: 'ZZ_CE_PRODUCT',
91 | element: 'Product' } }]
92 | product;
93 |
94 | @UI:{
95 | lineItem: [{
96 | position: 50,
97 | type: #AS_DATAPOINT,
98 | label: 'Rating'
99 | }],
100 | identification: [{
101 | position: 50,
102 | type: #STANDARD,
103 | label: 'Rating [0-5]'
104 | }],
105 | dataPoint: {
106 | title: 'Product Rating',
107 | visualization: #RATING,
108 | targetValue: 5
109 | }
110 | }
111 | rating;
112 | }
--------------------------------------------------------------------------------
/src/zlc_i_prodrating_999.ddlx.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ZLC_I_PRODRATING_999
8 | Metadata-Extension for Product Rating
9 | EN
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/zlc_i_productrating_999.srvd.srvdsrv:
--------------------------------------------------------------------------------
1 | @EndUserText.label: 'Service Definition for Product Rating'
2 | define service ZLC_I_ProductRating_999 {
3 | expose ZLC_I_ProdRating_999;
4 | expose ZZ_CE_Product;
5 | }
--------------------------------------------------------------------------------
/src/zlc_i_productrating_999.srvd.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZLC_I_PRODUCTRATING_999
7 | SRVD/SRV
8 | Service Definition for Product Rating
9 | EN
10 |
11 | -
12 |
13 |
14 |
-
15 | etag
16 | 19710401000000001text/plain_/QccNUeGfbyUh0cILKo+/dXJ7gI=
17 |
18 |
19 |
20 | ./zlc_i_productrating_999/source/main
21 | http://www.sap.com/adt/relations/source
22 | text/plain
23 | Source Content
24 |
25 | -
26 |
27 |
28 |
-
29 | etag
30 |
31 |
32 |
33 | ./zlc_i_productrating_999/source/main
34 | http://www.sap.com/adt/relations/source
35 | text/html
36 | Source Content (HTML)
37 |
38 | -
39 | ./zlc_i_productrating_999/source/main/versions
40 | http://www.sap.com/adt/relations/versions
41 | Historic versions
42 |
43 |
44 | EN
45 | ./zlc_i_productrating_999/source/main
46 | ABAP_SOURCE
47 | ABAP Development Tools
48 | S
49 | Service Definition
50 | 5
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/zlc_prodd99.tabl.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZLC_PRODD99
7 | E
8 | TRANSP
9 | X
10 | X
11 | Draft table for entity ZLC_I_PRODRATING_999
12 | E
13 | A
14 | 4
15 |
16 |
17 | ZLC_PRODD99
18 | A
19 | 4
20 | APPL1
21 | N
22 |
23 |
24 |
25 | ZLC_PRODD99
26 | MANDT
27 | 0001
28 | X
29 | MANDT
30 | 0
31 | X
32 | E
33 |
34 |
35 | ZLC_PRODD99
36 | RATING_UUID
37 | 0002
38 | X
39 | SYSUUID_X16
40 | 0
41 | X
42 | E
43 |
44 |
45 | ZLC_PRODD99
46 | FORENAME
47 | E
48 | 0003
49 | 0
50 | C
51 | 000080
52 | CHAR
53 | 000040
54 | CHAR
55 |
56 |
57 | ZLC_PRODD99
58 | SURNAME
59 | E
60 | 0004
61 | 0
62 | C
63 | 000080
64 | CHAR
65 | 000040
66 | CHAR
67 |
68 |
69 | ZLC_PRODD99
70 | EMAIL
71 | E
72 | 0005
73 | 0
74 | C
75 | 000120
76 | CHAR
77 | 000060
78 | CHAR
79 |
80 |
81 | ZLC_PRODD99
82 | PRODUCT
83 | E
84 | 0006
85 | 0
86 | C
87 | 000080
88 | CHAR
89 | 000040
90 | CHAR
91 |
92 |
93 | ZLC_PRODD99
94 | RATING
95 | E
96 | 0007
97 | 0
98 | X
99 | 000001
100 | INT1
101 | 000003
102 | INT1
103 |
104 |
105 | ZLC_PRODD99
106 | LASTCHANGEDAT
107 | 0008
108 | TIMESTAMPL
109 | 0
110 | E
111 |
112 |
113 | ZLC_PRODD99
114 | .INCLUDE
115 | E
116 | 0009
117 | 0
118 | SYCH_BDL_DRAFT_ADMIN_INC
119 | S
120 | Standard Include for Draft Administration (BDL Syntax Check)
121 | S
122 | %ADMIN
123 |
124 |
125 |
126 |
127 |
128 |
--------------------------------------------------------------------------------
/src/zlc_prodrate_999.tabl.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZLC_PRODRATE_999
7 | E
8 | TRANSP
9 | X
10 | Product-Rating
11 | E
12 | A
13 | 1
14 |
15 |
16 | ZLC_PRODRATE_999
17 | A
18 | 0
19 | APPL0
20 | N
21 |
22 |
23 |
24 | ZLC_PRODRATE_999
25 | CLIENT
26 | E
27 | 0001
28 | X
29 | 0
30 | C
31 | 000006
32 | X
33 | CLNT
34 | 000003
35 | CLNT
36 |
37 |
38 | ZLC_PRODRATE_999
39 | RATING_UUID
40 | 0002
41 | X
42 | SYSUUID_X16
43 | 0
44 | X
45 | E
46 |
47 |
48 | ZLC_PRODRATE_999
49 | FORENAME
50 | E
51 | 0003
52 | 0
53 | C
54 | 000080
55 | CHAR
56 | 000040
57 | CHAR
58 |
59 |
60 | ZLC_PRODRATE_999
61 | SURNAME
62 | E
63 | 0004
64 | 0
65 | C
66 | 000080
67 | CHAR
68 | 000040
69 | CHAR
70 |
71 |
72 | ZLC_PRODRATE_999
73 | EMAIL
74 | E
75 | 0005
76 | 0
77 | C
78 | 000120
79 | CHAR
80 | 000060
81 | CHAR
82 |
83 |
84 | ZLC_PRODRATE_999
85 | PRODUCT
86 | E
87 | 0006
88 | 0
89 | C
90 | 000080
91 | CHAR
92 | 000040
93 | CHAR
94 |
95 |
96 | ZLC_PRODRATE_999
97 | RATING
98 | E
99 | 0007
100 | 0
101 | X
102 | 000001
103 | INT1
104 | 000003
105 | INT1
106 |
107 |
108 | ZLC_PRODRATE_999
109 | CREATEDBY
110 | 0008
111 | SYUNAME
112 | 0
113 | E
114 |
115 |
116 | ZLC_PRODRATE_999
117 | CREATEDAT
118 | 0009
119 | TIMESTAMPL
120 | 0
121 | E
122 |
123 |
124 | ZLC_PRODRATE_999
125 | LASTCHANGEDBY
126 | 0010
127 | SYUNAME
128 | 0
129 | E
130 |
131 |
132 | ZLC_PRODRATE_999
133 | LASTCHANGEDAT
134 | 0011
135 | TIMESTAMPL
136 | 0
137 | E
138 |
139 |
140 |
141 |
142 |
143 |
--------------------------------------------------------------------------------
/src/zlc_productrating.srvb.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ZLC_PRODUCTRATING
8 | SRVB/SVB
9 | Service Binding for Product Rating
10 | EN
11 |
12 | -
13 | /sap/bc/adt/businessservices/odatav2/ZLC_PRODUCTRATING
14 | http://www.sap.com/categories/odatav2
15 | application/vnd.sap.adt.businessservices.odatav2.v2+xml
16 | ODATAV2
17 |
18 | -
19 | /sap/bc/adt/businessservices/testclass
20 | http://www.sap.com/categories/testclass
21 | application/vnd.sap.adt.businessservices.testclass.v1+xml
22 | TESTCLASS
23 |
24 |
25 | EN
26 |
27 |
28 |
29 | ZLC_PRODUCTRATING
30 |
31 | ODATA
32 | V2
33 |
34 | -
35 | ZLC_PRODUCTRATING
36 |
37 |
-
38 | 0001
39 |
40 | /sap/bc/adt/ddic/srvd/sources/zlc_i_productrating_999
41 | SRVD/SRV
42 | ZLC_I_PRODUCTRATING_999
43 |
44 |
45 |
46 |
47 |
48 |
49 | true
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/zz_ce_product.ddls.asddls:
--------------------------------------------------------------------------------
1 | @EndUserText.label: 'Custom Entity for Products'
2 | @ObjectModel.query.implementedBy: 'ABAP:ZCL_CE_LC_PRODUCTS_999'
3 | define custom entity ZZ_CE_Product
4 | {
5 | key Product : abap.char( 40 );
6 | @OData.property.valueControl : 'ProductType_vc'
7 | ProductType : abap.char( 4 );
8 | ProductType_vc : rap_cp_odata_value_control;
9 | @OData.property.valueControl : 'CrossPlantStatus_vc'
10 | CrossPlantStatus : abap.char( 2 );
11 | CrossPlantStatus_vc : rap_cp_odata_value_control;
12 | @OData.property.valueControl : 'CrossPlantStatusValidityDat_vc'
13 | CrossPlantStatusValidityDate : rap_cp_odata_v2_edm_datetime;
14 | CrossPlantStatusValidityDat_vc : rap_cp_odata_value_control;
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/zz_ce_product.ddls.baseinfo:
--------------------------------------------------------------------------------
1 | {
2 | "BASEINFO":
3 | {
4 | "FROM":
5 | [],
6 | "ASSOCIATED":
7 | [],
8 | "BASE":
9 | [],
10 | "ANNO_REF":
11 | [],
12 | "VERSION":0
13 | }
14 | }
--------------------------------------------------------------------------------
/src/zz_ce_product.ddls.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZZ_CE_PRODUCT
7 | E
8 | Custom Entity for Products
9 | Q
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/zz_lc_a_product.bdef.asbdef:
--------------------------------------------------------------------------------
1 | implementation abstract;
2 | define behavior for ZZ_LC_A_PRODUCT
3 | {
4 | create;
5 | update;
6 | }
--------------------------------------------------------------------------------
/src/zz_lc_a_product.bdef.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZZ_LC_A_PRODUCT
7 | BDEF/BDO
8 | SCM BD FOR DDLS
9 | 60
10 | EN
11 |
12 | -
13 | ./zz_lc_a_product/source/main
14 | http://www.sap.com/adt/relations/source
15 | text/plain
16 | Source Content
17 |
18 | -
19 | ./zz_lc_a_product/source/main
20 | http://www.sap.com/adt/relations/source
21 | text/html
22 | Source Content (HTML)
23 |
24 | -
25 | ./zz_lc_a_product/source/main/versions
26 | http://www.sap.com/adt/relations/versions
27 | Historic versions
28 |
29 | -
30 | ./zz_lc_a_product/objectstructure
31 | http://www.sap.com/adt/relations/objectstructure
32 | Object Structure
33 |
34 | -
35 | /sap/bc/adt/vit/wb/object_type/bdefbdo/object_name/ZZ_LC_A_PRODUCT
36 | self
37 | application/vnd.sap.sapgui
38 | Representation in SAP GUI
39 |
40 |
41 | EN
42 | ./zz_lc_a_product/source/main
43 | ABAP_SOURCE
44 | true
45 | true
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/src/zz_lc_a_product.ddls.asddls:
--------------------------------------------------------------------------------
1 | /********** GENERATED on 09/16/2020 at 11:34:37 by CB0000000122**************/
2 | @OData.entitySet.name: 'A_Product'
3 | @OData.entityType.name: 'A_ProductType'
4 | define root abstract entity ZZ_LC_A_PRODUCT {
5 | key Product : abap.char( 40 ) ;
6 | @Odata.property.valueControl: 'ProductType_vc'
7 | ProductType : abap.char( 4 ) ;
8 | ProductType_vc : RAP_CP_ODATA_VALUE_CONTROL ;
9 | @Odata.property.valueControl: 'CrossPlantStatus_vc'
10 | CrossPlantStatus : abap.char( 2 ) ;
11 | CrossPlantStatus_vc : RAP_CP_ODATA_VALUE_CONTROL ;
12 | @Odata.property.valueControl: 'CrossPlantStatusValidityDat_vc'
13 | CrossPlantStatusValidityDate : RAP_CP_ODATA_V2_EDM_DATETIME ;
14 | CrossPlantStatusValidityDat_vc : RAP_CP_ODATA_VALUE_CONTROL ;
15 | @Odata.property.valueControl: 'CreationDate_vc'
16 | CreationDate : RAP_CP_ODATA_V2_EDM_DATETIME ;
17 | CreationDate_vc : RAP_CP_ODATA_VALUE_CONTROL ;
18 | @Odata.property.valueControl: 'CreatedByUser_vc'
19 | CreatedByUser : abap.char( 12 ) ;
20 | CreatedByUser_vc : RAP_CP_ODATA_VALUE_CONTROL ;
21 | @Odata.property.valueControl: 'LastChangeDate_vc'
22 | LastChangeDate : RAP_CP_ODATA_V2_EDM_DATETIME ;
23 | LastChangeDate_vc : RAP_CP_ODATA_VALUE_CONTROL ;
24 | @Odata.property.valueControl: 'LastChangedByUser_vc'
25 | LastChangedByUser : abap.char( 12 ) ;
26 | LastChangedByUser_vc : RAP_CP_ODATA_VALUE_CONTROL ;
27 | @Odata.property.valueControl: 'LastChangeDateTime_vc'
28 | LastChangeDateTime : tzntstmpl ;
29 | LastChangeDateTime_vc : RAP_CP_ODATA_VALUE_CONTROL ;
30 | @Odata.property.valueControl: 'IsMarkedForDeletion_vc'
31 | IsMarkedForDeletion : abap_boolean ;
32 | IsMarkedForDeletion_vc : RAP_CP_ODATA_VALUE_CONTROL ;
33 | @Odata.property.valueControl: 'ProductOldID_vc'
34 | ProductOldID : abap.char( 40 ) ;
35 | ProductOldID_vc : RAP_CP_ODATA_VALUE_CONTROL ;
36 | @Odata.property.valueControl: 'GrossWeight_vc'
37 | @Semantics.quantity.unitOfMeasure: 'WeightUnit'
38 | GrossWeight : abap.dec( 13, 3 ) ;
39 | GrossWeight_vc : RAP_CP_ODATA_VALUE_CONTROL ;
40 | @Odata.property.valueControl: 'PurchaseOrderQuantityUnit_vc'
41 | PurchaseOrderQuantityUnit : abap.char( 3 ) ;
42 | PurchaseOrderQuantityUnit_vc : RAP_CP_ODATA_VALUE_CONTROL ;
43 | @Odata.property.valueControl: 'SourceOfSupply_vc'
44 | SourceOfSupply : abap.char( 1 ) ;
45 | SourceOfSupply_vc : RAP_CP_ODATA_VALUE_CONTROL ;
46 | @Odata.property.valueControl: 'WeightUnit_vc'
47 | @Semantics.unitOfMeasure: true
48 | WeightUnit : abap.unit( 3 ) ;
49 | WeightUnit_vc : RAP_CP_ODATA_VALUE_CONTROL ;
50 | @Odata.property.valueControl: 'NetWeight_vc'
51 | @Semantics.quantity.unitOfMeasure: 'WeightUnit'
52 | NetWeight : abap.dec( 13, 3 ) ;
53 | NetWeight_vc : RAP_CP_ODATA_VALUE_CONTROL ;
54 | @Odata.property.valueControl: 'CountryOfOrigin_vc'
55 | CountryOfOrigin : abap.char( 3 ) ;
56 | CountryOfOrigin_vc : RAP_CP_ODATA_VALUE_CONTROL ;
57 | @Odata.property.valueControl: 'CompetitorID_vc'
58 | CompetitorID : abap.char( 10 ) ;
59 | CompetitorID_vc : RAP_CP_ODATA_VALUE_CONTROL ;
60 | @Odata.property.valueControl: 'ProductGroup_vc'
61 | ProductGroup : abap.char( 9 ) ;
62 | ProductGroup_vc : RAP_CP_ODATA_VALUE_CONTROL ;
63 | @Odata.property.valueControl: 'BaseUnit_vc'
64 | BaseUnit : abap.char( 3 ) ;
65 | BaseUnit_vc : RAP_CP_ODATA_VALUE_CONTROL ;
66 | @Odata.property.valueControl: 'ItemCategoryGroup_vc'
67 | ItemCategoryGroup : abap.char( 4 ) ;
68 | ItemCategoryGroup_vc : RAP_CP_ODATA_VALUE_CONTROL ;
69 | @Odata.property.valueControl: 'ProductHierarchy_vc'
70 | ProductHierarchy : abap.char( 18 ) ;
71 | ProductHierarchy_vc : RAP_CP_ODATA_VALUE_CONTROL ;
72 | @Odata.property.valueControl: 'Division_vc'
73 | Division : abap.char( 2 ) ;
74 | Division_vc : RAP_CP_ODATA_VALUE_CONTROL ;
75 | @Odata.property.valueControl: 'VarblPurOrdUnitIsActive_vc'
76 | VarblPurOrdUnitIsActive : abap.char( 1 ) ;
77 | VarblPurOrdUnitIsActive_vc : RAP_CP_ODATA_VALUE_CONTROL ;
78 | @Odata.property.valueControl: 'VolumeUnit_vc'
79 | @Semantics.unitOfMeasure: true
80 | VolumeUnit : abap.unit( 3 ) ;
81 | VolumeUnit_vc : RAP_CP_ODATA_VALUE_CONTROL ;
82 | @Odata.property.valueControl: 'MaterialVolume_vc'
83 | @Semantics.quantity.unitOfMeasure: 'VolumeUnit'
84 | MaterialVolume : abap.dec( 13, 3 ) ;
85 | MaterialVolume_vc : RAP_CP_ODATA_VALUE_CONTROL ;
86 | @Odata.property.valueControl: 'ANPCode_vc'
87 | ANPCode : abap.numc( 9 ) ;
88 | ANPCode_vc : RAP_CP_ODATA_VALUE_CONTROL ;
89 | @Odata.property.valueControl: 'Brand_vc'
90 | Brand : abap.char( 4 ) ;
91 | Brand_vc : RAP_CP_ODATA_VALUE_CONTROL ;
92 | @Odata.property.valueControl: 'ProcurementRule_vc'
93 | ProcurementRule : abap.char( 1 ) ;
94 | ProcurementRule_vc : RAP_CP_ODATA_VALUE_CONTROL ;
95 | @Odata.property.valueControl: 'ValidityStartDate_vc'
96 | ValidityStartDate : RAP_CP_ODATA_V2_EDM_DATETIME ;
97 | ValidityStartDate_vc : RAP_CP_ODATA_VALUE_CONTROL ;
98 | @Odata.property.valueControl: 'LowLevelCode_vc'
99 | LowLevelCode : abap.char( 3 ) ;
100 | LowLevelCode_vc : RAP_CP_ODATA_VALUE_CONTROL ;
101 | @Odata.property.valueControl: 'ProdNoInGenProdInPrepackPro_vc'
102 | ProdNoInGenProdInPrepackProd : abap.char( 40 ) ;
103 | ProdNoInGenProdInPrepackPro_vc : RAP_CP_ODATA_VALUE_CONTROL ;
104 | @Odata.property.valueControl: 'SerialIdentifierAssgmtProfi_vc'
105 | SerialIdentifierAssgmtProfile : abap.char( 4 ) ;
106 | SerialIdentifierAssgmtProfi_vc : RAP_CP_ODATA_VALUE_CONTROL ;
107 | @Odata.property.valueControl: 'SizeOrDimensionText_vc'
108 | SizeOrDimensionText : abap.char( 32 ) ;
109 | SizeOrDimensionText_vc : RAP_CP_ODATA_VALUE_CONTROL ;
110 | @Odata.property.valueControl: 'IndustryStandardName_vc'
111 | IndustryStandardName : abap.char( 18 ) ;
112 | IndustryStandardName_vc : RAP_CP_ODATA_VALUE_CONTROL ;
113 | @Odata.property.valueControl: 'ProductStandardID_vc'
114 | ProductStandardID : abap.char( 18 ) ;
115 | ProductStandardID_vc : RAP_CP_ODATA_VALUE_CONTROL ;
116 | @Odata.property.valueControl: 'InternationalArticleNumberC_vc'
117 | InternationalArticleNumberCat : abap.char( 2 ) ;
118 | InternationalArticleNumberC_vc : RAP_CP_ODATA_VALUE_CONTROL ;
119 | @Odata.property.valueControl: 'ProductIsConfigurable_vc'
120 | ProductIsConfigurable : abap_boolean ;
121 | ProductIsConfigurable_vc : RAP_CP_ODATA_VALUE_CONTROL ;
122 | @Odata.property.valueControl: 'IsBatchManagementRequired_vc'
123 | IsBatchManagementRequired : abap_boolean ;
124 | IsBatchManagementRequired_vc : RAP_CP_ODATA_VALUE_CONTROL ;
125 | @Odata.property.valueControl: 'ExternalProductGroup_vc'
126 | ExternalProductGroup : abap.char( 18 ) ;
127 | ExternalProductGroup_vc : RAP_CP_ODATA_VALUE_CONTROL ;
128 | @Odata.property.valueControl: 'CrossPlantConfigurableProdu_vc'
129 | CrossPlantConfigurableProduct : abap.char( 40 ) ;
130 | CrossPlantConfigurableProdu_vc : RAP_CP_ODATA_VALUE_CONTROL ;
131 | @Odata.property.valueControl: 'SerialNoExplicitnessLevel_vc'
132 | SerialNoExplicitnessLevel : abap.char( 1 ) ;
133 | SerialNoExplicitnessLevel_vc : RAP_CP_ODATA_VALUE_CONTROL ;
134 | @Odata.property.valueControl: 'ProductManufacturerNumber_vc'
135 | ProductManufacturerNumber : abap.char( 40 ) ;
136 | ProductManufacturerNumber_vc : RAP_CP_ODATA_VALUE_CONTROL ;
137 | @Odata.property.valueControl: 'ManufacturerNumber_vc'
138 | ManufacturerNumber : abap.char( 10 ) ;
139 | ManufacturerNumber_vc : RAP_CP_ODATA_VALUE_CONTROL ;
140 | @Odata.property.valueControl: 'ManufacturerPartProfile_vc'
141 | ManufacturerPartProfile : abap.char( 4 ) ;
142 | ManufacturerPartProfile_vc : RAP_CP_ODATA_VALUE_CONTROL ;
143 | @Odata.property.valueControl: 'QltyMgmtInProcmtIsActive_vc'
144 | QltyMgmtInProcmtIsActive : abap_boolean ;
145 | QltyMgmtInProcmtIsActive_vc : RAP_CP_ODATA_VALUE_CONTROL ;
146 | @Odata.property.valueControl: 'IndustrySector_vc'
147 | IndustrySector : abap.char( 1 ) ;
148 | IndustrySector_vc : RAP_CP_ODATA_VALUE_CONTROL ;
149 | @Odata.property.valueControl: 'ChangeNumber_vc'
150 | ChangeNumber : abap.char( 12 ) ;
151 | ChangeNumber_vc : RAP_CP_ODATA_VALUE_CONTROL ;
152 | @Odata.property.valueControl: 'MaterialRevisionLevel_vc'
153 | MaterialRevisionLevel : abap.char( 2 ) ;
154 | MaterialRevisionLevel_vc : RAP_CP_ODATA_VALUE_CONTROL ;
155 | @Odata.property.valueControl: 'HandlingIndicator_vc'
156 | HandlingIndicator : abap.char( 4 ) ;
157 | HandlingIndicator_vc : RAP_CP_ODATA_VALUE_CONTROL ;
158 | @Odata.property.valueControl: 'WarehouseProductGroup_vc'
159 | WarehouseProductGroup : abap.char( 4 ) ;
160 | WarehouseProductGroup_vc : RAP_CP_ODATA_VALUE_CONTROL ;
161 | @Odata.property.valueControl: 'WarehouseStorageCondition_vc'
162 | WarehouseStorageCondition : abap.char( 2 ) ;
163 | WarehouseStorageCondition_vc : RAP_CP_ODATA_VALUE_CONTROL ;
164 | @Odata.property.valueControl: 'StandardHandlingUnitType_vc'
165 | StandardHandlingUnitType : abap.char( 4 ) ;
166 | StandardHandlingUnitType_vc : RAP_CP_ODATA_VALUE_CONTROL ;
167 | @Odata.property.valueControl: 'SerialNumberProfile_vc'
168 | SerialNumberProfile : abap.char( 4 ) ;
169 | SerialNumberProfile_vc : RAP_CP_ODATA_VALUE_CONTROL ;
170 | @Odata.property.valueControl: 'AdjustmentProfile_vc'
171 | AdjustmentProfile : abap.char( 3 ) ;
172 | AdjustmentProfile_vc : RAP_CP_ODATA_VALUE_CONTROL ;
173 | @Odata.property.valueControl: 'PreferredUnitOfMeasure_vc'
174 | PreferredUnitOfMeasure : abap.char( 3 ) ;
175 | PreferredUnitOfMeasure_vc : RAP_CP_ODATA_VALUE_CONTROL ;
176 | @Odata.property.valueControl: 'IsPilferable_vc'
177 | IsPilferable : abap_boolean ;
178 | IsPilferable_vc : RAP_CP_ODATA_VALUE_CONTROL ;
179 | @Odata.property.valueControl: 'IsRelevantForHzdsSubstances_vc'
180 | IsRelevantForHzdsSubstances : abap_boolean ;
181 | IsRelevantForHzdsSubstances_vc : RAP_CP_ODATA_VALUE_CONTROL ;
182 | @Odata.property.valueControl: 'QuarantinePeriod_vc'
183 | QuarantinePeriod : abap.dec( 3, 0 ) ;
184 | QuarantinePeriod_vc : RAP_CP_ODATA_VALUE_CONTROL ;
185 | @Odata.property.valueControl: 'TimeUnitForQuarantinePeriod_vc'
186 | TimeUnitForQuarantinePeriod : abap.char( 3 ) ;
187 | TimeUnitForQuarantinePeriod_vc : RAP_CP_ODATA_VALUE_CONTROL ;
188 | @Odata.property.valueControl: 'QualityInspectionGroup_vc'
189 | QualityInspectionGroup : abap.char( 4 ) ;
190 | QualityInspectionGroup_vc : RAP_CP_ODATA_VALUE_CONTROL ;
191 | @Odata.property.valueControl: 'AuthorizationGroup_vc'
192 | AuthorizationGroup : abap.char( 4 ) ;
193 | AuthorizationGroup_vc : RAP_CP_ODATA_VALUE_CONTROL ;
194 | @Odata.property.valueControl: 'HandlingUnitType_vc'
195 | HandlingUnitType : abap.char( 4 ) ;
196 | HandlingUnitType_vc : RAP_CP_ODATA_VALUE_CONTROL ;
197 | @Odata.property.valueControl: 'HasVariableTareWeight_vc'
198 | HasVariableTareWeight : abap_boolean ;
199 | HasVariableTareWeight_vc : RAP_CP_ODATA_VALUE_CONTROL ;
200 | @Odata.property.valueControl: 'MaximumPackagingLength_vc'
201 | @Semantics.quantity.unitOfMeasure: 'UnitForMaxPackagingDimensions'
202 | MaximumPackagingLength : abap.dec( 15, 3 ) ;
203 | MaximumPackagingLength_vc : RAP_CP_ODATA_VALUE_CONTROL ;
204 | @Odata.property.valueControl: 'MaximumPackagingWidth_vc'
205 | @Semantics.quantity.unitOfMeasure: 'UnitForMaxPackagingDimensions'
206 | MaximumPackagingWidth : abap.dec( 15, 3 ) ;
207 | MaximumPackagingWidth_vc : RAP_CP_ODATA_VALUE_CONTROL ;
208 | @Odata.property.valueControl: 'MaximumPackagingHeight_vc'
209 | @Semantics.quantity.unitOfMeasure: 'UnitForMaxPackagingDimensions'
210 | MaximumPackagingHeight : abap.dec( 15, 3 ) ;
211 | MaximumPackagingHeight_vc : RAP_CP_ODATA_VALUE_CONTROL ;
212 | @Odata.property.valueControl: 'UnitForMaxPackagingDimensio_vc'
213 | @Semantics.unitOfMeasure: true
214 | UnitForMaxPackagingDimensions : abap.unit( 3 ) ;
215 | UnitForMaxPackagingDimensio_vc : RAP_CP_ODATA_VALUE_CONTROL ;
216 |
217 | }
218 |
--------------------------------------------------------------------------------
/src/zz_lc_a_product.ddls.baseinfo:
--------------------------------------------------------------------------------
1 | {
2 | "BASEINFO":
3 | {
4 | "FROM":
5 | [],
6 | "ASSOCIATED":
7 | [],
8 | "BASE":
9 | [],
10 | "ANNO_REF":
11 | [],
12 | "VERSION":0
13 | }
14 | }
--------------------------------------------------------------------------------
/src/zz_lc_a_product.ddls.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ZZ_LC_A_PRODUCT
7 | E
8 | Service Consumption ZZ_LC_A_PRODUCT
9 | A
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------