cancel
Showing results for 
Search instead for 
Did you mean: 

Extend standard Fiori App field with standard Value Help

nusch
Explorer
0 Kudos

Hi everyone,

as easy as it sounds... we have a standard Fiori App (F1643) and a standard field (PurchaseContract) which we would like to simply enhance with a value help ( standard CDS C_PurchaseContractValHelp).
We have extended the CDS View, which serves as an oData in the App and tried to enrich the annotations with the value help, but unfortunately it doesn't work (version 2022, NW 7.57).

association [0..1] to C_PurchaseContractValHelp as _PurchaseContractVH on $projection.purchasecontract = _PurchaseContractVH.PurchaseContract
 {
    @EndUserText.label: 'Georgi test'
    @ObjectModel.text.association: '_PurchaseContractVH'
    @Consumption.valueHelpDefinition: [{entity:{name:'C_PurchaseContractValHelp' , element: 'PurchaseContract'}}]
    I_Purchaserequisitionitem_Wd.PurchaseContract as ZPurchaseContract,
    _PurchaseContractVH
}

I have come accross a lot of not answered questions where the same issue occurs, some proposed solutions, but working only for custom oData services, but nothing for this very standard case. Could someone give me a hint, what would be the solution here? The weird thing is, that even the Label set was ignored by the application.
I have such enhancements with custom fields, which are working as expected, but not with the standard fields.
andre.fischer oliver.graeff jamie.cawley aschlott

View Entire Topic
mhappe
Participant
0 Kudos

Hi Georgi,

Are you sure you custom added field is available in the OData service? When requesting the metadata of your service is the added field "ZPurchaseContract" available for entity "I_Purchaserequisitionitem_Wd"?. I guess the field visible in your UI is the default PurchaseContract field? You also could activate an OData trace in the backend to be sure which fields are requested.

The CDS view is referenced in SEGW service "MMPUR_REQ_SSP_MAINTAIN", additional fields (added using a CDS view extension) are exposed automatically, but a new association is not exposed automatically in this case. Associations to be exposed has to be marked explicity when adding a data source reference. So for these case you have create to a gateway extensions project (overwrite) for the default service where you add the additional association.

Possibly you have to add additional annotations in the generated MPC_EXT class of your extension project.

In the default service (valuehelp)annotations are added in the MPC_EXT class as well:

nusch
Explorer
0 Kudos

Hi mattijs.happ ,

many thanks for your answer.

Yes, I am able to see my ZPurchaseContract field in the metadata, I even add it to the app using the Key User settings. The field inherits the label of the standard field and of course does not show the value help. I already saw a person solving this issue, by using an implicit enhancement of the standard MPC_EXT to inject the value help through his custom class, but the creation of a "gateway extension projct" is new to me.
Would it be something similar to the documentation here ? Could you please provide some example?

0 Kudos

Hi g.nushev , have you solved the problem? I am trying various ways to extend gateway project with no luck yet. Appreciate any hints.

UPD: we only could achieve the requirement is by creating own oData service by including model from the original service, adding required VH structure as reference to CDS view, then BAS adaptation project by changing main oData service and some local annotations. If somebody knows more easy way would be vey interesting to try it.