on 2023 Aug 09 10:41 AM
Hi Experts,
currently on a On Premise S/4HANA FPS03 System with a OData V4 Service and Fiori Elements.
I´d like to use feature to get Text through an association in RAP described here to use a text from a cds view association without integrating it directly in the consuming CDS View and using "@ObjectModel.text.element".
Only read access is necessary.
The other feature "Getting Language-Dependent Text in Projection Views" worked.
When i try to use to use the text through an association i get the error "text association _Text is not allowed" (error from /IWFND/ERROR_LOG error-xml-file-iwfnd-error-log.txt).
At first I thought it was the association, but after debugging it seems that all text associations trigger an error.
Here is my Text CDS View:
@EndUserText.label: 'Basic Interface View for Text'
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.dataCategory: #TEXT
@ObjectModel.representativeKey: 'KeyField'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.resultSet.sizeCategory: #XS
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
define view entity ZI_TEXT_VIEW
as select from ztexts
{
key keyfield as KeyField,
@Semantics.language: true
key spras as langu,
@Semantics.text: true
longtext as LongText
}
Here is the consuming abbreviated Interface View:
@AbapCatalog.viewEnhancementCategory: [#NONE]
@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Interface View'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
define view entity ZI_OTHER_VIEW
as select from zdata
association [1..*] to ZI_TEXT_VIEW as _Text on $projection.Key = _Text.KeyField
{
key guid as Guid,
@Consumption.valueHelpDefinition: [{ entity: {name: 'ZI_VALUE_HELP', element: 'Key'}}]
//@ObjectModel.text.association: '_Text'
key as Key,
_Text
}<br>
Here are my debugging results:
In the method CL_SADL_EC_PROJECTION_VIEW->CHECK will be the method "CHECK_NO_TEXT_ELEMS_W_TXT_ASSO" called from class CL_SADL_EC_COMMON_CHECKS.
In this method, any usage of the annotation "@ObjectModel.text.association" will result in an "RAISE EXCEPTION".
Did i miss something in the documentation why this is not allowed?
I could find some usage in other CDS View like "C_IT_TaxReturnBoxQuery", but i guess this is not in usage with RAP.
Same issue for me!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I faced the same issue. To resolve, I exposed the reference Text element in same projection view . Finally used @ObjectModel.text.element instead of @ObjectModel.text.assocation.
Hope that will resolve the issue. p.s. As per SAP Help documentation "You cannot combine text associations with projection scenarios."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.