on 09-24-2015 1:28 PM
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
and registered in GateWay HUB system, where the BSP application is deployed
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:
SEGW Project is ZMD_VENDOR for which I would like to create valuelist annotations for property Anred (Title)
I defined entity AddressTitle entity and AddressTitles entityset to be used in valuelist annotation
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
and valuelist annotation for property Anred (Title)
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
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.
Metadata of the annotation service seems fine:
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)
Metadata: Request entity with entity property Anred(Title) (expanded)
AddressTitle entity, with property Title (expanded)
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.
Hi Attila,
I have a similar problem with the annotations. I can't even generate the tags in the metadata because i don't see a third option when I create a gateway project. I only see 2:
This is my component:
Do you know why I don't see the third option and what can I do about it?
BTW, for your problem - I don't see the annotation sap:required-in-filter="true" in the property that you want to display. I think that you need that to be set in order for that property to be shown in the smartfilterbar control, beside the other annotation tags.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sashko,
you need to be on certain SP level(l'm on 7.4 SP11,a nd I've this option) to be able to create annotation projects of type 3 - Annotation model for referenced service. This type of project can be used however for projects created with type 2 - Service with vocalbulary-based annotations only. You can check the level on your systemis,after logon. In the top cascade menu: System->Status->Component version. I my case the above will never work, I need to copy my project of type 1 to 2.
Attila
Thanks for informing me of the SP levels Attila. I'll be sure to upgrade that since I'm on SP Level 0007.
Now should I create 2 projects as you did (one for annotations and another one for the model)?
Can you share the steps that you did in order to get the annotation tags in the metadata?
Thanks a lot!
Hi Sashko,
as far as I know, you need to create two separate projects only in case you want to reuse the annotation project of type 3 for more than one projects of type 2. If this is not the case, you can go ahead simply with a single project of type 2.
All what I did is on the screenshots. I tried to create the second project just because I was ready with my project of type 1, but unfortunately it is never gonna work.
Here are the guides. For implicit annotations:
For external annotations:
Attila
Hi Attila,
I saw what you guys talk about above,there are some questions on me.
First,I want to make sure does this annotation can be used in treetable or smarttable, or both? and is there any more material about how to use annotation for treetable in front-end? for example ,how can we set a field with Input or dropdown and other type....
Regards
Dangli
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dangli,
value list annotation should result creating the dropdown list by the smart field automatically. You can however overwrite the fieldtype displayed using configuration possibility of the smart field within the xml view. Putting the smart field into tree should work also, like in forms and lists do.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.