cancel
Showing results for 
Search instead for 
Did you mean: 

"Controlled" Macro Execution

Former Member
0 Kudos

Dear Macro Experts,

A directly executable "Details Only" macro that updates the value of a tech high key figure KF3 = KF1+KF2 should NOT execute at certain drill down situations.

Lets says I have 3 Infoobjects at header

A

B

C

When A = Total and C = C1 and B= B1, the macro should not execute upon clicking the macro..

How do I go about writing such a macro ?

PS: This macro is not assigned to any event if this info helps.

Thanks

Borat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Borat,

try an

IF

NOT (

ACT_IOBJNM_VALUE( 'A') = ''

AND

ACT... ( 'B' ) = 'C1'

etc...)

** rest of the macro **

ENDIF

and prevent with it the macro flow from going into whatever you want to do. Put it on the uppermost level - same as steps.So macro is always executed, but in your special case it only evaluates the logical clause and ends after ENDIF.

Good luck,

J.

Former Member
0 Kudos

Thank you James and Ada,

Let me write the syntax and paste the screen shot here for the mankind.

Thanks

Borat.

Answers (1)

Answers (1)

former_member187488
Active Contributor
0 Kudos

Hi, you can make use of macro function ACT_IOBJNM_VALUE(), AGG_LEVEL(), DET_LEVEL(), together with IF condition. ACT_IOBJNM_VALUE() for B and C, AGG_LEVEL() or DET_LEVEL() for A. Refer to online help http://help.sap.com/saphelp_scm70/helpdata/en/4b/755bee3bf75a18e10000000a421937/content.htm?frameset... for the usage of these macro functions.