Example: air traffic controller

How To… Pass parameters to custom logic BADI using …

pass parameters to custom logicBADI using START_BADISAP ProductName:SAP Business Planning and Consolidation ,version for SAP NetWeaverApplicable Product SP1 & aboveDocument Updated:Jan, 2009 Enterprise Copyright 2009 SAP AG. All rights part of this publication may be reproduced or transmittedin any form or for any purpose without the express permissionof SAP AG. The information contained herein may be changedwithout prior software products marketed by SAP AG and itsdistributors contain proprietary software components of othersoftware , Windows, Outlook,and PowerPointare registeredtrademarks of Microsoft , 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 registeredtrademarks of IBM Corporation in the United States and/orother is a registered trademark of Oracle , X/Open, OSF/1, and Motif are registered trademarks ofthe Open , ICA, Program Neighborhood, MetaFrame, WinFrame,VideoFrame, and MultiWina

Pass parameters to custom logic BADI using START_BADI SAP Product Name: SAP Business Planning and Consolidation 7.0, version for SAP NetWeaver Applicable Product Versions: 7.0 SP1 & …

Tags:

  Custom, Pass, Parameters, Logic, Adib, Pass parameters to custom logic badi

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of How To… Pass parameters to custom logic BADI using …

1 pass parameters to custom logicBADI using START_BADISAP ProductName:SAP Business Planning and Consolidation ,version for SAP NetWeaverApplicable Product SP1 & aboveDocument Updated:Jan, 2009 Enterprise Copyright 2009 SAP AG. All rights part of this publication may be reproduced or transmittedin any form or for any purpose without the express permissionof SAP AG. The information contained herein may be changedwithout prior software products marketed by SAP AG and itsdistributors contain proprietary software components of othersoftware , Windows, Outlook,and PowerPointare registeredtrademarks of Microsoft , 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 registeredtrademarks of IBM Corporation in the United States and/orother is a registered trademark of Oracle , X/Open, OSF/1, and Motif are registered trademarks ofthe Open , ICA, Program Neighborhood, MetaFrame, WinFrame,VideoFrame.

2 And MultiWinare trademarks or registeredtrademarks of Citrix Systems, , XML, XHTML and W3C are trademarks or registeredtrademarks of W3C , World Wide Web Consorti um,Massachusetts Institute of is a registered trademark of Sun Microsystems, is a registered trademark of Sun Microsystems, Inc.,used under license for technology invented and implementedby is a trademark of MySQL AB, , R/3, mySAP, , xApps, xApp, and other SAPproducts and services mentioned herein as well as theirrespective logos are trademarks or registered trademarks ofSAP AG in Germany and in several other countries all over theworld. All other product and service names mentioned are thetrademarks of their respective companies. Datacontained in this document serves informational purposesonly.

3 National product specifications may materials are subject to change without notice. Thesematerials are provided by SAP AG and its affiliated companies("SAP Group") for informational purposesonly, without representation or warranty of any kind, and SAPG roup shall not be liable for errors or omissions with respect tothe materials. The only warranties for SAP Group productsand services are those that are set forth in the express warrantystatements accompanying such products and services, if herein should be construed as constituting anadditional materials are provided as is without a warranty of anykind, either express or implied, including but not limited to,the implied warranties of merchantability, fitness for aparticular purpose, or shall not be liable for damages of any kind includingwithout limitation direct, special, indirect, or consequentialdamages that may result from the use of these does not warrant the accuracy or completeness of theinformation, text, graphics, links or other items containedwithin these materials.

4 SAP has no control over theinformation that you may access through the use of hot linkscontained in these materials and does not endorse your use ofthird party web pages nor provide any warranty whatsoeverrelating to third party web How-to Guides are intended to simplify the productimplementati on. While specific product features andprocedures typically are explained in a practical businesscontext, it is not implied that those features and procedures arethe only approach in solving a specific business problem usingSAP products. Should you wish to receive additionalinformation, clarification or support, please refer to software coding and/or code lines / strings ( Code )included in this documentation are only examples and are notintended to be used in a productive system environment.

5 TheCode is only intended better explain and visualize the syntaxand phrasing rules of certain coding. SAP does not warrant thecorrectness and completeness of the Code given herein, andSAP shall not be liable for errors or damages caused by theusage of the Code, except if such damages were caused by SAPintentionally or grossly ScenarioAt customers, there often needs the ability to have custom exits to perform a certain piece of business logicor to optimize performance by working with some of the lower level operations of the system. This guide isan introduction to the exit framework with allows customers to utilize ABAP custom logic within their BPCS cript logic . In addition, it describes how these exits can be made generic and be parameter that parameters can be passed from BPC Script logic into these ABAP this scenario, we will pass parameters to ABAP custom logic using START_BADI statements withinScript logic .

6 As an example, we will be implementing Declining Depreciation function (Similar to DECD keyword from FOX) using BADI IntroductionThere will be multiple scenarios where we want to pass parameters from script logic to ABAP BADI implementation. For example, an BPC User wants to calculate rates from the Finance cube and post theresults to rate cube. During this calculation, the administrator may want to pass the target AppSet andApplication (cube) when calling the BADI. As of Business Planning and Consolidation Version forNetWeaver Support Package 1 (Released on Dec 12 2008), we are introducing new keywords called*START_BADI and * Details and UsageThe START_BADI and END_BADI syntax can be used to pass parameters to the ABAP custom these tags, we can pass on multiple parameters and they all will be available inside the :*START_BADI <filter_value_of_your_BADI_implementation> <key1> = <value1> <key2> = <value2>.

7 *END_BADI wherefilter_value_of_your_BADI_implement ationis the name of the filter youprovided during the BADI implementation of UJ_CUSTOM_LOGIC are two optional parameters you can use within a *START_BADI / *END_BADI instruction.*START_BADI <filter_value_of_your_BADI_implementation>QUERY=ON/OFF //optional; default is OFFWRITE=ON/OFF //optional; default is OFF*END_BADIQ uery performs a default query and Write automatically writes back the data. Set QUERY parameter toOFF if you want to perform your own read inside the BADI implementation; set WRITE to OFF to not writeback query results automatically. You may code to write to another application from the how to guide walks through a step-by-step example in the ApShell Planning cube.

8 Please note youmust have appropriate NetWeaver BI and BPC authorizations to perform the required The Step By Step SolutionWe will first create the BADI implementation for the Declining Depreciation function and then, use thefunction in the ApShell Planning Application s script Implement UJ_CUSTOM_LOGIC BADI1. Log in to ABAP layer o your BPCthrough SAP Log on Go to transaction Provide the Enhancement Spot as UJ_CUSTOM_LOGIC and click on Create Impl..4. In the next screen, Provide nameand description for EnhancementImplementation. You don t have toprovide the CompositeEnhancement Implementation, if youare not doing this case, we are calling theenhancement implementation ZBPC_DECD , with short text BPC: Declining-BalanceDepreciation.

9 5. Click the Green : You will need a developerkey to be able to create Provide your package name andclick on Save button in the In the next screen, provide name forBADI Implementation andImplementation Class. Choose BADID efinition asBADI_UJ_CUSTOM_LOGIC fromthe drop this case, we re specifyingBADI Im plement ation: ZBPC_DECDI mplem ent ation Class: ZCL_BPC_DECDBADI Definition: BADI_UJ_CUSTOM_LOGIC8. Click the Green check to Provide package information for theimplementation class and then, clickon Inside the EnhancementImplementation screen, expand theBADI Double click on Filter Val 12. Click on the Create FilterCombination Double click on the ???? under thevalue 1 Fill in the Value 1.

10 This is the nameusers will be using to the BADI fromthe script. Use a name which willmake sense to business , click this example, we will specify DECD .15. Now double click on ImplementingClass .16. Double click on methodIF_UJ_CUSTOM_LOGIC~EXECUTE to create the System will ask for confirmation tocreate the implementation. Click System will then prompt for savingEnhancement Implementation so on System will take to EXECUTE method implementation. Click on thepencil button to go into changemode. Copy and the sample codeprovided in the Appendix or codeyour Then, click on Activate System will prompt for all the objectswhich you created. Choose theobjects related to this wholeimplementation (Shown in thescreen for this example) and clickOK in the bottom.


Related search queries