Professional Documents
Culture Documents
SAP Product Name: Applicable Product Versions: Document Version Last Updated: SAP Business Planning and Consolidation 7.0, version for SAP NetWeaver 7.0 SP2 & above 1.2 Apr 2009
Copyright 2009 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook,and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data
contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. These materials are provided as is without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages. SAP How-to Guides are intended to simplify the product implementation. While specific product features and procedures typically are explained in a practical business context, it is not implied that those features and procedures are the only approach in solving a specific business problem using SAP products. Should you wish to receive additional information, clarification or support, please refer to SAP Consulting. Any software coding and/or code lines / strings (Code) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.
1 Scenario
In this scenario, we will show you how to create custom menu with pre-defined planning processes. We will also explore the supported functionality differences between BPC MS and BPC NW.
2 Introduction
SAP BusinessObjects Planning and Consolidation provides the ability to define a unique/customizable menu of tasks for the end-user in Microsoft Excel. The principal is based on an Excel formula called evMNU, which is a standard function for release 5 and both releases of 7, version for Microsoft and NetWeaver. The evMNU function leverages MNU_ macro command. The design of these commands allows VBA experienced users the ability to write custom macros which can combine both standard SAP BusinessObjects Planning and Consolidation and Excel tasks. This flexibility allows the customer to create custom instructions in the form of a menu or an option within a worksheet. This paper will provide details for this functionality on both platforms and where applicable the difference between each platform. This paper does not cover the Custom Menu functionality available in the versions for Microsoft. We will be using OPENFILE option with EvMnu to open a dynamic template. The OPENFILE option within the NW Version can only open workbooks from cached directories in local PC. Therefore, it is a best practice to ensure that OPENFILE only refers to templates that are available as dynamic templates that are cached (updated template version) on all client PCs that are using the EvMnu based workbook. In this guide, we will implement a custom menu for an Allocation planning process within delivered ApShell. Please refer below How To guide to set up necessary pre-requisite step for a sample Allocation.
How to Run a Top Down Allocation within BPC NW
6. Store this report in the server. To do this, Click on eTools Save Dynamic Templates.
7. Navigate to the folder where you want to store. Here, we are storing in Company INPUT SCHEDULES. We will need the path & input schedule name later to set the custom menu. (/INPUT SCHEDULES/Enter Historical Rent.xlt)
8. Make sure the DM Package is ready as per How To Allocate guide. We will need package name (in our case, Rent Allocation), Process Chain name (ZBPC_RENT_ALLOC), and Group (Financial Processes).
9. Now, we will create a report to verify the data. For this, go to home and click on Reporting & Analysis.
13. Drag and Drop Entity in Rows and remove P_ACCT from Rows. Enter BAS in Member Selection. Then, Click OK.
Save Dynamic
16. Store the report in your desired directory. We are storing this in /REPORT directory as Validate Allocated Rent.xlt
3.2 Create Simple Custom Menu In this section, we will create a Custom menu in which we will be calling the above reports & DM Package.
1. Open up a blank excel. Add your logo and back ground color.
2. We will be creating Excel Macros to assign the EVMNU functions to shapes. So we will create shapes to assign these macros to. These macros can be triggered from Excel Rectangle object.
5. Change to No Fill for Fill Color and No Line for Line Color. This will present to the users as if the report short cuts are directly typed in the cell.
8. Repeat these steps to add further shortcuts. Here, in the first step, we will call the input schedule to enter the historical rents. We will call the DM Package in Allocate Rent step and EvDre Report in Verify Allocated Result step. We also added arrows to show the process flow.
9. Now, right click on column A and choose insert. This will create a column to the left of column A.
10. In cell A5, enter the following EVMNU formula: =EVMNU("OPENFILE",,"/INPUT SCHEDULES/Enter Historical Rent.xlt") NOTE: The syntax and available EVMNU commands are outlined in SAP Note 1306898 and in the appendix of this guide.
11. In cell A9, enter the following EVMNU formula: =EVMNU("OPENFILE",,"/REPORTS /Validate Allocated Rent.xlt")
12. We wont enter a formula in A7 as we will be calling the EVMNU function directly in a macro to call the Allocate Rent package. Therefore, dont assign anything to cell A7.
14. Click on Column B and choose Group to allow expanding and collapsing this menu.
15. Save the excel in the server if you have not done already.
16. In this case, were calling the template Allocate Rent Custom Menu.xlt
19. Code the macros. Sample codes are given in the Appendix of this document.
20. Now, go back the custom menu excel file. Right click on the Rectangle Object & click on Assign Macro.
24. You can now test all navigations and publish for the user community. If you have used templates from server, make sure to log off and log back in before testing. This will make sure templates are cached in your local PC.
3.3 Create Advanced Custom Menu In this section, we will show how to use custom menus to do a more guided navigation that prevents users from going to subsequent steps until previous steps are completed, similar to business process flows in the version for the Microsoft platform. We will show how to do this within Excel 2007 in this example.
1. Launch BPC Admin Console and under the planning application, update the ALLOCATEHISTORICAL.LGF to the following. Save and validate this logic.
2. Update the DM UI Script for the Rent Allocation package to the following:
8. In column C, populate the EVCVW formulas as shown to get the current view filter values.
10. In the Controls worksheet, in column B, populate the following text to track if the steps are complete.
13. Highlight the whole workbook and choose fill color White.
15. Build the first step here and ensure the formulas in column J link to the values in the controls worksheet.
17. Assign the macro name MNU_ETOOLS_MEMBERSELECT OR_C and click OK.
18. Highlight the text of the button and change the text to Category
19. In the Excel Menu, choose Developer -> Insert -> Button again.
22. In the Excel Menu, choose Developer -> Insert -> Button again.
25. Within the Excel ribbon, choose Developer -> Insert -> Checkbox
29. Go to the Control tab and click on the cell selector for cell link.
35. Enter the following code (located in Appendix) for the macro.
36. Now draw an arrow using Excel shapes and then Enter Step 2 as shown. This step also validates that the Entity chosen is a base member. If it is not, it will not let you proceed to step 2.
44. Change the workbook type and refresh options to the following and click OK.
45. In the Excel Ribbon, choose Developer -> Insert -> Button
51. In the Excel Ribbon, choose Developer -> Insert -> Button
52. Insert another button and name the macro SendData_Click and click New.
56. In the Excel Ribbon, choose Developer -> Insert -> Button
57. Insert the button, name the macro Step2_Click and click New.
61. Update the following macros to disable step 2 unless step 1 is done.
63. In the Excel Ribbon, choose Developer -> Insert -> Button
64. Insert a button and rename the macro Step3_RunAlloc_Click and click New.
68. In the Excel Ribbon, choose Developer -> Insert -> Button
71. Within the Excel ribbon, choose Developer -> Insert -> Checkbox
72. After Step 2, insert this checkbox and rename it to Finished Entering Rent.
73. Within the Excel ribbon, choose Developer -> Insert -> Checkbox
75. Right click on Finished Entering Rent and choose Format Control.
77. Right click on Finished Allocating Rent and choose Format Control.
78. On the Control tab, specify the cell link as Controls!$C$8 and click OK.
79. Right click on the Run Allocation button and name this button RunAllocBtn (in left top corner, just above A1 Cell).
80. Right click on the Validate Rent button and name this button ValidateRentBtn.
81. Right click on Finished Entering Rent and choose Assign Macro.
84. Right click on Finished Allocating Rent and click Assign Macro.
89. Now you should have your guided navigation custom menu that prevents you from going to next steps till previous steps are complete.
4 Appendix
4.1 Sample VBA Code Scenario 1:
Sub Enter_Hist_Rate() Range("A5").Select End Sub Sub Verify_Result() Range("I9").Select End Sub Sub Run_allocation() Application.Run "MNU_eDATA_SELECTPACKAGE", "Rent Allocation", "ZBPC_RENT_ALLOC", "Company", "Financial Processes" End Sub
4.2
PROMPT(SELECTINPUT,,,,"%CATEGORY_DIM%,%CURRENCY_DIM%,%TIME_DIM%") INFO(%EQU%,=) INFO(%TAB%,;) TASK(/CPMB/ALLOCATION_LOGIC,TAB,%TAB%) TASK(/CPMB/ALLOCATION_LOGIC,EQU,%EQU%) TASK(/CPMB/ALLOCATION_LOGIC,SUSER,%USER%) TASK(/CPMB/ALLOCATION_LOGIC,SAPPSET,%APPSET%) TASK(/CPMB/ALLOCATION_LOGIC,SAPP,%APP%) TASK(/CPMB/ALLOCATION_LOGIC,SELECTION,%SELECTION%) TASK(/CPMB/ALLOCATION_LOGIC,LOGICFILENAME,ALLOCATEHISTORICAL.LGF)
4.3
*XDIM_MEMBERSET TIME=2006.JAN *XDIM_MEMBERSET P_ACCT=RENT *XDIM_MEMBERSET CATEGORY=ACTUAL *XDIM_MEMBERSET ENTITY=PASA *RUNALLOCATION *FACTOR=USING/TOTAL *DIM P_ACCT WHAT=RENT; *DIM ENTITY WHAT=ASA; *DIM TIME WHAT=>>>; *DIM CATEGORY WHAT=>>>; *ENDALLOCATION
4.4
Sub Step1Complete_Click() Dim FindString As String If Sheets("Controls").Range("C6").Value Then FindString = Sheets("Controls").Range("D2").Value If Trim(FindString) = "N" Then Call EnableAfterDim Range("B12").Select Else MsgBox "Select Lowest Level Entity" Sheets("Controls").Range("C6").Value = False End If Else Call DisableAfterDim Range("B6").Select End If End Sub
Private Sub EnableAfterDim() ActiveSheet.Shapes("EnterRent").Select Selection.Enabled = True ActiveSheet.Shapes("RunAllocBtn").Select Selection.Enabled = False ActiveSheet.Shapes("ValidateRentBtn").Select Selection.Enabled = False Sheets("Controls").Range("C6").Value = True End Sub Private Sub DisableAfterDim() ActiveSheet.Shapes("EnterRent").Select Selection.Enabled = False ActiveSheet.Shapes("RunAllocBtn").Select Selection.Enabled = False ActiveSheet.Shapes("ValidateRentBtn").Select Selection.Enabled = False Sheets("Controls").Range("C6").Value = False End Sub Sub GoToInstructions_Click() Sheets("Instructions").Select End Sub Sub SendData_Click() Application.Run "MNU_eSUBMIT_REFSCHEDULE_SHEET_REFRESH" End Sub Sub Step2_Click() Sheets("RentInput").Select End Sub Sub Step3_RunAlloc_Click() Application.Run "MNU_eDATA_SELECTPACKAGE", "Rent Allocation", "ZBPC_RENT_ALLOC", "Company", "Financial Processes" End Sub Sub Step2Complete_Click() ActiveSheet.Shapes("EnterRent").Select Selection.Enabled = False ActiveSheet.Shapes("RunAllocBtn").Select
Selection.Enabled = True ActiveSheet.Shapes("ValidateRentBtn").Select Selection.Enabled = False Range("B18").Select End Sub Sub Step3Complete_Click() ActiveSheet.Shapes("EnterRent").Select Selection.Enabled = False ActiveSheet.Shapes("RunAllocBtn").Select Selection.Enabled = False ActiveSheet.Shapes("ValidateRentBtn").Select Selection.Enabled = True Range("B25").Select End Sub
4.5
EVMNU syntax
To find detailed syntax for EVMNU, see the help documentation addendum for SP02 here: https://service.sap.com/~sapidb/012003146900000031772009E/7NW_SP02_Doc_Addend.pdf
4.6 List of Commands by Platform (Microsoft and NetWeaver versions) The following list is based on release 5.x, version for Microsoft. Each function can be used within an =evMNU(command,parameter1,) or within a VBA macro.
Menu command MNU_eANALYZE_REFRESH MNU_eANALYZE_OPENSTANDARD Description Recalculates reports. Same as MNU_eTools_Refresh Opens the report library. Parameter = directory path for MS No parameter allowed for NW, default is opens the eExcel directory Opens the MyReports report folder. Saves the report to the MyReports folder. Launches the dynamic template report dialog box. Sends data without clearing or refreshing. Sends data and refreshes the worksheet. Sends data and clears and refreshes the worksheet. Sends data without clearing or refreshing the worksheet. Sends data without clearing or refreshing the worksheet, and shows the result in a window upon successful send. Sends workbook and refreshes data. Sends workbook and clears data and refreshes workbook. Refreshes the schedule without sending data. Opens the schedule library Parameter = directory path for MS No parameter allowed for NW, default is opens the eExcel directory OPENMY Opens the MySchedules folder. Saves the input schedule to the MySchedules folder.
NetWeaver
Microsoft
MNU_eANALYZE_OPENMY MNU_eANALYZE_SAVEMY MNU_eANALYZE_REPORTWIZARD MNU_eSUBMIT_REFSCHEDULE_SHEET_NOAC TION MNU_eSUBMIT_REFSCHEDULE_SHEET_REFR ESH MNU_eSUBMIT_REFSCHEDULE_SHEET_CLEA RANDREFRESH MNU_eSUBMIT_REFSCHEDULE_BOOK_NOAC TION MNU_eSUBMIT_REFSCHEDULE_BOOK_NOAC TION_SHOWRESULT MNU_eSUBMIT_REFSCHEDULE_BOOK_REFRE SH MNU_eSUBMIT_REFSCHEDULE_BOOK_CLEAR ANDREFRESH MNU_eSUBMIT_REFRESH MNU_eSUBMIT_OPENSTANDARD
MNU_eSUBMIT_OPENMY MNU_eSUBMIT_SAVEMY
Menu command MNU_eSUBMIT_SCHEDULE MNU_eSUBMIT_VALIDATE MNU_eSUBMIT_CURRENT MNU_eSUBMIT_ONLINE MNU_eSUBMIT_SUBMIT MNU_eSUBMIT_MODIFY MNU_ePUBLISH_OPENPUBLICATION MNU_ePUBLISH_PUBLISHSHEET MNU_ePUBLISH_PUBLISHBOOK_WIZARD MNU_ePUBLISH_PUBLISHBOOK_NEW MNU_ePUBLISH_PUBLISHBOOK_EDIT MNU_ePUBLISH_PUBLISHBOOK_SAVE MNU_ePUBLISH_PUBLISHBOOK_SAVEAS MNU_ePUBLISH_PUBLISHBOOK_VALIDATE MNU_ePUBLISH_OFFLINE_WIZARD MNU_ePUBLISH_OFFLINE_NEW MNU_ePUBLISH_OFFLINE_EDIT MNU_ePUBLISH_OFFLINE_SAVE MNU_ePUBLISH_OFFLINE_SAVEAS MNU_ePUBLISH_OFFLINE_VALIDATE MNU_ePUBLISH_VIEWeDASH MNU_eTOOLS_CHANGEAPP MNU_eTOOLS_MEMBERSELECTOR_x
Description Opens the dynamic schedule template dialog box. Validates the data submission. Opens the Send and Refresh Schedules dialog box. Collaborates on input schedules. Submits supporting documents. Opens the work status action pane in BPC Web. Opens BPC Web directory Parameter = directory path Publishes a worksheet to BPC Web. Launches the book publication wizard. Creates a new book. Edits a book. Saves the current book. Opens the Save As dialog box. Validates the current book. Opens the Distribution Wizard. Creates a new offline report. Edits offline options. Saves the offline report. Opens the Save As dialog box. Validates an offline report. Opens BPC Web. Opens the Change Application Set dialog box. Opens the Member Lookup for the specified dimension type. The dimension types are: o o o o o o o o o A account C category E Entity T Time F Measures I Intercompany D data source S subtype Ua - Ux - User defined dimensions
NetWeaver
Microsoft
MNU_eTOOLS_REFRESH MNU_ETOOLS_PARKNGO MNU_eTOOLS_JOURNAL MNU_eJOURNAL_QUERY MNU_eJOURNAL_REPORT MNU_eTOOLS_OPENSTANDARD MNU_eTOOLS_SAVESTANDARD MNU_eTOOLS_UPDATEAPPINFO MNU_eTOOLS_DRILLDOWN MNU_eTOOLS_DRILLDOWN_BACK MNU_eTOOLS_DRILLDOWN_FORWARD MNU_eTOOLS_DRILLTHROUGH MNU_eTOOLS_DATAMANAGER MNU_eTOOLS_OPTION MNU_eTOOLS_WBOPTION MNU_eTOOLS_HELP MNU_eTOOLS_ABOUT EVGOTOHOMESHEET MNU_eData_RUNPACKAGE
For example, if you enter MNU_eTOOLS_MEMBERSELECTOR_E, the Member Lookup will open to the Entity dimension. Opens the Function Wizard Expands all dynamic expansions Combines the effects of the MNU_eTOOLS_EXPAND and MNU_eTOOLS_REFRESH macros Performs an expand all for dynamic expansions and then refreshes from the server Refreshes reports and input schedules from the server Opens the Park N Go dialog box Opens the Journal form. (Only available if Journals are set up on the server.) Opens the Journal Manager (Only available if Journals are set up on the server) Opens the Journal Report Wizard (Only available if Journals are set up on the server) Opens the template library Saves to template library Refreshes dimensions from server. Performs drill down on current cell. Reverses last drill down Performs a drill down that was undone by the DRILLDOWN_BACK task. Performs drill through on current cell. Opens the Data Manager and adds the eData menu. Opens the Client Options dialog box. Opens the Workbook Options dialog box. Opens BPC for Office Help in a web browser. Opens the About BPC dialog box. Returns you to the first sheet in the workbook. The first sheet must be named Home. Opens the Data Manager Run Package dialog box. Allows users who have access to run database packages.
MNU_eData_DataDownLoad
MNU_eDATA_NEWTRANSFORMATION MNU_eDATA_OPENTRANSFORMATION MNU_eDATA_SAVETRANSFORMATION MNU_eDATA_SAVESTRANSFORMATION MNU_eDATA_NEWCONVERSIONFILE MNU_eDATA_OPENCONVERSIONFILE MNU_eDATA_SAVECONVERSIONFILE MNU_eDATA_SAVEASCONVERSIONFILE MNU_eDATA_NEWCONVERSIONSHEET MNU_eDATA_CLEARPROMPTVALUE MNU_eDATA_TESTTRANSFORMATIONWDAT A MNU_ETOOLS_TASKPANE MNU_ESUBMIT_MANAGE_DYNAMICHIERARC HIES MNU_ESUBMIT_REFSCHEDULE_SHEET_NODI ALOG_SHOWRESULT MNU_ESUBMIT_REFSCHEDULE_BOOK_NODI ALOG_SHOWRESULT MNU_ESUBMIT_SENDDATA MNU_ESUBMIT_COMMENT MNU_ESUBMIT_SENDDATA_AFTER_COMMEN T MNU_ESUBMIT_COMMENT_AFTER_SENDDAT A
Description Open a specific Data Manager package. Syntax for this command is MNU_eDATA_SELECTPACKAGE(<package name>, <package file path>, <teamname>, <package group>) For only this menu command, the parameters are part of the MacroName so you must leave the Parameter section blank. For example, if you have MNU_eData_SelectPackage(""import"",""examples/ import.dts"",""HQ"") in cell A1, FX Restatement in cell A2, your EvMNU function would be: EvMNU(A1,A2,). Opens the Data Manager View Status dialog box Opens the Data Manager Organize Package dialog box Opens the Data Manager Manage Team User Package Access dialog box Opens the Data Manager Data Preview dialog box Opens the Data Manager Data Upload dialog box Allows users who have access to upload data files to the server perform data transformations. Opens the Data Manager Data Download dialog box Allows users who have access to download data files from the server Creates a new Data Manager Transformation sheet Opens the Data Manager Open Transformation dialog box Saves the active Transformation sheet Opens the Data Manager Save As Transformation Sheet dialog box Creates a new Data Manager conversion file Opens the Data Manager Open Conversion File dialog box Saves the active conversion file Shows the Data Manager Save as Conversion File dialog box Creates a new Conversion Sheet in the active Conversion workbook Clears saved Data Manager prompt values. Opens the Data Manager Test Transformation with Data dialog box Show ActionPane Open Dynamic Hierarchies Dialog Sending activesheet without any dialog and show resultbox Sending activebook without any dialog and show resultbox Sending data Only not Refresh data Sending comment Only not Refresh comment Sending data first Sending comment first
NetWeaver
Microsoft