How To Improve The Runtime of The 0fi - GL - 4 Extractor: How-To Guide Sap Netweaver 2004 Sap Netweaver 7.0 (2004S)
How To Improve The Runtime of The 0fi - GL - 4 Extractor: How-To Guide Sap Netweaver 2004 Sap Netweaver 7.0 (2004S)
How To Improve The Runtime of The 0fi - GL - 4 Extractor: How-To Guide Sap Netweaver 2004 Sap Netweaver 7.0 (2004S)
0 (2004s)
Copyright 2006 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 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.
1 Scenario
Due to large FI tables in the SAP ERP Central Component (ECC) or because of parallel running update processes for FI documents, you can sometimes experience long runtimes for the 0FI_GL_4 extractor. The solution described in this document will help you improve the runtime of the delta extraction in the ECC system.
2 Prerequisites
SAP Note 991429 the minute-based-extraction enhancement for the 0FI_*_4 extractors has to be applied before going forward with this workaround. . Prerequisite to implement the solution described in this document is Plug-In Version 2004.1 or higher.
3 Introduction
When a Delta InfoPackage for the DataSource 0FI_GL_4 is executed in SAP NetWeaver BI (BI), the extraction process in the ECC source system mainly consists of two activities: First the FI extractor calls a FI specific function module which reads the new and changed FI documents since the last delta request from the application tables and writes them into the Delta Queue. Secondly, the Service API reads the delta from the Delta Queue and sends the FI documents to BI.
The time consuming step is the first part. This step might take a long time to collect all the delta information, if the FI application tables in the ECC system contain many entries or when parallel running processes insert changed FI documents frequently.
-1-
First step executes the FI extractor and writes the existing delta into the Delta Queue
Second step reads the delta from the Delta Queue and send it to the PSA
SAP NetWeaver BI
FI Extractor
Delta Queue
DataSource
DataStore Object
PSA
SAP AG 2007
A solution might be to execute the Delta InfoPackage to BI more frequently to process smaller sets of delta records. However, this might not be feasible for several reasons: First, it is not recommended to load data with a high frequency using the normal extraction process into BI. Second, the new Real-Time Data Acquisition (RDA) functionality delivered with SAP NetWeaver 7.0 can only be used within the new Dataflow. This would make a complete migration of the Dataflow necessary. Third, as of now the DataSource 0FI_GL_4 is not officially released for RDA. To be able to process the time consuming first step without executing the delta InfoPackage the ABAP report attached to this document will execute the first step of the extraction process encapsulated. The ABAP report reads all the new and changed documents from the FI tables and writes them into the BI delta queue. This report can be scheduled to run frequently, e.g. every 30 minutes. The Delta InfoPackage can be scheduled independently of this report. Most of the delta information will be read from the delta queue then. This will greatly reduce the number of records the time consuming step (First part of the extraction) has to process from the FI application as shown in the picture below.
-2-
First step executes the FI extractor and writes the existing delta into the Delta Queue
Second step reads the delta from the Delta Queue and send it to the PSA
FI Extractor
DataSource
PSA
ABAP
How to guide
The ABAP executes the FI extractor and writes the existing delta into the Delta Queue more frequently
Schedule ABAP
SAP AG 2007
-3-
To achieve an encapsulated first part of the original process, the attached ABAP report is creating a faked delta initialization for the logical system 'DUMMY_BW'. (This system can be named anything as long as it does not exist.) This will create two delta queues for the 0FI_GL_4 extractor in the SAP ERP ECC system: One for the DUMMY_BW and the other for the 'real' BI system. The second part of the report is executing a delta request for the DUMMY_BW logical system. This request will read any new or changed records since the previous delta request and writes them into the delta queues of all connected BI systems. The reason for the logical BI system DUMMY_BW is that the function module used in the report writes the data into the Delta Queue and marks the delta as already sent to the DUMMY_BW BI system. This is the reason why the data in the delta queue of the DUMMY_BW system is not needed for further processing. The data gets deleted in the last part of the report. The different delta levels for different BI systems are handled by the delta queue and are independent from the logical system. Thus, the delta is available in the queue of the 'real' BI system, ready to be sent during the next Delta InfoPackage execution. This methodology can be applied to any BI extractors that use the delta queue functionality. As this report is using standard functionality of the Plug-In component, the handling of data request for BI has not changed. If the second part fails, it can be repeated. The creation & deletion of delta-initializations is unchanged also. The ABAP and the normal FI extractor activity reads delta sequential. The data is sent to BI parallel. If the report is scheduled to be executed every 30 minutes, it might happen that it coincides with the BI Delta InfoPackage execution. In that case some records will be written to the delta queues twice from both processes. This is not an issue, as further processing in the BI system using a DataStore Object with delta handling capabilities will automatically filter out the duplicated records during the data activation. Therefore the parallel execution of this encapsulated report with the BI delta InfoPackage does not cause any data inconsistencies in BI. (Please refer also to SAP Note 844222.)
-4-
4.2
1. Create a new Logical System using the transaction BD54. This Logical System name is used in the report as a constant:
c_dlogsys TYPE logsys VALUE 'DUMMY_BW'
In this example, the name of the Logical System is DUMMY_BW. The constant in the report needs to be changed accordingly to the defined Logical System name in this Step.
2. Implement an executable ABAP report YBW_FI_GL_4_DELTA_COLLECT in transaction SE38. The code for this ABAP report can be found it the appendix.
-5-
3. Maintain the selection texts of the report. In the ABAP editor In the menu, choose Goto Text Elements Selection Texts
4. Maintain the text symbols of the report. In the ABAP editor In the menu, choose Goto Elements Text Symbols Text
-6-
5. Create a variant for the report. The "Target BW System" has to be an existing BI system for which a delta initialization exists. In transaction SE38, click Variants
6. Schedule the report via transaction SM36 to be executed every 30 minutes, using the variant created in step 5.
-7-
5 Appendix
5.1 ABAP Coding for report YBW_FI_GL_4_DELTA_COLLECT
The ABAP coding can be found in the SDN: https://wiki.sdn.sap.com/wiki/display/Snippets/How+to+Improve+the+runtime+of+the+0FI _GL_4+extractor Additional information and feedback can be given in the related blog: https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/7444
-8-
www.sdn.sap.com/irj/sdn/howtoguides