cancel
Showing results for 
Search instead for 
Did you mean: 

Populate records in a cds view with abap variable

Victorcardona
Explorer
0 Kudos
366

Hello SAP experts,

Currently I am working on a CDS 1, and the data preview is the following:

As you can see, I don't have records for every date. I want to join this CDS 1 with a calendar CDS to have records for all dates. however this join will return records with NULL values for the dates that doesnt exist in the CDS 1.

I would like to populate this NULL values with the closest last record which is not NULL, so the result would be something like this:

The yellow rows are the new records

Look that in my source CDS 1 I don't have records for the dates 202301, 202302, 202303 and 202304. what I would like to do is to carry on the values of the date 202212 for these new records.

Could you please explain me how to do this? I read in internet that this could be done with abap variables, but I am not abap expert. Thank you in advance for your help.

Accepted Solutions (0)

Answers (0)