Professional Documents
Culture Documents
SAP BW - Text Variables of Type Replacement Path
SAP BW - Text Variables of Type Replacement Path
SAP BW - Text Variables of Type Replacement Path
Applies to:
This article is applicable to SAP BI 7.0. For more information, visit the EDW homepage.
Summary
This document shows how to use and also helps in the analysis of issues with BW text variables of type replacement path. The document will show how to create a sample query using this feature, discuss some parameters, tables and functions which will help in the analysis of problems in this area. Author: Ricardo de Azeredo Rosa
Author Bio
Ricardo is a Support Consultant in SAP Labs Brazil since 2007. He has worked extensively on SAP R/3 and BW as a PM Certified and BW Consultant since 2002. His knowledge includes PM, CS, DMS, PP, PS modules and BW systems. Since 2004 he has focused his knowledge in Business Warehouse working in various critical projects in this area.
Table of Contents
Text variables of type Replacement Path:...................................................................................................... 3 Replacement Path Tab .............................................................................................................................. 8 Hints Regarding Issues in this area: ........................................................................................................... 9 Detailing this issue:.................................................................................................................................. 13 Replacing texts and/or Key: ..................................................................................................................... 15 Tables T009 and T009C text for 0FISCPER.......................................................................................... 15 Related Content:...................................................................................................................................... 17 Copyright .................................................................................................................................................... 18
Next 3 figures show the details for each selection, where the characteristic 0FISCPER has been restricted by values 010.2010 for selection 1, 011.2010 for selection 2 and 012.2010 for selection3:
Picture below shows the result when you execute the query (transaction RSRT). The information provided is not clearly understandable because this is showing the description provided for the selections in the query definition (Selection1, Selection2 and Selection3):
This is possible to make more understandable the result of this query replacing the static description of these columns by a dynamic description depending on the restriction set. In this case, using text variables you will be able to replace the description for your selection (SelectionX in the example) by the value that you have restricted the characteristic 0FISCPER on each of these selections. You can follow the steps below in order to use that: In the selection definition, field Description, create a new text variable:
In the next screen, you inform the Processing By as Replacement Path and the reference characteristic which you want to replace the information (that is 0FISCPER in our example). The Technical name is automatically suggested by system and it can be edited if necessary (VAR_20100503200426 in this example):
In the tab Replacement Path you need to inform with query object you want to replace the information (infoobject or variable) and also with data from that object should be used for replace. In our example it will be informed as Infoobject and Key respectively. You can find more information regarding the fields from that tab in the online documentation informed in item Replacement Path Tab of this document.
After save the new variable, it is going to be available and can be informed in the description field of our selections, as in figure below (if you enter that manually, this will require the tag & before and after the technical name of the variable):
This is possible to set the same variable for all 3 selections from our example:
Now, using the text variable type replacement path, the result is that the description for each selection is going to be replaced by the value from which 0FISCPER has been restricted in that selection, as you can see in the figure below:
So, the presentation of data using this feature is more understandable. It also can be dynamically handled in case you restrict you characteristic by a variable in the selections.
Replacement Path Tab Some more information about Replacement Path Tab can be found in the online documentation below:
Hints Regarding Issues in this area: In case the information provided by your variable is not returning the expected value, you can try to analyze that using the debug in transaction RSRT. For instance, in query below using a text replacement path variable, this is returning # instead of the description.
In order to analyze this issue you can execute the query in transaction RSRT and entering in debug mode (/h + enter) before to press the execute button. When you reach the debug screen you can set a break point in the function module RRSV_CHAVL_TO_VALUE_CONVERT as you can see in figures below:
After that, you can continue pressing F8. The code should stop in the break-point set as in the image below:
In the ABAP Stack area, by double clicking in FORM ELTTXT_VAR_REPLACE this is possible to analyze the values passed to function module RRSV_CHAVL_TO_VALUE_CONVERT:
Some interesting information is passed to the function module by structure L_S_VAR_LRECH, as you can see below:
Backing to the code, you can set a break-point just after the call of FM RRSV_CHAVL_TO_VALUE_CONVERT and verify the value returned by that FM in the variable L_REPLTEXT:
Note that in this case L_REPLTEXT is # which is our problem. Checking the values passed to that Function Module in structure L_S_VAR_LRECH, we can see that L_CHAVL in this case is K12010010 and the L_S_VAR_LRECH- FOFFSET is 0010. This explains the issue: L_S_VAR_LRECH- FOFFSET= 0010 means that an offset of 10 has been set to the value K12010010. In this case it will remove all the information from L_CHAVL. In such case system is programmed to show # instead of blank.
This is possible to confirm that FOFFSET is responsible by the issue if you change the value for L_S_VAR_LRECH-FOFFSET in the debug mode from 0010 to 0:
The L_REPLTEXT should be correctly displayed after execute FM RRSV_CHAVL_TO_VALUE_CONVERT with L_S_VAR_LRECH-FOFFSET=0, as you can see below:
Detailing this issue: The information from L_S_VAR_LRECH comes from table RSZGLOBV. In this case in order to fix the issue you need to maintain the correct OFFSET for your variable in that table (for this example the variable is TEXT_VAR_1):
So, it should return the desired results executing the query after the procedure:
Note: You can execute the FM RRSV_CHAVL_TO_VALUE_CONVERT in transaction SE37. You can use the values passed to this FM in the debug mode as reference and this is also help in the analysis of issues in this area.
Replacing texts and/or Key: You can see in the previous example that this is returning the KEY of characteristic 0FISCPER and not the text as in some other examples from this document (K12010010 instead OCT 2010). This is because the information from RSZGLOBV stored in the field FLAGR. If you want to change that you can select the option FLAGR = 3 instead of 1 for that variable:
Note: It is not recommended to change values directly in the tables. The idea in this case is just to illustrate how it works. You will reach the desired results if you manage the parameters for the variable using the Bex Query Designer in the Replacement Path Tab for the variable definition.
Tables T009 and T009C text for 0FISCPER. In case you set your variable to be replaced by the text of 0FISCPER, the information selected by FM RRSV_CHAVL_TO_VALUE_CONVERT in this case is stored in table T009C and this depends on the Fiscal Year Variants settings from table T009. In the example from the previous session these are the values for those tables: T009:
T009C:
And this information is often loaded by the Transferring Global Settings feature as per online documentation below: http://help.sap.com/saphelp_nw70/helpdata/en/d4/e262419f5d031de10000000a155106/frameset.htm
Related Content: You will find additional information in the following links: http://help.sap.com/saphelp_nw70/helpdata/en/af/809528939d5b4fbff7e16a5bdc0d85/frameset.htm http://help.sap.com/saphelp_nw70/helpdata/en/ee/1e9b3c334d8c15e10000000a114084/frameset.ht m http://help.sap.com/saphelp_nw70/helpdata/en/d4/e262419f5d031de10000000a155106/frameset.ht m For more information, visit the EDW homepage.
Copyright
Copyright 2010 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, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server, PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER, OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. 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. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP Business ByDesign, 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 other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this docume nt 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 ("S AP 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.