cancel
Showing results for 
Search instead for 
Did you mean: 

Macro Question

Former Member
0 Kudos

Hi to all community.

Maybe someone can give me a suggestion how to implement following requirement via macro functionality:

We have a requirement to perform some calculation within horizon which equals to some numeric value in material master.

For example to calculate receipts of different type only within ATP Checking Horizon which in equals to 5 in Material Master.

So receipts should be calculated only for 5 days from current date.

Does anyone have any ideas how to implement this? I know how to perform calculation, how to read this value from material master but have no idea how to set calculation horizon equal to this value.

Thanks in advance, Andrey.

Accepted Solutions (1)

Accepted Solutions (1)

satish_waghmare3
Active Contributor
0 Kudos

Hi Andrey,

I doubt whether Macro has any standard function to achieve this. You may explore the option of User-Exit Macto function.

Besides something similar was done the project which I worked using BAdi - "BADI APO_BAPI_BUS10400"

It was done for ATP check required for Delivery confirmation.

-- Read Business Event, ATP Group.

-- Check the categories maitaned as per Check Control.

-- Determine the Total ATP Qty

-- Then apply logic to decide which Receipt quantities are within the Horizon(maintained by Business).

-- Determine the revise Total ATP Qty

-- Then Based on confirm the Delivery or SO or Requirements.

Please check if this provides any insights.

Thank you

Satish Waghmare

Answers (1)

Answers (1)

Former Member
0 Kudos

Andrey

Are you writing a macro in a DP or SNP Planning book ?

If its DP, what is the smallest time granularity in your Planing Area (day/ week/ etc). If its day, and your planning book also shows daily buckets, then you could simply use a layout variable as a counter and use that to count 5 days.

Rishi Menon

Former Member
0 Kudos

Andrey

>

> Are you writing a macro in a DP or SNP Planning book ?

>

> If its DP, what is the smallest time granularity in your Planing Area (day/ week/ etc). If its day, and your planning book also shows daily buckets, then you could simply use a layout variable as a counter and use that to count 5 days.

>

>

> Rishi Menon

Hi Rishi!

This macro should be implemented in SNP Planning Book with days granularity.

Can you give some short example of this counter?

Because I've tryed something similar but unfortunaty it doesn't work..

Former Member
0 Kudos

Hi Andrey

If the time horizon is variable (not fixed) based on the data on Material Master, I guess you need to find a sutable BAdI/User Exit to achieve this goal. Layout variable is not sufficient in this case.

Thanks,

Prasun