Skip to Content
avatar image
Former Member

How to make weekly macro limit to months

Hi Experts

we have a requirement where a weekly macro to restrict to 3 months

we have 2years horizon but for first 3 months we are using X logic and remaining months Y logic . this works absolutely fine in monthly view . in weekly view when we use 12 iterations (3 months ) since the periods roll forward , logic which we are using for 3 months is going beyond 3 months. please suggest some logic if you have come across.

Thanks Raja

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Feb 21 at 10:30 AM

    For the 2 years horizon how much is in weekly and how much is monthly. Please provide the split.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 21 at 12:35 PM

    Hi Ayan

    Entire two years is in weekly buckets. For X logic it should consider only the weeks in first three months when we roll forward . for example if we are in start week of march then it should consider 12 weeks when we go to next week it should consider 11 weeks .....

    Thanks

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 28 at 08:49 AM

    Hi,

    As some months are of 4 weeks and some are of 5 weeks.

    To handle this situation, I guess Custom Macro or Program is required.

    regards,

    Sachin

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 28 at 01:47 PM

    i am looking for the logic.

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Raja,

      I guess ABAP person can easily write codes to achieve this.

      The Logic should be-

      1. Read Recent 3 Months

      2. Count Weeks for recent 3 Months

      3. Suppose Count is =n Apply Logic X till count n

      4.Apply Logic Y from count n+1 to end of horizon

      regards,

      Sachin