cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Need help to calculate last 15 days of data in ABAP CDS view in HANA

Sterkel13
Explorer
0 Kudos
259

Hi Experts,

I have a requirement to create a # ABAP CDS view which will populate the last 15 days of Sales Order data from the backend tables VBAK and VBAP for fields VBELN, VBTYP, VKORG, AUART, ERDAT, AUFNR, XBLNR, ZUONR, QMNUM, VGBEL, OBJNR, KUNNR, KOSTL, BSTNK, BSARK, BSTDK, VBTYP, AUDAT, AUART, LIFSK, MATNR, MATKL, POSAR, MEINS, SMENG, VRKME, BRGEW, KWMENG, LSMENG, VRKME, NTGEW, WERKS, STLNR, ERNAM, VBEAF, VBEAV, FAKSK, WAERK, and NETWR in #ABAP CDS view.

I can create a simple CDS view on the top of these two tables but I need help calculating the last 15 days of data daily. Could you please help me with the logic to calculate the last 15 days of data based on the ERDAT and AEDAT fields?

I appreciate your help and time in this regard.

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Aukasz_SaBek
Active Participant
0 Kudos