In Public Cloud all of us are familiar with Key User Extensibility for extending custom fields in Standard apps /objects. With 2408 version, the new feature extension field wizard can be used to add extension fields to existing RAP business objects. The entire data model of the business object is extended, from the database table to the UI/API OData Service. This feature is available in development tenant and can be used from ADT.
- The Generator supports to create multiple fields at one go whereas in Key User Extensibility we need to add fields and enable them one by one
- First preference should be to Key User Extensibility only
Let’s have a look at quick demo
1. Open development tenant in Eclipse – ADT. Right click on the CDS view as shown below
2. Below screen is opened and let’s select Extension fields to add the fields
3. Click on the next button; it will open the screen to ask for the package. Give the package name.
4. Clicking on the next will open the screen where you can add your Custom fields. Click on add as shown below
5. Give the field name, label and data type and select the UI annotation as yes. Field gets added as shown below.
6. Now click on Add again to add the second field.
7. Once you have added both the required 2 fields below screen will show up. It will show both the fields along with 2 sections –
- Business Object Layer Extensions displays all objects with the extensions that you should generate within the business object layer (append structure, RAP business object CDS view entity extension, and so on).
- Business Service Layer Extensions contains all projection views with provider contract transactional_query which are typically used in OData services.
8. Click on the next; below screen will be displayed which will show all the objects that will get generated.
9. You can click on Service layer extension to see the code as shown below
10. Click on next will ask the TR number and provide the TR number as shown below.
11. Click on Finish and it will generate the objects.
12. Once the generation is finished you can check the below code that got generated
Same fields have been also been added in your Fiori app UX as well ; since the feature is just released in coming days we will come to know the actual usage based on scenarios.
How to find Scenarios which can be extended using Wizard:
- Since this feature has been released recently so far couldn’t find way to find all such scenarios at single place like we can find all Business Context for Key User Extensibility at single place.
- We can search in Eclipse under Released Objects->EXTEND_IN_CLOUD_DEVELOPMENT as per Finding Released APIs and Deprecated Objects | SAP Help Portal and identify them through the annotation "@AbapCatalog.extensibility.extensible: true".
No comments:
Post a Comment