MC94 Macro exit

Hi,
I'm using the user exit EXIT_SAPMMCP6_002 in MC94 to copy original forecast data into consumed quantities.
The user gives me data in Weeks and months and subsequently allows me to copy data too in weeks and months.
However I want data to be copied as per technical periods and not in weeks and months as its giving inconsistent results when planning types are run one after another, for example when I run planning type having months in display and when i run the macro the data seems to be fine in display but when we run another planning type having all weeks the same data copied previously is split up separately in corresponding weeks of the months earlier copied, and  is incorrect though overall sum is correct.
To resolve this I need a way to copy data into appropriate periods instead of months and weeks which the exit currently allows.
Regards,
Kartik

Hi,
Yes its been tirggered..the problem is that after executing the macro and modifying the screen i press button save and it doesn´t save the modifications.
But if i modify it manually (not executing the exit) and press save, it save the values ok.

Similar Messages

  • How to show an ALV grid in planning book (using macro-exit)

    Hi Expertss,
    I am using a macro-exit. Now in the execution flow of this macro-exit I am required to shaow an ALV grid. I tried calling a Zreport in which i am calling alv screen(screen type dialog box). It is giving a short-dump saying Exception condition "CNTL_ERROR" raised.
    If i comments the fieldcatlog and structure name while calling the ALV in my Zreport then the alv is coming but then planning book is not vivible.
    Kindly tell what thing I am missing and what probable thing I can do to make it work.
    Thanks a lot in advance.

    I got the solution.

  • Integrated Excel and VB Macros...Problems

    Hi,
    We are running MAP transactions (RETAIL) that use integrated Excel for planning purposes. Once we open the transaction we have access to an excel application where we maintain data.
    The problem is that we are trying to use some complex VB macros to validate online entries, but we are facing problems if we call the Excel from SAP (The file runnning on its own works fine):
    - The events WORKBOOK.OPEN or AUTOOPEN do not seem to run. I need to run a macro when the workbook is started form SAP;
    - I've been getting runtime erros and some are related to this: ACTIVECELL = nothing (?).
    Have you found similar problems?
    Where can I find VB programing guidelines for Integrated Excel in SAP.
    Thanks
    Leonardo De Araujo

    Hi Tarun,
    you are in the wrong forum. You are using the R/3 based Retail solution, this is based on the CO Planningprocessor Excel integration, it is not based on SEM or
    BW-BPS. So you can not find the BPS predefined VBA macro exits.
    In the R/3 solution there exist no predefined VBA macro exits. But you can add your code more or less at the same 'events':
    - the backend triggers the SAP makros via Sub R3MacrosExecute() at each PAI, PBO cycle
    - Sub R3PutValuesEnd() is called when the system has filled Excel with data at the end of the PBO cycle; here you can do adjustments and add your macros
    - Sub R3GetRangesSingle is called at the beginning of the PAI cycle to the read the data from Excel and to do the transfer to the backend
    - active cell problem: SAP makros to not set a selection explicitly, you can do this in your makro, e.g. the first data cell or first input ready cell
    To implement a kind of 'validation' I suggest to trigger the check via Excel button; the problem is you can not control the PBO, PAI cycle from Excel, i.e. you can send error pop-up in Excel but you can not stop the PAI cycle. So you can not implement a real error handling.
    Regards,
    Gregor

  • User fucntion module for a macro

    Hi Experts,
    Please tell me how to create a user-defined method for a macro.
    Thanks.

    Hi Santosh,
    Thanks for repply. The scenario is like:-
    I want to capture the cell coordinated when user selects a cell and presses a button, and then want to populate a dialog screen displaying some information.
    So, in this case how should I proceed. Is a macro-exit required or user defined function can do the intended task?

  • Tinyos won't compile for 'tinynode' target using the msp430 toolchain

    Meanwhile, trying to compile Blink example for tinynode:
    [takeda@takeda Blink]$ make tinynode
    mkdir -p build/tinynode
    compiling BlinkAppC to a tinynode binary
    ncc -o build/tinynode/main.exe -Os -Os -mdisable-hwmul -mstrict-align -fnesc-separator=__ -Wall -Wshadow -Wnesc-all -target=tinynode -fnesc-cfile=build/tinynode/app.c -board= -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\" -DIDENT_USERNAME=\"takeda\" -DIDENT_HOSTNAME=\"takeda\" -DIDENT_USERHASH=0x3831b7f8L -DIDENT_TIMESTAMP=0x4e84bf69L -DIDENT_UIDHASH=0x4131c4c7L -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc-dump='referenced(interfacedefs, components)' -fnesc-dumpfile=build/tinynode/wiring-check.xml BlinkAppC.nc -lm
    nesc1: invocation of msp430-gcc to find builtin macros failed (error message output follows)
    Using built-in specs.
    Reading specs from /usr/lib/gcc/msp430/4.5.3/../../../../msp430/lib/msp430mcu.spec
    COLLECT_GCC=msp430-gcc
    COLLECT_LTO_WRAPPER=/usr/libexec/gcc/msp430/4.5.3/lto-wrapper
    Target: msp430
    Configured with: /home/takeda/sfw/gcc-msp430/src/gcc-4.5.3/configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --disable-libssp --disable-nls --target=msp430 --enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-as=/usr/bin/msp430-as --with-ld=/usr/bin/msp430-ld --with-pkgversion=mspgcc_20110716
    Thread model: single
    gcc version 4.5.3 (mspgcc_20110716)
    COLLECT_GCC_OPTIONS='-v' '-E' '-dM' '-mdisable-hwmul' '-mstrict-align' '-mmcu=msp430f1611' '-mcpu=430' '-mmpy=16' '-mivcnt=16' '-mcpu=430' '-mmpy=16' '-mivcnt=16'
    /usr/libexec/gcc/msp430/4.5.3/cc1 -E -quiet -v -imultilib mmpy-16 -D__MSP430F1611__ /dev/null -mcpu=430 -mcpu=430 -mmpy=16 -mmpy=16 -mivcnt=16 -mivcnt=16 -mdisable-hwmul -mstrict-align -mmcu=msp430f1611 -mcpu=430 -mmpy=16 -mivcnt=16 -mcpu=430 -mmpy=16 -mivcnt=16 -dM
    cc1: error: unrecognized command line option "-mstrict-align"
    ignoring nonexistent directory "/usr/lib/gcc/msp430/4.5.3/../../../../msp430/sys-include"
    #include "..." search starts here:
    #include <...> search starts here:
    /usr/lib/gcc/msp430/4.5.3/include
    /usr/lib/gcc/msp430/4.5.3/include-fixed
    /usr/lib/gcc/msp430/4.5.3/../../../../msp430/include
    End of search list.
    cc1: warning: -mdisable-hwmul deprecated, use -mmpy=none
    nesc1: internal error: couldn't define builtin macros - exiting
    make: *** [exe0] Error 1
    [takeda@takeda Blink]$
    Last edited by takeda (2011-09-29 19:00:51)

    in file /opt/tinyos-2.1.1/support/make/tinynode.target i've done for the moment the following
    # mod_by_takeda
    PFLAGS += -mmpy=none
    # PFLAGS += -mdisable-hwmul
    # mod_by_takeda
    # PFLAGS += -mstrict-align
    and now a very simple project compiles. (like a helloword app).
    I geuss i am gonna have problems later..

  • Always round up to nearest whole in APO DP

    Hi
    there is a requirement to always round up data to nearest whole number. number should be always rounded above and not rounded down.
    Example a value of 0.07 should be rounded to 1
    a value of 1.25 should be rounded to 2
    a value of 1.75 should be rounded to 2
    a value of 1.07 should be rounded to 2
    and so on
    Is there a way i can achieve in APO DP by some settings/paramater/config/macro/exit etc etc - i am on SCM 7.0
    Thanks,
    TJ

    Tejinder
    Try using the CEIL() function in a macro.
    Rishi Menon

  • Labwindows tcp client to generic server

    I made a program fom the client sample in the TCP sample folder. Now I want that program to communicate to a generic server that doesn't have labwindows running on it. Is this possible with just a few minor edits or do I need to start from scratch with a different sample program?
    Solved!
    Go to Solution.

    I see, but I can't understand why it reports no error! The macro exits for return value <0: if directly passed to GetTCPErrorString should not return a "no error" string, neither should GetTCPSystemErrorString do.
    Are you sure you are not calling any other TCP library function before decoding the error? If this other function succeeds, it masks out the previous error.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • MC94 - How to use the User exit EXIT_SAPMMCP6_002 to develop custom macros

    We’re implementing macros with the user exit EXIT_SAPMMCP6_002, but we see that the parameter table T_TAB doesn’t contain all lines and columns viewed in the grid of transaction MC94 (Change Plan – Consistent Planning).
    Nevertheless, files and columns that are contained, aren’t shown in the order that they are visualized in the screen (MC94 - program SAPLMCPA – screen 707).
    Does somebody know how to update the grid visualized in that screen?
    Thanks in advance for any help!

    Hi,
    Have you any luck with this yet. I am actually looking to do something similar but on the planning level.
    To get the detailed level, you can try the following:
    get the lines for this macro
      CLEAR I_LINES. REFRESH I_LINES.
      LOOP AT T_LINES WHERE KRIT1 = I_STRAT-AKT_PLOBJ  
                        AND FLGIS IS INITIAL
                        AND STRUL = 'X'.
        I_LINES = T_LINES.
        APPEND I_LINES.
      ENDLOOP.
    get columns for this macro
      LOOP AT T_COLS.
        LOOP AT I_LINES.
          READ TABLE T_TAB WITH KEY Z = I_LINES-LINE
                                    C = T_COLS-COLUMN
                                    BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            I_COLS = T_COLS.
            APPEND I_COLS.
          ENDIF.
        ENDLOOP.
      ENDLOOP.
      SORT I_COLS.
      DELETE ADJACENT DUPLICATES FROM I_COLS.
    this should pull the values that are visually seen on the screen. 
    What i need is the values for ALL levels?  I cant seem to figure this out. 
    Anyways, lemme know if the above was helpful.

  • Difference between bex user exit and macros in functionality?

    Hi all,
    I need to create a report on material master data. I created an infoset on 0material and 0mat_plant. In the requirem
    ent, I have a report containing different material numbers followed by attributes in each row. the final column in each
    row should be calculated using logic. the logic involves comparing different row values and arrive at final conclusion.
    the logic comprises of large number of if conditions. so should i use bex user exit or excel macros?
    what is the difference between user exit and macros in funcitonalilty?
    is there an issue transporting the macro to Prod for end users to use?
    any performance criteria?
    Any how to documents ..will be of a lot of help
    plz send them to [email protected]
    Message was edited by:
            ravi a

    Hi,
    Macros offer a powerful and flexible way to extend the features of MS Excel. You can either create a macro using VB code or Record a macro. Use Alt+F11 for creating macro using VB code.
    You can refer to Microsoft help site or this link for more details:
    http://www.taltech.com/support/sw_tricks/exmacros.htm
    User-exits are empty subroutines that SAP Developers have provided for you.You can fill them with your own source code.Technically this is a modification.Customer exits are nothing but a include in customer name space will be provided in the function module which starts with CALL CUSTOMER.You can fill them with your own source code.Technically this is an enhancement.
    look into following links for procedure to find and use user-exits transaction for finding user-exits is 'SMOD'
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/user_exits_tutorial.html
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm

  • How to use user exit macros in demand planning?

    Hi all,
    I am have created an user exit macros? but then can anyone guide me how to use the abp code there in the User exit macros in demand planning.
    Thanks
    Pooja

    Hi Pooja,
    The ABAP code can be written inside the functional module assigned to user exit macro.
    Start Transaction SMOD.Enter APODM005 in the 'Enhancement' field. Select 'Display'.
    Then choose 'Components' or Shift+F11 and double-click the name of the function module.
    Double-click the include contained in the function module to enter the source code.
    For step by step details you can refer to SAP note 418801.
    Let me know if it helps.
    Regards
    Gaurav

  • User exit macro - Program name

    Hi,
    In the APO macro builder, we have a USER EXIT MACRO defined and i just see the description of the macro there. Where do we see which User exit (Program) it is executing if i run the macro?
    Thanks,
    Shankar.

    Hi,
    Refer to the note 418801 which explains in detail about user exit macro.
    Regards,
    Sunitha

  • Use of BAPIs in user exit macros

    Is it ppssible to use BAPIs in user exit macros in the APO MacroBuilder?
    Thanks for any advice on this...

    Hi,
    Not sure what function you want to acheive, but basicly you can use any code in the user-exit macro's customizing code, but at last you must fill in the spcified return value to make the user-exit macro work.
    Best Regards,
    Ada

  • 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

  • DP User Exit Macro

    Hi,
    We are using User Exit Macro to carry out complex calculation in DP planning book. My observation is that, the Macro do not store the calculated values in Planning book. Based on events, User exit macro gets executed and the Value are displayed in the planning book.
    Is there a way where in I can execute the User Exit Macro once (background job) and store the value in Planning Book. This will save the execution of Macro each time when book is loaded, and loading will be much faster. Also, being a complex calculation I need to use User Exit calculation.
    Any ideas........on how to store the calculated values in Planning books.
    Thanks & Regards,
    SP

    Hi,
    Thanks for reply.
    Basically I am looking for "Saving the Calculated Values in planning book through User Exit Macro".
    I am using a User Exit Macro to carry out complex calculation. Each time it calculate "on fly" i.e. based on event (Start event). To avoid calculation and time taken for loading book, I want to save the result of an User Exit Macro in Planning Book Key Figure.
    Thanks & Regards,
    SP

  • 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.

Maybe you are looking for

  • OSStatus error -50

    I just had to rebuild my hard drive after it blew up recently. Fortunately, I had used Time Machine and had files, apps, etc. all backed up. In restoring all my files, there appears to be an issue with iPhoto and movies. When I try to open movies, I

  • GRIR question

    Hi Guru, Could you please advise the system entry when we clear the GRIR balances via MR11? I believe, clearing will force the GRIR to balance, but I can't see any entry posted. Is there a debit entry to GRIR account upon clearing? What would be the

  • Change "MOVE-CORRESPONDING" statement to MOVE statement in FM

    Hello Guys, I have created a datasource based on FM standard template RSAX_BIW_GET_DATA. In the source code in this template, there is a LOOP statement and below that there is a "MOVE-CORRESPONDING" statement. LOOP AT g_t_select INTO l_s_select WHERE

  • How do i get lost purchesses back

    how do i reload my lost purchesses

  • See what can be done with Java

    Want to see what can be done with a Java and specifically a Java3D application. Go to the Java3D forum and download the application "Free Java3D Demo Application". This should put to rest the questions if Java is good enough to do serious programming