Skip to Content
avatar image
Former Member

Last 7 days of data

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 01, 2015 at 07:13 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 01, 2015 at 03:15 AM

    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)

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 01, 2015 at 03:49 AM

    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

    Add comment
    10|10000 characters needed characters exceeded