SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
SAP BOBJ Planning &
Consolidation, version
for SAP Netweaver
How-To Guide
How To...
Custom BADI for replicating
“Destination_App” script logic
functionality in SAP
BUSINESSOBJECTS PLANNING AND
CONSOLIDATION, version of SAP
NetWeaver.
Applicable Releases:
SAP BusinessObjects Planning and Consolidations, version for SAP
NetWeaver, version 7.0, SP02 and higher.
SAP BOBJ Planning &
Consolidation, version
for SAP Netweaver
How-To Guide
Version 1.00
July 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, Informix,
i5/OS, POWER, POWER5, OpenPower and PowerPC are
trademarks or registered trademarks of IBM Corporation.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader
are either trademarks or registered trademarks of Adobe
Systems Incorporated 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, SAP
NetWeaver, 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 NetWeaver “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 NetWeaver. 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.
Disclaimer
Some components of this product are based on Java™. Any
code change in these components may cause unpredictable
and severe malfunctions and is therefore expressively
prohibited, as is any decompilation of these components.
Any Java™ Source Code delivered with this product is only
to be used by SAP’s Support Services and may not be
modified or altered in any way.
Document History
Document Version Description
1.00 First official release of this guide
Typographic Conventions
Type Style Description
Example Text Words or characters quoted
from the screen. These
include field names, screen
titles, pushbuttons labels,
menu names, menu paths,
and menu options.
Cross-references to other
documentation
Example text Emphasized words or
phrases in body text, graphic
titles, and table titles
Example text File and directory names and
their paths, messages,
names of variables and
parameters, source text, and
names of installation,
upgrade and database tools.
Example text User entry texts. These are
words or characters that you
enter in the system exactly as
they appear in the
documentation.
<Example
text>
Variable user entry. Angle
brackets indicate that you
replace these words and
characters with appropriate
entries to make entries in the
system.
EXAMPLE TEXT Keys on the keyboard, for
example, F2 or ENTER.
Icons
Icon Description
Caution
Note or Important
Example
Recommendation or Tip
Table of Contents
1. Business Scenario ..........................................................................................................1
2. Background Information .................................................................................................1
3. Prerequisites....................................................................................................................1
4. Step-by-Step Procedure..................................................................................................2
5. Implementation................................................................................................................3
6. Error Messaging..............................................................................................................9
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 1
1. Business Scenario
During typical planning scenarios records may be require to be copied or aggregated into application
outside of the application in which the record was first created. One example might be where detail
planning occurs in one application, but these planned records also need to be “sent” to a higher level
aggregated view of the plan stored in different application.
2. Background Information
The Destination_App functionality has been extensively used in the current SAP BusinessObjects
Planning and Consolidation, version of Microsoft as well as earlier versions of BPC/Outlooksoft. This
How To Guide (HTG) describes the procedure for implementing a Business Add-In (BADI) that
establishes a new keyword in script logic emulating the original Destination_App functionality.
This BADI will allow the transfer of records from a specified source application to specified target
application. Both applications must be contained within the same AppSet.
3. Prerequisites
SAP BusinessObjects Planning and Consolidation version for SAP NetWeaver 7.0 SP02 or
higher
ABAP programming skills (desirable but necessary)
Access to SAP NetWeaver transaction codes: SE20, SE19, SE20, SE38, STMS
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 2
4. Step-by-Step Procedure
This How-To Guide has a transport associated with it. Send the transports to your organization’s
BASIS administrator and have him/her import the transport into the system where you want to
implement the How-To Guide solution.
These transports contain the following series of objects:
Z_EI_BPC_SL_DESTINATION_APP Enhancement Implementation
ZCL_SL_BPC_DESTINATION_APP Implementation Class
ZMC_BPC_APP Message Class
ZBPC_DAPP Package
After your BASIS Administrator successfully loads the transports into your system verify that the
objects exist and all objects are active.
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 3
5. Implementation
One the BADI has been correctly installed; the user can create script logic that calls the BADI to
perform the record transfers.
To call the BADI from script logic, use the following format:
*START_BADI DAPP
DESTINATION_APP=“PLANNING5“
WRITE=OFF
*END_BADI
In the above example the target destination is “PLANNING5”. Please include the additional statement
WRITE=OFF to enhance overall BADI performance. If you forget, and warning message will be
displayed at execution that will remind you the adding this statement will enhance performance.
Notes:
1. Scoping statements can be used to limit the number of records processed in the BADI call
2. There is no need for adding a *COMMIT statement to post records into the database, the execution
of the BADI performs function this automatically.
3. Valid parameters that can be used with this BADI:
DESTINATION_APP
Format: DESTINATION_APP=”<name of target application>”
Please be sure to include the open/closed quotation marks.
RENAME_DIM
Format: RENAME_DIM=”<source dim name>=<target dim name>”,”<source dim name>=<target dim name>”,….
Only one RENAME_DIM parameter will be accepted, but you can add as many combinations
of source:target dimensions by separating the individual groups with a comma.
ADD_DIM
Format: ADD_DIM=”<dim name>”,”<dim name>”,…
Only one ADD_DIM parameter will be accepted, but you can add as many combinations of
target dimensions by separating the individual groups with a comma.
WRITE
Format: WRITE=ON - or - WRITE=OFF
DO NOT USE open/closed quotation marks around ON or OFF.
Default is WRITE=ON, for this BADI please make sure you use WRITE=OFF !
QUERY
Format: QUERY=ON –or- QUERY=OFF
DO NOT USE open/closed quotation marks around ON or OFF.
Default is QUERY=ON
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 4
DEBUG
Format: DEBUG=ON –or- DEBUG=OFF
DO NOT USE open/closed quotation marks around ON or OFF.
Default is DEBUG=OFF
If DEBUG is set to ON, then a more detailed log is generated identifying all records generated
during execution.
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 5
Example scenarios for using “DAPP”:
1. Source and Target applications have the same dimensions, but one or more dimension names are
different.
In this scenario one or more of the source dimensions have a different name in the target application:
Source Application Target Application
Note the change in the P_ACCT dimension in the source application (PLANNING) to the P2_ACCT
dimension name in the target application (PLANNING2).
Use the keyword RENAME_DIM to identify the new target dimension, for example:
*XDIM_MEMBERSET TIME = 2009.JAN
*XDIM_MEMBERSET CATEGORY = PLAN
*XDIM_MEMBERSET P_ACCT = VALIDATION
*XDIM_MEMBERSET RPTCURRENCY = LC
*START_BADI DAPP
DESTINATION_APP=“PLANNING2“
RENAME_DIM="P_ACCT=P2_ACCT"
WRITE=OFF
*END_BADI
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 6
2. Target application has one or more dimensions not include in Source application.
In this scenario one or more of the source dimensions have a different name in the target application:
Source Application Target Application
Note the change in the addition of the IntCo dimension in the target application (PLANNING4).
Use the keyword ADD_DIM to specify a value for the new target dimension, for example:
*XDIM_MEMBERSET TIME = 2009.JAN
*XDIM_MEMBERSET CATEGORY = PLAN
*XDIM_MEMBERSET P_ACCT = VALIDATION
*XDIM_MEMBERSET RPTCURRENCY = LC
*START_BADI DAPP
DESTINATION_APP=“PLANNING4“
ADD_DIM = "INTCO=I_NONE"
WRITE=OFF
*END_BADI
Note: the BADI will check that the dimension member value already exists.
Records cannot be created for dimension members that have not been loaded.
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 7
3. Source application has dimensions that do not exist in the Target application.
In this scenario there are one or more source dimensions that don’t exist in the Target application.
Source Application Target Application
Note the missing dimension, P_Activity, in the target application (PLANNING3).
In prior versions of BPC this situation was controlled via the keyword SKIP_DIM. The use of
SKIP_DIM is no longer necessary due to the automatic aggregation provided by SAP NetWeaver.
The following code will correctly migrate records from the source into the target application:
*XDIM_MEMBERSET TIME = 2009.JAN
*XDIM_MEMBERSET CATEGORY = PLAN
*XDIM_MEMBERSET P_ACCT = VALIDATION
*XDIM_MEMBERSET RPTCURRENCY = LC
*START_BADI DAPP
DESTINATION_APP=“PLANNING3“
WRITE=OFF
*END_BADI
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 8
4. Combination of example scenarios 1, 2 and 3.
DAPP can process combination of all of the previously described simple senerios.
In this scenario, there are one or more source dimensions that don’t exist in the Target application.
Source Application Target Application
Note:
1. The missing dimension, P_Activity, in the target application (PLANNING5).
2. The change in dimension name P_ACCT to P2_ACCT
3. An additional dimension added to the target application.
The following code will correctly migrate records from PLANNING into PLANNING5:
*XDIM_MEMBERSET TIME = 2009.JAN
*XDIM_MEMBERSET CATEGORY = PLAN
*XDIM_MEMBERSET P_ACCT = VALIDATION
*XDIM_MEMBERSET RPTCURRENCY = LC
*START_BADI DAPP
DESTINATION_APP=“PLANNING5“
RENAME_DIM="P_ACCT=P2_ACCT"
ADD_DIM = "INTCO=I_NONE"
WRITE=OFF
*END_BADI
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 9
6. Error Messaging
This BADI has incorporated several error messages to help the user navigate the process:
Message 1:
“The Dimension P2_ACCT does not exist in Application PLANNING4, so it cannot be added.
An error occured while processing parameters, exiting Destination App.”
This error message will be displayed if the user attempts to use the RENAME_DIM command for a
dimension (P2_ACCT in the example shown) that does not exist in the target application (PLANNING4
in the example shown).
Message 2:
The Dimension INTCO does not exist in Application PLANNING5, so it cannot be added.
An error occured while processing parameters, exiting Destination App.
This error message will be displayed if the user attempts to use the ADD_DIM command for a
dimension (INTCO in the example shown) that does not exist in the target application (PLANNING5 in
the example shown).
Message 3:
For Performance Reasons please add the parameter WRITE=OFF.
User failed to add the statement WRITE=OFF as part of the BADI parameter submittal.
Example:
*START_BADI DAPP
DESTINATION_APP=”PLANNING5”
RENAME_DIM="P_ACCT=P2_ACCT"
ADD_DIM = "INTCO=I_NONE"
WRITE=OFF
*END_BADI
NOTE: Do not enclose OFF or ON in parentheses!
Message 4:
Write Back Failed with Error
No records found
This message will appear if the scrip logic developer turns off the query option in the BAPI parameter
list. For example:
*START_BADI DAPP
DESTINATION_APP=”PLANNING5”
RENAME_DIM="P_ACCT=P2_ACCT"
ADD_DIM = "INTCO=I_NONE"
WRITE=OFF
QUERY=OFF
*END_BADI
QUERY=OFF should only be used during initial development or troubleshooting. Best practice is to
set this parameter as QUERY=ON or not specified at all (default uses Query=ON).
NOTE: Do not enclose OFF or ON in parentheses!
How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for
Netweaver.
July 2009 10
Message 5:
The value PLANNING5 is not specified correctly for parameter DESTINATION_APP.
Please remember that parameter DESTINATION_APP requires '"' marks around its value.
An error occured while processing parameters, exiting Destination App.
This error results from failure to add the open/closed quotations around the parameter value for the parameter
DESTINATION_APP
Example: DESTINATION_APP=”PLANNING5”
Message 6:
The value P_ACCT=P2_ACCT is not specified correctly for parameter RENAME_DIM.
Please remember that parameter RENAME_DIM requires '"' marks around its value.
An error occures while processing parameters, exiting Destination App.
This error results from failure to add the open/closed quotations around the parameter value for the parameter
RENAME_DIM.
Example: RENAME_DIM=”P_ACCT=P2_ACCT”
Message 7:
The Dimension Member XYZ123 for Dimension INTCO is not valid.
An error occured while processing parameters, exiting Destination App.
This error results from failure to specify a valid dimension member value as the parameter value in the
ADD_DIM statement.
Example:
*START_BADI DAPP
DESTINATION_APP="PLANNING5"
RENAME_DIM="P_ACCT=P2_ACCT"
ADD_DIM = "INTCO=XYZ123"
WRITE=OFF
*END_BADI
The error message occurs because the value XYZ123 does not exist as a valid dimension member.
Message 8:
You have not specified the parameter INTCO which is required.
If the target application has dimensions not existing in the source application, then the extra target
dimensions must be identified with the ADD_DIM statement.
Message 9:
Begin Writing Records to Data Manager Log
If the DEBUG=ON
Parameter is set, then the system will create a more detailed log including the values of all written
records. The enhance log starts with the line “Begin Writing Records to Data Manager Log“
www.sdn.sap.com/irj/sdn/howtoguides

Contenu connexe

Tendances

Abap package concept
Abap package conceptAbap package concept
Abap package conceptTobias Trapp
 
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OSWhat’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OSSurekha Parekh
 
LeverX SAP ABAP Tutorial Creating Function Modules
LeverX SAP ABAP Tutorial Creating Function ModulesLeverX SAP ABAP Tutorial Creating Function Modules
LeverX SAP ABAP Tutorial Creating Function ModulesLeverX
 
SAP Business One Integration Problems and Solutions - DI server DI API B1WS
SAP Business One Integration Problems and Solutions - DI server DI API B1WSSAP Business One Integration Problems and Solutions - DI server DI API B1WS
SAP Business One Integration Problems and Solutions - DI server DI API B1WSAPPSeCONNECT
 
Collaborate12 fce
Collaborate12 fceCollaborate12 fce
Collaborate12 fcerkrivera
 
Salesforce Summer'15 release overview
 Salesforce Summer'15 release overview Salesforce Summer'15 release overview
Salesforce Summer'15 release overviewRakesh Gupta
 
Workflow Management with Espresso Workflow
Workflow Management with Espresso WorkflowWorkflow Management with Espresso Workflow
Workflow Management with Espresso WorkflowRolf Kremer
 
SAP B1 mobile setup-sandeep rathod
SAP B1 mobile setup-sandeep rathodSAP B1 mobile setup-sandeep rathod
SAP B1 mobile setup-sandeep rathodSandeep Rathod
 
SAP Business One; Step-by-Step Guide for Installation, configuration on Virtu...
SAP Business One; Step-by-Step Guide for Installation, configuration on Virtu...SAP Business One; Step-by-Step Guide for Installation, configuration on Virtu...
SAP Business One; Step-by-Step Guide for Installation, configuration on Virtu...Nasir Gondal
 
08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overview08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overviewsapdocs. info
 

Tendances (19)

Abap package concept
Abap package conceptAbap package concept
Abap package concept
 
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OSWhat’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
What’s New For SQL Optimization In DB2 9 And DB2 10 For z/OS
 
LeverX SAP ABAP Tutorial Creating Function Modules
LeverX SAP ABAP Tutorial Creating Function ModulesLeverX SAP ABAP Tutorial Creating Function Modules
LeverX SAP ABAP Tutorial Creating Function Modules
 
Workflow for XPages
Workflow for XPagesWorkflow for XPages
Workflow for XPages
 
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
SUSE Technical Webinar: Build B1 apps in the Framework of the SAP and SUSE Ca...
 
SAP Business One Integration Problems and Solutions - DI server DI API B1WS
SAP Business One Integration Problems and Solutions - DI server DI API B1WSSAP Business One Integration Problems and Solutions - DI server DI API B1WS
SAP Business One Integration Problems and Solutions - DI server DI API B1WS
 
Collaborate12 fce
Collaborate12 fceCollaborate12 fce
Collaborate12 fce
 
Salesforce Summer'15 release overview
 Salesforce Summer'15 release overview Salesforce Summer'15 release overview
Salesforce Summer'15 release overview
 
Workflow Management with Espresso Workflow
Workflow Management with Espresso WorkflowWorkflow Management with Espresso Workflow
Workflow Management with Espresso Workflow
 
Srm 6.0
Srm 6.0Srm 6.0
Srm 6.0
 
Sap srm
Sap srm Sap srm
Sap srm
 
SAP B1 mobile setup-sandeep rathod
SAP B1 mobile setup-sandeep rathodSAP B1 mobile setup-sandeep rathod
SAP B1 mobile setup-sandeep rathod
 
Introduction to Visualforce
Introduction to VisualforceIntroduction to Visualforce
Introduction to Visualforce
 
Dialog programming ABAP
Dialog programming ABAPDialog programming ABAP
Dialog programming ABAP
 
SAP Business One; Step-by-Step Guide for Installation, configuration on Virtu...
SAP Business One; Step-by-Step Guide for Installation, configuration on Virtu...SAP Business One; Step-by-Step Guide for Installation, configuration on Virtu...
SAP Business One; Step-by-Step Guide for Installation, configuration on Virtu...
 
Aec1105
Aec1105Aec1105
Aec1105
 
08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overview08.Abap Dialog Programming Overview
08.Abap Dialog Programming Overview
 
Module pool programming
Module pool programmingModule pool programming
Module pool programming
 
Autodesk Technical Webinar: SAP Business One
Autodesk Technical Webinar: SAP Business OneAutodesk Technical Webinar: SAP Business One
Autodesk Technical Webinar: SAP Business One
 

Similaire à Badi

How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...Ganesh Kumar
 
How to part 2 build an agentry based app from scratch
How to part 2 build an agentry based app from scratchHow to part 2 build an agentry based app from scratch
How to part 2 build an agentry based app from scratchGanesh Kumar
 
How to configure and use change recording
How to configure and use change recordingHow to configure and use change recording
How to configure and use change recordingPhani Kumar
 
How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...Jaime Marchant Benavides
 
Testing SAP HANA applications with SAP LoadRunner by HP
Testing SAP HANA applications with SAP LoadRunner by HPTesting SAP HANA applications with SAP LoadRunner by HP
Testing SAP HANA applications with SAP LoadRunner by HPSAP Solution Extensions
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwLuc Vanrobays
 
End user experience monitoring
End user experience monitoringEnd user experience monitoring
End user experience monitoringSanjay Sahita
 
Ppf in sap_ewm_1
Ppf in sap_ewm_1Ppf in sap_ewm_1
Ppf in sap_ewm_1Yuan Lin
 
White papersap sollandscape
White papersap sollandscapeWhite papersap sollandscape
White papersap sollandscapeGiuseppe Caselli
 
Sap me how to-guide - barcode scanning
Sap me how to-guide - barcode scanningSap me how to-guide - barcode scanning
Sap me how to-guide - barcode scanningBob Grochowski
 
Funds management configuration sap ag
Funds management configuration sap agFunds management configuration sap ag
Funds management configuration sap agLluckyy
 
Accessibility guideline web_dynpro_external_version
Accessibility guideline web_dynpro_external_versionAccessibility guideline web_dynpro_external_version
Accessibility guideline web_dynpro_external_versionadatta12
 
Sap me how to-guide - oee reporting
Sap me how to-guide - oee reportingSap me how to-guide - oee reporting
Sap me how to-guide - oee reportingGinoRolanRojasSilves
 
Ac409c27 5a7c-0010-82c7-eda71af511fa
Ac409c27 5a7c-0010-82c7-eda71af511faAc409c27 5a7c-0010-82c7-eda71af511fa
Ac409c27 5a7c-0010-82c7-eda71af511faNagendra Babu
 
F05fba45 0b5f-2c10-a697-f36efa24e899
F05fba45 0b5f-2c10-a697-f36efa24e899F05fba45 0b5f-2c10-a697-f36efa24e899
F05fba45 0b5f-2c10-a697-f36efa24e899Deepa Bisht
 
142 bb config_guide_en_co
142 bb config_guide_en_co142 bb config_guide_en_co
142 bb config_guide_en_coSachin Kamat
 

Similaire à Badi (20)

How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...
 
How to part 2 build an agentry based app from scratch
How to part 2 build an agentry based app from scratchHow to part 2 build an agentry based app from scratch
How to part 2 build an agentry based app from scratch
 
How to configure and use change recording
How to configure and use change recordingHow to configure and use change recording
How to configure and use change recording
 
How to conf_mopz_22_slm
How to conf_mopz_22_slmHow to conf_mopz_22_slm
How to conf_mopz_22_slm
 
How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...How to build an agentry based mobile app from scratch connecting to an sap ba...
How to build an agentry based mobile app from scratch connecting to an sap ba...
 
Testing SAP HANA applications with SAP LoadRunner by HP
Testing SAP HANA applications with SAP LoadRunner by HPTesting SAP HANA applications with SAP LoadRunner by HP
Testing SAP HANA applications with SAP LoadRunner by HP
 
How to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bwHow to use abap cds for data provisioning in bw
How to use abap cds for data provisioning in bw
 
End user experience monitoring
End user experience monitoringEnd user experience monitoring
End user experience monitoring
 
Ppf in sap_ewm_1
Ppf in sap_ewm_1Ppf in sap_ewm_1
Ppf in sap_ewm_1
 
White papersap sollandscape
White papersap sollandscapeWhite papersap sollandscape
White papersap sollandscape
 
Sap me how to-guide - barcode scanning
Sap me how to-guide - barcode scanningSap me how to-guide - barcode scanning
Sap me how to-guide - barcode scanning
 
Sap me how to-guide - barcode scanning
Sap me how to-guide - barcode scanningSap me how to-guide - barcode scanning
Sap me how to-guide - barcode scanning
 
SAP BI 7.0 Info Providers
SAP BI 7.0 Info ProvidersSAP BI 7.0 Info Providers
SAP BI 7.0 Info Providers
 
Funds management configuration sap ag
Funds management configuration sap agFunds management configuration sap ag
Funds management configuration sap ag
 
Accessibility guideline web_dynpro_external_version
Accessibility guideline web_dynpro_external_versionAccessibility guideline web_dynpro_external_version
Accessibility guideline web_dynpro_external_version
 
Sap me how to-guide - oee reporting
Sap me how to-guide - oee reportingSap me how to-guide - oee reporting
Sap me how to-guide - oee reporting
 
Ac409c27 5a7c-0010-82c7-eda71af511fa
Ac409c27 5a7c-0010-82c7-eda71af511faAc409c27 5a7c-0010-82c7-eda71af511fa
Ac409c27 5a7c-0010-82c7-eda71af511fa
 
F05fba45 0b5f-2c10-a697-f36efa24e899
F05fba45 0b5f-2c10-a697-f36efa24e899F05fba45 0b5f-2c10-a697-f36efa24e899
F05fba45 0b5f-2c10-a697-f36efa24e899
 
142 bb config_guide_en_co
142 bb config_guide_en_co142 bb config_guide_en_co
142 bb config_guide_en_co
 
sap pp
sap ppsap pp
sap pp
 

Badi

  • 1. SAP BOBJ Planning & Consolidation, version for SAP Netweaver How-To Guide How To... Custom BADI for replicating “Destination_App” script logic functionality in SAP BUSINESSOBJECTS PLANNING AND CONSOLIDATION, version of SAP NetWeaver. Applicable Releases: SAP BusinessObjects Planning and Consolidations, version for SAP NetWeaver, version 7.0, SP02 and higher.
  • 2. SAP BOBJ Planning & Consolidation, version for SAP Netweaver How-To Guide Version 1.00 July 2009
  • 3. © 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, Informix, i5/OS, POWER, POWER5, OpenPower and PowerPC are trademarks or registered trademarks of IBM Corporation. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated 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, SAP NetWeaver, 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 NetWeaver “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 NetWeaver. 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. Disclaimer Some components of this product are based on Java™. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any Java™ Source Code delivered with this product is only to be used by SAP’s Support Services and may not be modified or altered in any way.
  • 4. Document History Document Version Description 1.00 First official release of this guide
  • 5. Typographic Conventions Type Style Description Example Text Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options. Cross-references to other documentation Example text Emphasized words or phrases in body text, graphic titles, and table titles Example text File and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools. Example text User entry texts. These are words or characters that you enter in the system exactly as they appear in the documentation. <Example text> Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system. EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER. Icons Icon Description Caution Note or Important Example Recommendation or Tip
  • 6. Table of Contents 1. Business Scenario ..........................................................................................................1 2. Background Information .................................................................................................1 3. Prerequisites....................................................................................................................1 4. Step-by-Step Procedure..................................................................................................2 5. Implementation................................................................................................................3 6. Error Messaging..............................................................................................................9
  • 7. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 1 1. Business Scenario During typical planning scenarios records may be require to be copied or aggregated into application outside of the application in which the record was first created. One example might be where detail planning occurs in one application, but these planned records also need to be “sent” to a higher level aggregated view of the plan stored in different application. 2. Background Information The Destination_App functionality has been extensively used in the current SAP BusinessObjects Planning and Consolidation, version of Microsoft as well as earlier versions of BPC/Outlooksoft. This How To Guide (HTG) describes the procedure for implementing a Business Add-In (BADI) that establishes a new keyword in script logic emulating the original Destination_App functionality. This BADI will allow the transfer of records from a specified source application to specified target application. Both applications must be contained within the same AppSet. 3. Prerequisites SAP BusinessObjects Planning and Consolidation version for SAP NetWeaver 7.0 SP02 or higher ABAP programming skills (desirable but necessary) Access to SAP NetWeaver transaction codes: SE20, SE19, SE20, SE38, STMS
  • 8. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 2 4. Step-by-Step Procedure This How-To Guide has a transport associated with it. Send the transports to your organization’s BASIS administrator and have him/her import the transport into the system where you want to implement the How-To Guide solution. These transports contain the following series of objects: Z_EI_BPC_SL_DESTINATION_APP Enhancement Implementation ZCL_SL_BPC_DESTINATION_APP Implementation Class ZMC_BPC_APP Message Class ZBPC_DAPP Package After your BASIS Administrator successfully loads the transports into your system verify that the objects exist and all objects are active.
  • 9. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 3 5. Implementation One the BADI has been correctly installed; the user can create script logic that calls the BADI to perform the record transfers. To call the BADI from script logic, use the following format: *START_BADI DAPP DESTINATION_APP=“PLANNING5“ WRITE=OFF *END_BADI In the above example the target destination is “PLANNING5”. Please include the additional statement WRITE=OFF to enhance overall BADI performance. If you forget, and warning message will be displayed at execution that will remind you the adding this statement will enhance performance. Notes: 1. Scoping statements can be used to limit the number of records processed in the BADI call 2. There is no need for adding a *COMMIT statement to post records into the database, the execution of the BADI performs function this automatically. 3. Valid parameters that can be used with this BADI: DESTINATION_APP Format: DESTINATION_APP=”<name of target application>” Please be sure to include the open/closed quotation marks. RENAME_DIM Format: RENAME_DIM=”<source dim name>=<target dim name>”,”<source dim name>=<target dim name>”,…. Only one RENAME_DIM parameter will be accepted, but you can add as many combinations of source:target dimensions by separating the individual groups with a comma. ADD_DIM Format: ADD_DIM=”<dim name>”,”<dim name>”,… Only one ADD_DIM parameter will be accepted, but you can add as many combinations of target dimensions by separating the individual groups with a comma. WRITE Format: WRITE=ON - or - WRITE=OFF DO NOT USE open/closed quotation marks around ON or OFF. Default is WRITE=ON, for this BADI please make sure you use WRITE=OFF ! QUERY Format: QUERY=ON –or- QUERY=OFF DO NOT USE open/closed quotation marks around ON or OFF. Default is QUERY=ON
  • 10. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 4 DEBUG Format: DEBUG=ON –or- DEBUG=OFF DO NOT USE open/closed quotation marks around ON or OFF. Default is DEBUG=OFF If DEBUG is set to ON, then a more detailed log is generated identifying all records generated during execution.
  • 11. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 5 Example scenarios for using “DAPP”: 1. Source and Target applications have the same dimensions, but one or more dimension names are different. In this scenario one or more of the source dimensions have a different name in the target application: Source Application Target Application Note the change in the P_ACCT dimension in the source application (PLANNING) to the P2_ACCT dimension name in the target application (PLANNING2). Use the keyword RENAME_DIM to identify the new target dimension, for example: *XDIM_MEMBERSET TIME = 2009.JAN *XDIM_MEMBERSET CATEGORY = PLAN *XDIM_MEMBERSET P_ACCT = VALIDATION *XDIM_MEMBERSET RPTCURRENCY = LC *START_BADI DAPP DESTINATION_APP=“PLANNING2“ RENAME_DIM="P_ACCT=P2_ACCT" WRITE=OFF *END_BADI
  • 12. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 6 2. Target application has one or more dimensions not include in Source application. In this scenario one or more of the source dimensions have a different name in the target application: Source Application Target Application Note the change in the addition of the IntCo dimension in the target application (PLANNING4). Use the keyword ADD_DIM to specify a value for the new target dimension, for example: *XDIM_MEMBERSET TIME = 2009.JAN *XDIM_MEMBERSET CATEGORY = PLAN *XDIM_MEMBERSET P_ACCT = VALIDATION *XDIM_MEMBERSET RPTCURRENCY = LC *START_BADI DAPP DESTINATION_APP=“PLANNING4“ ADD_DIM = "INTCO=I_NONE" WRITE=OFF *END_BADI Note: the BADI will check that the dimension member value already exists. Records cannot be created for dimension members that have not been loaded.
  • 13. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 7 3. Source application has dimensions that do not exist in the Target application. In this scenario there are one or more source dimensions that don’t exist in the Target application. Source Application Target Application Note the missing dimension, P_Activity, in the target application (PLANNING3). In prior versions of BPC this situation was controlled via the keyword SKIP_DIM. The use of SKIP_DIM is no longer necessary due to the automatic aggregation provided by SAP NetWeaver. The following code will correctly migrate records from the source into the target application: *XDIM_MEMBERSET TIME = 2009.JAN *XDIM_MEMBERSET CATEGORY = PLAN *XDIM_MEMBERSET P_ACCT = VALIDATION *XDIM_MEMBERSET RPTCURRENCY = LC *START_BADI DAPP DESTINATION_APP=“PLANNING3“ WRITE=OFF *END_BADI
  • 14. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 8 4. Combination of example scenarios 1, 2 and 3. DAPP can process combination of all of the previously described simple senerios. In this scenario, there are one or more source dimensions that don’t exist in the Target application. Source Application Target Application Note: 1. The missing dimension, P_Activity, in the target application (PLANNING5). 2. The change in dimension name P_ACCT to P2_ACCT 3. An additional dimension added to the target application. The following code will correctly migrate records from PLANNING into PLANNING5: *XDIM_MEMBERSET TIME = 2009.JAN *XDIM_MEMBERSET CATEGORY = PLAN *XDIM_MEMBERSET P_ACCT = VALIDATION *XDIM_MEMBERSET RPTCURRENCY = LC *START_BADI DAPP DESTINATION_APP=“PLANNING5“ RENAME_DIM="P_ACCT=P2_ACCT" ADD_DIM = "INTCO=I_NONE" WRITE=OFF *END_BADI
  • 15. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 9 6. Error Messaging This BADI has incorporated several error messages to help the user navigate the process: Message 1: “The Dimension P2_ACCT does not exist in Application PLANNING4, so it cannot be added. An error occured while processing parameters, exiting Destination App.” This error message will be displayed if the user attempts to use the RENAME_DIM command for a dimension (P2_ACCT in the example shown) that does not exist in the target application (PLANNING4 in the example shown). Message 2: The Dimension INTCO does not exist in Application PLANNING5, so it cannot be added. An error occured while processing parameters, exiting Destination App. This error message will be displayed if the user attempts to use the ADD_DIM command for a dimension (INTCO in the example shown) that does not exist in the target application (PLANNING5 in the example shown). Message 3: For Performance Reasons please add the parameter WRITE=OFF. User failed to add the statement WRITE=OFF as part of the BADI parameter submittal. Example: *START_BADI DAPP DESTINATION_APP=”PLANNING5” RENAME_DIM="P_ACCT=P2_ACCT" ADD_DIM = "INTCO=I_NONE" WRITE=OFF *END_BADI NOTE: Do not enclose OFF or ON in parentheses! Message 4: Write Back Failed with Error No records found This message will appear if the scrip logic developer turns off the query option in the BAPI parameter list. For example: *START_BADI DAPP DESTINATION_APP=”PLANNING5” RENAME_DIM="P_ACCT=P2_ACCT" ADD_DIM = "INTCO=I_NONE" WRITE=OFF QUERY=OFF *END_BADI QUERY=OFF should only be used during initial development or troubleshooting. Best practice is to set this parameter as QUERY=ON or not specified at all (default uses Query=ON). NOTE: Do not enclose OFF or ON in parentheses!
  • 16. How To...Custom BAPI for replicating “Destination_App” script logic functionality in BPC, version for Netweaver. July 2009 10 Message 5: The value PLANNING5 is not specified correctly for parameter DESTINATION_APP. Please remember that parameter DESTINATION_APP requires '"' marks around its value. An error occured while processing parameters, exiting Destination App. This error results from failure to add the open/closed quotations around the parameter value for the parameter DESTINATION_APP Example: DESTINATION_APP=”PLANNING5” Message 6: The value P_ACCT=P2_ACCT is not specified correctly for parameter RENAME_DIM. Please remember that parameter RENAME_DIM requires '"' marks around its value. An error occures while processing parameters, exiting Destination App. This error results from failure to add the open/closed quotations around the parameter value for the parameter RENAME_DIM. Example: RENAME_DIM=”P_ACCT=P2_ACCT” Message 7: The Dimension Member XYZ123 for Dimension INTCO is not valid. An error occured while processing parameters, exiting Destination App. This error results from failure to specify a valid dimension member value as the parameter value in the ADD_DIM statement. Example: *START_BADI DAPP DESTINATION_APP="PLANNING5" RENAME_DIM="P_ACCT=P2_ACCT" ADD_DIM = "INTCO=XYZ123" WRITE=OFF *END_BADI The error message occurs because the value XYZ123 does not exist as a valid dimension member. Message 8: You have not specified the parameter INTCO which is required. If the target application has dimensions not existing in the source application, then the extra target dimensions must be identified with the ADD_DIM statement. Message 9: Begin Writing Records to Data Manager Log If the DEBUG=ON Parameter is set, then the system will create a more detailed log including the values of all written records. The enhance log starts with the line “Begin Writing Records to Data Manager Log“