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

10|10000 characters needed characters exceeded

### Related questions

• Posted on Feb 21, 2018 at 10:30 AM

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

10|10000 characters needed characters exceeded
• Former Member
Posted on Feb 21, 2018 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

10|10000 characters needed characters exceeded
• Posted on Feb 28, 2018 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

10|10000 characters needed characters exceeded
• Former Member
Posted on Feb 28, 2018 at 01:47 PM

i am looking for the logic.

10|10000 characters needed characters exceeded
• Hi Raja,

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

The Logic should be-

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