cancel
Showing results for 
Search instead for 
Did you mean: 

Macro to calculate at detail level

Former Member
0 Kudos

Hi Experts,

I am new to macros. I can just copy one KF to other. Now I need to check for a condition and give an alert at detailed level of Product and location.

I can somehow write the condition and generate Alert on aggregated level, comparing 1 KF to other. But I have to do that for each Product and location level and check their KFs and generate Alert.

Can someone help me/show me, how to write the code, which function to use ? Is it Drill_down function ? but where to insert this function in the macro ?

I don't want the macro to open up my screen. It just should calculate on detail level and give me the alerts.

My selection of data in the grid will still show on Aggregated level. Just want to know which products in which locations violating this ?

Thanks in advance.

Venkat

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member187488
Active Contributor
0 Kudos

Hello,

You should use DRILL_DOWN macro with internal indicator, and after alerts are generated, use DRILL_UP macro with internal indicator to come back.
When calculating alert, you can used DET_LEVEL function to make a check on whether it's on location product level.
For these macro functions, you can refer to online help

Functions for InfoObjects and Planning Folders - Operators and Functions in Macros - SAP Library

Best Regards,
Ada

Former Member
0 Kudos

Hi Ada,

Can you pls write the main code for me ? like steps where to use these functions.

Do I have to use DET_LEVEL at alert generation or before ? It should drill down based on the mentioned characteristics. Then it should do the check in the KFs ?

can you show me the code please ?

Thanks

Venkat

former_member187488
Active Contributor
0 Kudos

Hi Venkat,

I suggest that you try it our by yourself first.
You can try to construct a macro first. If it does not work correctly, you can come back to ask.
There're some very similar macros in SAP standard SNP planning book and example macro books.
Please refer to them and try.

Best Regards,
Ada