APO DP MACROS

Hi Gurus,
I am New to APO  DP module, I am working on APO DP Macros, My Requirement is on (FORECAST+PROMOTION=ACTUAL FORECAST).
Could anyone help me out how to write Macros on the same.
Thanks
Ganesh

Hi,
Below is the sample screen on how you can define the macros in Transaction /SAPAPO/ADVM for your planning book/data view.
Also time horizon/KF can be changed as needed -
Hope it helps.
Regards,
Alok

Similar Messages

  • APO SNP macro working at a product level (across locations)

    I am using APO V5.1.
    I have a macro requirement where I want to perform calculations at a product level (ie for a given product, look across all relevant locations).
    I can do this interactively by selecting a product.
    But in a background job I can only select the 9AMALO level of aggregation.
    Does anyone know how I could get round this?...

    Hi,
    Could you please give some more details of your exact requirement?
    Since you mentioned about 9AMALO, I would assume that you want something to be done in SNP, but it's not clear what you could do in interactive SNP which you are not able to achieve in background job.
    If something is possible in foreground, most likely it would be available in background as well, and we can give you the solution after you give some more details.
    Thanks - Pawan

  • APO DP Macro for Blank Values

    HI all
    In SCM 5.0 the system now distinguishes between 0 values and Blank values.
    I am trying to get a macro to run if a value in DP is Blank (not Zero)
    I cannot find a function in the Macro builder to do this. 
    Can anyone help?
    regards

    somemore information on IS_INITIAL macro funtion
    IS_INITIAL()
    Syntax
    IS_INITIAL( Key Figure )
    Key Figure: Row, column, or cell element (data source = row attributes)
    Description
    The IS_INITIAL function returns the value 1 if the cell is initial. (The column results from the current step iteration; the row is determined by the Key Figure parameter.) Apply this function for key figures that can distinguish between zero values and initial values. This function is not available if the compatibility mode is activated for the macro book.

  • APO-DP Macro formula query

    Hi SAP experts,
    I'm having a problem in a planning book in which a negative value appears in a consumed AATP in which negative value should not occur. Because of this a customised functionality was affected. This was the formula of the macro:
    Carry Over Alloc w = MAX (AATPw-1;0) + HUB Inventory Sat w
    Thus MAX (AATPw-1;0) means that if the value is in negative, the macro will calculate this as zero? For example -150 is the value of AATPw-1, Hub inventory is 200. Thus the macro having a automatically change this -150 to 0 and calculating it to:
    Carry Over Alloc w = 0 + 200
    Please help on what MAX (AATPw-1;0) means.
    Thanks in advance!
    Raymond

    Hello there...yes you are right...the function Max(1....n) will return the maximum value in the range 1....n and so from your example if u have -150 to 0 as your interval then Max would return 0..
    Hope this helps!
    Thanks!

  • APO DP - Macro Test Tool

    Hi,
    I have tried to test a number of macros using the standard test tool as follows:
    - from within the Macro Builder, I choose Utilities > Test Macros
    - I add some test values to the key figures displayed in the test tool
    - I select my macro and execute
    So far I have no results and it seems to me that the test tool is not executing the macro nased on the values I have assigned to the key figures.
    Does anyone have any advice please?
    Many thanks

    Hi Anthony,
    It will work if you test in Utilities > Test Macros.
    i tested a simple scenario...
    macro:delete Stat2...it deletes the statistical forecast value from current month.
    i entered the values for current month and next month,i executed the macro..it deleted the values.
    could you please check what is the horizon for your macro in the sense in which month it has to work.
    could you please see the below snap shot
    Thanks,
    Naga.

  • How to Concatenate 2 Variables in SAP APO DP Macro

    Hi All
    I am trying to concatenate 2 variables in a single third variable. Can some body please guid me on how this can be achieved
    e.g.  I have a variable containting a characteristic Value - "1010101" and Another Variable have a number "12345"
    I want to show a string -  "1010101 with value 12345"
    Can somebody please guide on how this can be achieved
    Any help in this regard is highly appreciated
    Thanks
    Vijay

    Hi Vijay,
    Try with with the command STRINGS_CONCATENATE().
    Syntax
    STRINGS_CONCATENATE ('String1'...'Stringn')
    Thanks and Regards,
    Mariano

  • Macro Date Function

    Hi Gurus,
    Is there any Date Function in SAP APO DP Macros which can give No. of weeks in a Fiscal Year. ?
    Also, let me know if can achieve this through an ABAP code  ?
    TIA..
    Regards
    Lalit

    Hi Gurus,
    Is there any Date Function in SAP APO DP Macros which can give No. of weeks in a Fiscal Year. ?
    Also, let me know if can achieve this through an ABAP code  ?
    TIA..
    Regards
    Lalit

  • Help needed I have a canon 40D. I am thinking of buying a canon 6D.But not sure that my len

    Hi all help needed I have a canon 40D. I am thinking of buying a canon 6D.
    But not sure that my lenses will work.
    I have a 170mm/ 500mm APO Sigma.
    A 10/20 ex  Sigma   HSM  IF.
    And a 180 APO Sigma Macro or do I have to scrap them and buy others.
    ALL Help will be greatly received. Yours  BRODIE

    In short, I love it. I was going to buy the 5DMark III. After playing with it for a while at my local Fry's store where they put 5DMII, 5DMIII and 6D next to each other, using the same 24-105L lens, I decided to get the 6D and pocket the different for lens later.
    I'm upgrading from the 30D. So I think you'll love it. It's a great camera. I have used 5DMII extensively before (borrowing from a close friend).
    Funny thing is at first I don't really care about the GPS and Wifi much. I thought they're just marketing-gimmick. But once you have it, it is actually really fun and helpful. For example, I can place the 6D on a long "monopod", then use the app on the phone to control the camera to get some unique perspective on some scenes. It's fun and great. GPS is also nice for travel guy like me.
    Weekend Travelers Blog | Eastern Sierra Fall Color Guide

  • How to track planning book keyfigure changes?

    Hi,
    If theere are any changes in the planning book keyfigure how do we track who has made it ?
    How do we see at keyfigure level data change and user who  chnaged?
    thanks,
    shan
    P.S:rewards guranteed

    these two links might help
    Re: APO DP macro to handle column data
    Re: SAP SCM APO DP - Planning Book
    you can create macros dorectly in production if u need it urgently. but if you transport a book from dev later it will overwrite what you have made

  • Control of Macros in APO DP

    I am using APO DP V5.
    I have two questions regarding the use of macros in DP:
    1. Is it possible to call a macro from within a macro?
    2. I believe it's possible to set up a 'collective macro', so that a group of macros can be executed together. But how do I set up a 'collective  macro' - I cannot see this mentioned in the help documentation.
    Thanks,
    Bob Austin

    1. i suppose what you want is calling a macro if some conditions inside the main macro are satisfied..
    some ideas which might give the same effect:-
    instead of calling a macro from a macro can you not just add the macro you want to call as a step inside the first macro? ( unless you want a different macro level settings)
    alternately you can make the first macro cause a value in a temporary row and use the value in the row to trigger the action of the second row using a condition statement in it
    2. am only rephrasing what Ian said by saying the following about collective macros:
    You define a macro as a collective macro when you create it, by setting the Macro type field to Collective macro. Add the macros already created within the steps. If you have already assigned other elements (steps, conditions, and so on) to it, you can no longer define the macro as a collective macro.

  • Use of APO macro function CHAR_VALUES_INPUT

    I am using APO V7.
    I am using the APO macro function CHAR_VALUES_INPUT to read in a resource name from the interactive user.
    Is there a way of making sure that the user entered data is left justified?
    (I am using the entered name in the RESOURCE_VARIANT function, and this function only seems to work if the resource name parameter is left justified, ie no leading blanks).
    Thanks for any advice on this...

    Hi,
    see SAP Note 1477144. It corrects this problem.
    Best regards
    Rico Frenzel

  • User exit macros in APO DP macrobuilder

    I am using APO DP V5.
    Can anyone give me an example of how 'user exit' macros are built - I cannot find any good documentation on this point.
    Thanks,
    Bob Austin, Atos Origin

    Mark,
    Thanks for your reply.
    In the APO DP macrobuilder, I specifically want to have a macro which runs some bespoke code.
    I'm not clear how to do this.
    Am I missing something in Note 380352?
    Regards,
    Bob.

  • Copy APO Macro ACROSS Landscape..

    Hi,
    I have a typical scenario, where in I need to write a Macro in APO-DP which is similar to thae one I did in one of the previous APO-DP projects.The Names of the key figures etc are same.. The need for modification would be very little. Subject to my previous customer's clearance, is it possible to port it from the previous landscape to the development server of the New Landscape at New Customer's site? In both places the version is SCM 5.0.
    ps: The text version doesn't have the Headers / Symbols and the HTML version of the Maco , which I am able to save, could not be pasted as active version in the workbench of different landscape.
    Pl let me know , whether there is any mechanism... Rgds.. TRR

    ask you basis guys to set a transport link from system1 to system 2
    create a new planning area and under it copy a planning book with the macros
    create a transport object for the planning book with the planning area and move it into system 2
    once the transport reaches, just "import" the macros from the new planning book to the book you want to
    close the link between system1 and 2
    I assume your old customer knows you are porting his macros and hence the basis guys will open the connection
    Edited by: Harish AN on Jul 25, 2008 1:13 PM

  • APO DP Planning book cell entry or exit - macro way to validate business rules

    Dear All,
    We have requirement from business that Demand planner will key in forecast in respective KF, when comes out of one cell and go to another cell to enter forecast, we have to validate the cell value with 3 months average and if it is deviated certain percent we need to highlight with different color.
    Note: Planner do not want to enter/save in between moving between planning book cells.
    For example: 3 months average is 100. Planner wants to enter forecast in cells continuously for next 12 months without hitting Enter key or save. I want to compare the cell value with average and if its deviated beyond certain level we need to highlight the cell with different color.
    I know that we have macro events will work when we hit enter key or save or exit or level change.
    I am not sure this is possible, wanted to know any other way possible.
    Thanks in advance.
    Please share your thoughts.
    Sreeni

    This will be quite difficult to achieve because the planning books are designed so that macros execute after you press enter.  There are 3 possibilities that I see
    1 - If you allowed the planner to make all their inputs into the required key figure and then press enter, you could easily design a macro to read each cell in the input key figure and compare it to the 3 months average of another key figure then highlight the input cell accordingly using the CELL_BG() functionality as described above.  
    2 - Alternately you could create a dynamic alert on the input key figure using much the same logic but again these will not generate until enter is pressed.
    3 - Another option is to create a macro that asks the user to enter data into a pop-up box which is read into a layout variable.  This macro could be triggered from a push button.  You could then do the comparison between the value in the layout variable and the 3 months moving average for that particular time bucket and present an error message if it is outside the tolerances that you set.  Such a macro could run for all time buckets or for a range of time buckets that the user highlights.  Your user will still have to press enter however.  The use of some of the macro operators is below:
    Overall I think you have to go with option 1 or 2 and generate the alerts at the end of user input
    Hope this helps
    Laurence

  • Creating Macros in APO DP

    Hi Gurus,
             I have some questions
    1,Do Macros effect performance issues in DP?
    2,DO you guys have document on how we need to create Macros and Alerts?
    3,What are the things we needed for dollerization and how it works?
    I will be very thankful to you guys if you please let me this answers
    Thanks a Lot
    Regards,
    Raja Medabalime

    Hi Raja
    <b>Do Macros effect performance issues in DP?</b>
    Yes. If you use macros wrongly, they can greatly affect the performance of your Planning Book, Mass Processing, and uploads using BAPI_PBSVARPS_CHANGEKEYFIGVAL
    <b>DO you guys have document on how we need to create Macros and Alerts?</b>
    In DP, providing alerts functionality means using a combination of macros which generate the alerts and then viewing the alerts in the alert monitor.
    Please check this link for an example of a macro that generates an alert:
    http://help.sap.com/saphelp_scm50/helpdata/en/47/7a58398d594e1de10000000a11402f/frameset.htm
    And also this link on how to monitor alerts:
    http://help.sap.com/saphelp_scm50/helpdata/en/44/cf893744ce9c71e10000009b38f842/frameset.htm
    <b>What are the things we needed for dollerization and how it works?</b>
    I am not aware of "dollerization". Do you mean "dollarization"? DP provides unit conversions in the interactive planning area. You will have to have the unit conversion master data available in the system. In interactive planning, you can use context menu to switch between two units of measure.
    Hope this helps. Please post again if you have questions.

Maybe you are looking for