My requirement is to get partner data and its contracts and then get the corresponding appointment dates of those contracts in SAP CRM tables. So now I have created CDS to retrieve the partner and contract details, and now I have to retrieve the dates from the appointment table. The problem is I need to retrieve multiple dates for each contract how can I achieve this in CDS view.
eg: My current CDS will retrieve something like this (not exactly like below but just for explanation purpose :) )
but now for each contract, I need to retrieve dates that are stored in the SCAPPTSEG table with appointment types as below,
Now I would like to get the dates in different columns for each item, the output should look like this.
Can we do it in the same CDS view?
Note: The date types are not dynamic. For each contract, only 5 types of dates need to retrieve.
After assigning the values using CASE for the new fields, I tried GROUP BY, but it won't work, since I need to show multiple fields it's not grouping into a single line.