Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3280

Value List annotation for Smart Fields

$
0
0

Hi Gurus,


I need a technical help to make the Value Help feature of Smart Field Control working: https://sapui5.hana.ondemand.com/#docs/guide/3361e270c62c46c9893eaefb2966d62e.html .

Implementation is done, but a small piece is missing in the backend,  what I could not identify, due lack of documentation. The annotations metadata is not returned by the backend system. So I need help to find the missing part in implementation of the valuelist annotation in SEGW for an entity property.

 

1. System environment

Service is implemented in ECC backend

01_ecc_sw.png

and registered in GateWay HUB system, where the BSP application is deployed

02_gw_sw.png

We have SAPUI5 libraries version 1.28.8-10 installed.

I’ve applied latest OSS Notes in both systems regarding annotations, and regenerated runtime objects.


2. Implementation

It consists of two parts:

  1. a.) base project: ZMD_VENDOR
  2. b.) vocabulary project: ZMD_VENDOR_ANNO

 

SEGW Project is ZMD_VENDOR for which I would like to create valuelist annotations for property Anred (Title)

03.png

I defined entity AddressTitle entity and AddressTitles entityset to be used in valuelist annotation

04.png


05.png


Since the project ZMD_VENDOR is of type Service with SAP Annotations, I had to create a new project ZMD_VENDOR_ANNO with type Annotation Model for Referenced service, importing vocabulary (/IWBEP/VOC_COMMON/com.sap.vocabularies.Common.v1), and service reference to ZECC_MD_VENDOR.

 

I set Text annotations for AddressTitle

06.png


and valuelist annotation for property Anred (Title)

07.png


08.png

09.png

After generation and service registration, I can see that now the annotation service is properly assigned to the base service in 

/IWBEP/REG_VOCAN - Maintain Vocabulary Annotations

10.png

I added the following code part to the base service model provider class extension to register the annotation model using its technical model name ZMD_VENDOR_ANNO_MDL.

11.png

12.png

Metadata of the annotation service seems fine:

13.png

The annotation model seems referenced in base service metadata,but the problem is (why the smart field on the UI is not showing valuehelp/dropdownlist), that the annotation tags and properties are missing in metadata xml below, for which I created the annotations in annotation project:

Metadata: (collapsed)

14.png

Metadata: Request entity with entity property Anred(Title) (expanded)

15.png

AddressTitle entity, with property Title (expanded)

16.png

Reason is unknown for the missing annotations. Anyone any idea or example on this.


Thank you!


P.S.:


Smart controls and OData annotations v4 are great, can reduce UI implementation costs, and keep logic in the backend, However documentation not really available on this concept, and about the framework, Do you have one ? I've tried to investigate examples, but there is only an sflight test annotation service and class in the backend. but this is annotation within the same model. Now I need to do external annotations.





Viewing all articles
Browse latest Browse all 3280

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>