cancel
Showing results for 
Search instead for 
Did you mean: 

Last 7 days of data

Former Member
0 Kudos

Hi Experts,

I need to design a query which shows last 7 days of data based on posting date. I have a little idea but not sure how can i write a formula for that. Can anyone of you suggest me how can i achieve that?

I appreciate your time and help.

Thanks,

Shehzad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Use standard SAP exit variable 0DAT that gives you the current calendar day.

Restrict your posting date infoobject with a range on 0DAT-7 to 0DAT.

h.

Former Member
0 Kudos

Hi Harish,

I did the same way and it resolved my problem.

Thanks,

Shehzad

Answers (2)

Answers (2)

Loed
Active Contributor
0 Kudos

Hi Shehzad,

In addition to what Jyothi mentioned in STEP 2, I think you need to use BETWEEN then insert the variable in STEP 1 in the FROM and TO field then transfer..Right click the transferred variables then OFFSET with -7 then 0..

Regards,

Loed

Former Member
0 Kudos

Hi shehzad,

Assuming that user will input date.

1) create a mandatory variable on posting date

2) create a selection/restricted kef fig , drag and drop keyfigure and posting date (restrict the posting date with the variable created above and use the offset as -7)

Former Member
0 Kudos

Hi Jyothi,

Thanks for your reply but there is no date input. I already fix my problem by using 0DAT variable.

Shehzad

Loed
Active Contributor
0 Kudos

Hi,

You may now close this thread by clicking the CORRECT ANSWER..

Regards,

Loed

Former Member
0 Kudos

ok ,good to hear ! please close this thread.