on 04-02-2012 7:02 AM
Hi APO Macro experts,
I am creating the simplest of possible macro.. like this
If rowA < 0
The row A = 0
I am getting an error in greek.
This is the syntax
IF
Argument area $A: $A is
< 0
Argument area $A: $A
= 0
ENDIF
$A is already a macro which is active in prod. I am creating another macro to make it 0 if it is negative.
Let me know where I am I possibly going wrong.
Regards
Guru.
Hello Guru,
I could identify your situation please follow the steps and you will get the desired result:
1.In Macro builder Right Click and Create Macro.Give name.
2.Then Right click on the Macro and Add Macro element and click Step
3.Give the name of step and in User defined (in Processing area) select the required and to period.
4. Continue,Right click the step and Add element Result level Add control statement.
5. Now select IF and Right click on IF and then append condition give description of the condition.
6. Right click on the condition and then you 'll get option of adding Argument Row.
Please try this , it will help you.
Regards,
Anurag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Anurag, Pawan
Much appreciate. I could actually fix a dozen macros yday after a little bit of warm up. I am on 4.1 and its been a long time since I created a macro. Instead of trying to figure out Argument row by rightclcking on condition, I used argument area with the entire period. This functionally solves the problem but looks dirty on the screen...I could see the result row though only by right clicking at step.
May be I need to add a step below a condition. Quite a fuss vis-a-vis excel where it takes less than 2 seconds to do what I did.
Thanks
Guru
Hi Guru,
I think there is some issue where you maintain "Argument area $A: $A".
Without seeing how you are maintaining it's a bit tough to comment.
Since you used '$' in your comments above, I assume that you want this action of making negative quantities as zero to happen only for some FIXED periods.
Try creating the step as:
Step <X> : ( <N> Iterations : ) => In the step definition, give your FIXED periods in "date-dependent" option under "processing area".
IF
Key Figure < 0 => Give the "condition" description as you feel like
Row: Key Figure ( Frm <your beginning time period> ) => Give the name of your "row" containing relevant KF in this line
< 0
Row: Key Figure (Frm <your beginning time period> ) =
0
ENDIF
PS: I have given my comments after the => sign. You should not put these in the macro.
Note that the check statement (KF <0) should be in the next level, i.e. it should show towards the right of the other steps. Also, where you make value zero, that line is also in the next level, so towards the right.
The error that you would be seeing must be in in german, not greek. If you share the same, it should be possible to understand what it means. You could also get a 'decent' quality conversion to english by using google language converter.
Thanks - Pawan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Pawan, Got it
May be it sounds weird but I see when I right click on macro condition... Under option Add element Argument, I dont see the option of Add Argument row. I only see Add agrument area and cell. Same true for Add element (result). In fact mine is called Add element (step). I am dumbly following the 9AEXAM macro exactly of similar logic.
See image attached
Hi Guru,
What is your APO version? Argument row is available in SCM 5.0. I don't remember about older versions when I used them.
The screenshot that you shared is of an inactive macro. There is no STEP in it. A step should be available under the macro. Also, For calculating the average of the three months, some 'function' should also be there which would have the argument as an 'area'. I think this example missed the function AVG that should be used for calculating the average of the periods in the 'area'.
If you indeed don't have argument row in your version, I think it might be tough to create the macro. Try adding the step, and see if it then allows you the option of argument row.
If you still face issues, please share a screenshot of your macro, and please also include a screenshot of the options that you get at the 'argument' point.
Thanks - Pawan
User | Count |
---|---|
8 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.