2020 Jun 08 4:06 AM - edited 2024 Feb 04 12:04 AM
Hi SAP Folks,
Is there any reason while creating custom CDS view sometimes associations are not added and you receive a warning association not added.
In my case i am creating a Custom CDS view - Scenario Analytical as Cube i have selected all relevant fields from primary CDS view but when i activate i see warning association not available. Am i doing something wrong while selecting fields ? Please guide if any one knows possible reason behind this.
Thanks
VIvek Singh
This is a common scenario while preparing analytical query using your custom CDS View. In order to avoid the warning you can check mark the association itself. for example for currency check mark _Currency Association(screen shot attached). As you must have realized, this should not stop you from publishing your view.
please find the KB article articulating some rules to know while creating Analytical Queries.
https://launchpad.support.sap.com/#/notes/2657021
Thank you!
Amith Nair
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vivek,
You should not be selecting any fields inside the association, but just the association alone. For example, you select the field WorkPackage and then its association _WorkPackage. Please dont select any other field inside an association as this could impact the cardinality of the result set.
Hi @Amith Nair / @vivek,
I am getting issue like below. What would be the root cause? "Association of field STOTYPE ignored: Association for field PURCHASINGDOCUMENTCATEGORY is inconsistent [Analytics]"
Basic data type of STOType is same as PurchasingDocumentType.
Defined association as below in analytical view
@Analytics.dataCategory: #CUBE
association [0..1] to I_PurchasingDocumentType as _PODocType on $projection.PurchasingDocumentCategory = _PODocType.PurchasingDocumentCategory and
$projection.STOType = _PODocType.PurchasingDocumentType
{
...
PurchasingDocumentCategory,
@ObjectModel.foreignKey.association: '_PODocType'
STOType,
_PODocType,
...
}
User | Count |
---|---|
98 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.