CDS view:get current year from date of one association and use it as condition in other association

Hello Experts,

I have a requirement to write a Query reporting that list out the Purchase requisition Workflow details with the combination of FM data (FMHIENODES and FMBASOBJNR).

I created one CDS view to have all PR details called _PRBase and other one to have all the FM data _FMData. _PRBase will go with item wise of Purchase requisition and the _FMData will go with Fiscal year wise FM data. So the WBS element of one PR item data will be having a multiple data in the FM (the same WBS element value will be stored to multiple Fiscal years).

Here the unique data or field as WBS element field value from _PRBase and the Measure field value from _FMData. This _FMData has multiple measure data based on Fiscal year. Therefore to avoid the duplicates , I have to add one more condition to filter the Year used in the creationdate of _PRBase with the Fiscal Year used in the _FMData.

How to achieve this in the calling association of the above two views? 

Please answer with the possible solutions to achieve this requirement.

Thanks.

Scroll to Top