Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

dynamic source path for link as per condition

Source image

Hi,

There is a condition where i need to change the source dynamically. This is the current source link for my odata source "http://SAP.COM:9086/sap/odata/MDG_CDS/MDG(p_date='20200101')/Set" . The condition is to take previous two calender years data. When we are in year 2023 the link must be  "http://SAP.COM:9086/sap/odata/MDG_CDS/MDG(p_date='20210101')/Set".

The p_date=2021 part of the link must change dynamically when we are in year 2023 .

p_date=2022 when are in year 2024 and so on

This is the condition which i must appy to get data in dynamic way . How can this be achieved?

 

1 Reply