on 09-08-2021 7:02 AM
Hi there,
We are trying to extend the analytical app F3143 (Monitor Scheduling Agreement Items) to include few additional fields on the report including a few new KPI fields. We also need to show the criticality of the KPI fields with icons on the report.
For this we extended the underlying CDS 'C_SchedgAgrmtItemMonitor' and applied the annotation for KPI field's criticality but for some strange reason, the Fiori elements annotations for criticality are not taking effect on the UI.
We made exactly similar extensions for its sister apps (namely, Monitor Purchase Contract Items - App ID 2423 and Monitor Purchase Order Items - App ID 2358), where we can see the output with custom KPI fields with criticality icons working perfectly.
We also raised an OSS ticket for this issue but after investigating the issue for a long time, the last response from SAP was to address this issue to the Developer Community. So, here we are!
CDS Extensions:
CDS 'C_SchedgAgrmtItemMonitor' Extension
@AbapCatalog.sqlViewAppendName: 'ZPU_XCSAIM'
@VDM.viewExtension: true
@EndUserText.label: 'View C_SchedgAgrmtItemMonitor Extension'
extend view C_SchedgAgrmtItemMonitor with ZPU_X_CSchdgAgrmtItmMntr
{
PurchasingDocumentItemCategory,
AccountAssignmentCategory,
// ... Some more custom fields
// Custom KPI Field 1
@EndUserText.label: 'Validity period exceeded'
@UI:{ lineItem: [{ criticality: 'ValidityStatusKPICriticality', criticalityRepresentation: #WITH_ICON }] }
@Consumption.groupWithElement: 'ValidityStatusKPICriticality'
cast( ' ' as abap.char( 15 ) ) as ValidityStatusKPI,
ValidityStatusKPI as ValidityStatusKPICriticality,
// Another Custom KPI Field
@EndUserText: { label: 'Quantity exceeded', quickInfo: 'Quantity exceeded KPI'}
@UI:{ lineItem: [{ criticality: 'QuantityExceededKPICriticality', criticalityRepresentation: #WITH_ICON }]}
@Consumption.groupWithElement: 'QuantityExceededKPICriticality'
cast( ' ' as abap.char(10) ) as QuantityExceededKPI,
QuantityExceededKPICriticality,
// Custom KPI Field 3
@EndUserText.label: 'Gross Order Value exceeded'
@UI:{ lineItem: [{ criticality: 'GrossOrdValExceededCriticality' }]}
@Consumption.groupWithElement: 'GrossOrdValExceededCriticality'
cast( ' ' as abap.char(10) ) as GrossOrderValueExceededKPI,
GrossOrdValExceededCriticality
}
On SAP's suggestion, we also added below @UI.presentationVariant annotation in the CDS header via. metadata extension.
Metadata Extension:
@Metadata.layer: #CUSTOMER
@UI.presentationVariant: [{requestAtLeast: ['GrossOrdValExceededCriticality','ValidityStatusKPICriticality','QuantityExceededKPICriticality']}]
annotate view C_SchedgAgrmtItemMonitor with
{
@UI.hidden: false
OrderQuantityUnit;
@UI.hidden: true
GoodsReceiptAmountInDspCrcy;
@UI.hidden: true
InvoiceAmtInDisplayCurrency;
}
The output on the UI:
(Here, you can also notice the respective criticality values.)
Output in the sister app F2358:
Can anyone please help me with the solution? Has anyone come across any such issue before ?
Hi jocelyn.dart, any pointers for me?
Thanks in advance.
Regards,
Sapeksh
Hi Sapeksh,
While I can't quite do CDS annotations to xml in my head, you are likely running into an issue that this app uses a local annotation file that is overwriting your CDS annotations.
Basically local annotations trump CDS annotations, and in a brutal way where it takes over a whole area most of the time (e.g. you can't add just one line item to a local annotation without losing all your CDS line item annotations.
Anyway, if you have WebIDE, you can import the file, and you should be able to edit the local annotations file to see if this is the case (it will show you which CDS annotations are being overwritten).
Cheers,
Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
yes, in case of additional annotation files in the UI app you need to check if the particular thing gets overridden. However, we do see the columns so it means what Sapeksh did has an effect on the UI.
sapeksh.gupta can you ping me the URL to the incident so I can look into it?
Best regards,
Stefan
stefan.engelhardt,
Below is the URL to the incident which Sapeksh had raised.
https://launchpad.support.sap.com/#/incident/pointer/002075129400003822772021
Please let us know if you have any feedback/solution for us.
Thank You!
Regards,
Sandeep Sinha
User | Count |
---|---|
77 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.