cancel
Showing results for 
Search instead for 
Did you mean: 

DET_LEVEL Macro on Two Characteristics (DP)

Former Member
0 Kudos

Hi all,

In Demand Planning I have a macro running successfully saying that unless the material number is at detail level, the specific key figure is locked.

This macro is as below:

IF

DET_LEVEL ( Material_No ) = 0

ROW: XYZ (Attributes) =

Row Input (0)

ELSE

ROW: XYZ (Attributes) =

Row Input (1)

ENDIF

this works fine, and the row XYZ is only open for editing when the DP planning book is drilled down to the material number detail (lowest level)

But I want to enhance this, and its not working.. I am trying to say that TWO characteristics need to be in detail.. not just Material_No

IF

DET_LEVEL ( Material_No ) = 0 AND DET_Level ( Location ) = 0

ROW: XYZ (Attributes) =

Row Input (0)

ELSE

ROW XYZ (Attributes) =

Row Input (1)

But it seems to be totally ignoring the extra part added to check that Location is also at detail.. What am I doing wrong?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member187488
Active Contributor
0 Kudos

Hi,

From the description of your macro, there is no problem.
Maybe you can attach your real macro for us.
If you put "DET_LEVEL ( Material_No ) = 0 AND DET_Level ( Location ) = 0" in one line in your macro, try separating it into 2 lines "DET_LEVEL ( Material_No ) = 0 AND" and "DET_Level ( Location ) = 0"

Best Regards,
Ada

Former Member
0 Kudos

Hi Ava,

Sorry for the delay. Please see the macro attached. it still does not seem to work and allows edit after just the first condition is met. ignoring the second DET_LEVEL condition.

RahulHanda
Active Contributor
0 Kudos

Hi S SB,

Instead of AND condition try with DET_LEVEL( '9AMATNR' ; '9ALOCNO' ) = 1. Let me know if it worked.

Regards

Rahul

Former Member
0 Kudos

No, this has not worked.. it accepts it as a macro and gives it the green light.. but when tested it has no effect.

It only references the first characteristic in the string as you proposed. I switched them over and this proved it. It just reads the first characteristic not both.

RahulHanda
Active Contributor
0 Kudos

Hi S SB,

Not sure, what we are missing in communication. See the attached macro which is with start/default event.

When I select in selection window only material then specific KF is in display mode, but when I select product and location in selection window it allows me to do so.

Do you want to do the same in drill-down? Let me know what is different in our understanding,

Regards

Rahul

Former Member
0 Kudos

Yes, in Drill Down... So the user has free ability to select what he likes in the selection window, but I want to ensure he has to drill down to the part AND location until he can edit.

It currently works that the key figure is locked unless the part is drilled down.. But when the part is in more that one location, eg: 'TOTAL' in the location header, it still lets him edit.. I do want to allow edit if either location or material are at TOTAL.

hope that clarified my issue better?

RahulHanda
Active Contributor
0 Kudos

Hi,

Try this and let me know if it worked for yourself.

Regards

Rahul