SlideShare a Scribd company logo
1 of 10
Download to read offline
Variable Exit in Sap BI 7.0 - How to
 Start




Applies to:
This article is applicable to SAP BI 7.0. For more information, visit the Business Intelligence homepage.

Summary
This document provides an introduction for the creation and management of variables type customer exit in
BW queries.

Author:      Ricardo de Azeredo Rosa
Company: SAP Labs Brazil
Created on: 24 May 2009

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 Intelligence (BW, SEM and Planning) working in various critical projects in this area.




SAP COMMUNITY NETWORK                                    SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                    1
Variable Exit in Sap BI 7.0 - How to Start




Table of Contents
Variable Exit – Starting .......................................................................................................................................3
   Project Management of SAP Enhancements .................................................................................................3
   BEX Query Designer and Variable Type Customer Exit.................................................................................4
   Customer Exit and ABAP Code ......................................................................................................................5
   Testing and Debugging ...................................................................................................................................6
   Additional Information .....................................................................................................................................8
Related Contents ................................................................................................................................................9
Copyright...........................................................................................................................................................10




SAP COMMUNITY NETWORK                                                                 SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                                                 2
Variable Exit in Sap BI 7.0 - How to Start


Variable Exit – Starting
SAP provides a variable of type customer exit for BW queries which customer is able to manage its values
depends on their business requirements. It is necessary some background in ABAP to start in this area, the
proposal of this document is to help on those tasks. It is structured in the following sequence:
    •   Project management of SAP Enhancements
    •   Query BEX Query Designer and Variable Type Customer Exit
    •   Customer Exit and ABAP Code
    •   Test and Debug
    •   Additional Information

Project Management of SAP Enhancements
In order to start it is necessary to activate a new project for a SAP enhancement. So as to execute that you
need to call the transaction CMOD, inform a name for your project and press the button ‘create’. A second
screen requesting a short description will be showed, just enter the required information and ‘save’:
                           1                                                          2




It is necessary to inform the enhancement for your new project. In the list, select that one responsible for
handle the variables in the BI/BW queries: ‘RSR00001 – BI: Enhancements for Global Variables in
Reporting’
Choosing ‘components’, it is possible to verify that function module EXIT_SAPLRRS0_001 is already
assigned for the new project, selecting that one (by double clicking), system jumps to the function module
definition which has basically an instruction like ‘INCLUDE ZXRSRU01.’. Actually the report ZXRSRU01 is
reserved for store the customer code which will manage the variable values in the BW query.
Now it is necessary to create the report ZXRSRU01 in transaction SE38. But before this procedure we need
a variable which will be handled in that report. In the next item the steps to create a simple query and a user
exit variable type will be explained.




SAP COMMUNITY NETWORK                                      SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                      3
Variable Exit in Sap BI 7.0 - How to Start



BEX Query Designer and Variable Type Customer Exit
1. In the query designer 7.1, create a new query following the standard procedure. Select the characteristic
which you want to filter and create a new variable:




2. Select the technical name and the description for your new variable in the appropriated area:




3. Set the type ‘Customer exit’ in the field ‘Processing by’:




4. Select your characteristic and restrict that one by the variable created in the previous item as a filter for
your query (use the drag and drop):




SAP COMMUNITY NETWORK                                       SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                       4
Variable Exit in Sap BI 7.0 - How to Start



5. Create a simple query in the ‘Rows/Columns’ area that we can use as example:




6. Save your query and now we are able to create the customer exit in the program ZXRSRU01.

Customer Exit and ABAP Code
Now the program ZXRSRU01 can be created, you can use the transaction SE38 for that.
The most important information here is that the ‘customer exit program’ will receive the variable name of the
BW query in the ABAP variable ‘i_vnam’, which is defined as an import parameter in the function module
EXIT_SAPLRRS0_001 and the BW query’s variable value is handled in the table E_T_RANGE.
So: it is necessary to create a program that check the variable name in order to confirm if we are handling
the correct one and manage its current values in the table E_T_RANGE.
It is an example of the code:
     *&---------------------------------------------------------------------*
     *& Include            ZXRSRU01
     *&---------------------------------------------------------------------*
     DATA: l_s_range TYPE rrrangesid.
     CASE i_vnam.
       WHEN 'Z_RARTST'.
         l_s_range-low = '12345'.
         l_s_range-sign = 'I'.
         l_s_range-opt = 'EQ'.
         APPEND l_s_range TO e_t_range.
     ENDCASE.

You can create a similar program for a test proposes. Just be careful with the name of the variable, it should
be the same you have informed in the restriction of your query in the previous item (in this example
‘Z_RARTST’ – of course the technical name.).
Active and save your new program before leave.
Before to execute the test, you need to go in the transaction CMOD once more and activate the customer
exit otherwise the system will not execute your code.




SAP COMMUNITY NETWORK                                     SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                     5
Variable Exit in Sap BI 7.0 - How to Start




Your Customer Exit is ready to be tested. Transaction RSRT is a good option for that:

Testing and Debugging

Note: This is not the idea of this document to discuss about ABAP debug; maybe some knowledge in this area is
      required


First, set a break point in your code, for instance, as per example below:




Call transaction RSRT and execute your query:




SAP COMMUNITY NETWORK                                        SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                        6
Variable Exit in Sap BI 7.0 - How to Start



The program will stop in the statement BREAK-POINT:




It is possible to verify the values assigned in the runtime for the variables (I_VNAM, for instance):




After the statement ‘APPEND’ (some F5’s in the debugger tool), this is the value for E_T_RANGE:




Verify that the E_T_RANGE-LOW value has already the desired value ‘12345’.
And this is the result for in the variable screen (if you press F8 to continue the execution of the program and
leave the debugger):




The Variable was populated with required value, exactly as expected.




SAP COMMUNITY NETWORK                                     SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                     7
Variable Exit in Sap BI 7.0 - How to Start


Additional Information
Of course this is just a simple example for starting with this feature. Some additional knowledge is required
for deeper developments in this area.
In the debug mode you are able to explore some other parameters like I_STEP and I_S_RKB1D for
instance. Checking I_S_RKB1D, just as an example, you have access to the query attribute, it means that
beyond the variable name it is possible to check some other information in order to set the variable value,
like query and infoprovider name and so on. Checking the I_STEP, as another example, it will help you to set
the time that exit is triggered, as following:
I_STEP = 1
 Call directly before the variable is entered
I_STEP = 2
 Call directly after the variable is entered. This step is
 activated only if the same variable could not be filled for
 I_STEP = 1 and it is not ready for input.
I_STEP = 3
 In this call, you can check the values of the variables.
 Activating an exception (RAISE) causes the variable screen to
 appear again. I_STEP = 2 is also then executed once more.
I_STEP = 0
 The enhancement is not called from the variable screen. The
 call can come from the authorization check or from the
 monitor.




SAP COMMUNITY NETWORK                                        SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                        8
Variable Exit in Sap BI 7.0 - How to Start




Related Contents
http://help.sap.com/saphelp_nw70/helpdata/EN/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm
note 492504 - Dependent customer exit-type variables
http://help.sap.com/saphelp_nw70/helpdata/EN/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm
For more information, visit the Business Intelligence homepage.




SAP COMMUNITY NETWORK                                   SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                   9
Variable Exit in Sap BI 7.0 - How to Start




Copyright
© 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, 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 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.




SAP COMMUNITY NETWORK                                                   SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com
© 2009 SAP AG                                                                                                                   10

More Related Content

What's hot

Analysis process designer (apd) part 1
Analysis process designer (apd) part   1Analysis process designer (apd) part   1
Analysis process designer (apd) part 1dejavee
 
Analysis process designer (apd) part 2
Analysis process designer (apd) part   2Analysis process designer (apd) part   2
Analysis process designer (apd) part 2dejavee
 
04.pricing and conditions_sdbfpr
04.pricing and conditions_sdbfpr04.pricing and conditions_sdbfpr
04.pricing and conditions_sdbfprPiyush Bose
 
Practitioner perspective-erp-on-hana-and-fi-analytics 2015
Practitioner perspective-erp-on-hana-and-fi-analytics 2015Practitioner perspective-erp-on-hana-and-fi-analytics 2015
Practitioner perspective-erp-on-hana-and-fi-analytics 2015Benedict Yong (杨腾翔)
 
How to create_an_ecatt
How to create_an_ecattHow to create_an_ecatt
How to create_an_ecattMohammed Azhad
 
Funds management configuration sap ag
Funds management configuration sap agFunds management configuration sap ag
Funds management configuration sap agLluckyy
 
BPC Session1
BPC Session1BPC Session1
BPC Session1bayu5012
 
Sap sd notes
Sap sd notesSap sd notes
Sap sd notesMohit2385
 
Maintaining comment fields directly in planning layouts using the transaction...
Maintaining comment fields directly in planning layouts using the transaction...Maintaining comment fields directly in planning layouts using the transaction...
Maintaining comment fields directly in planning layouts using the transaction...Janakiram Yelike
 
技術文件 - Dashboard 效能調整-1
技術文件 - Dashboard 效能調整-1技術文件 - Dashboard 效能調整-1
技術文件 - Dashboard 效能調整-1tasmc
 
Copa configuration
Copa configurationCopa configuration
Copa configurationMithun Roy
 
Work status illustrated
Work status illustratedWork status illustrated
Work status illustratedigor_everest
 

What's hot (18)

Analysis process designer (apd) part 1
Analysis process designer (apd) part   1Analysis process designer (apd) part   1
Analysis process designer (apd) part 1
 
Analysis process designer (apd) part 2
Analysis process designer (apd) part   2Analysis process designer (apd) part   2
Analysis process designer (apd) part 2
 
04.pricing and conditions_sdbfpr
04.pricing and conditions_sdbfpr04.pricing and conditions_sdbfpr
04.pricing and conditions_sdbfpr
 
SAP Integration With Excel - Advanced Guide
SAP Integration With Excel - Advanced GuideSAP Integration With Excel - Advanced Guide
SAP Integration With Excel - Advanced Guide
 
Practitioner perspective-erp-on-hana-and-fi-analytics 2015
Practitioner perspective-erp-on-hana-and-fi-analytics 2015Practitioner perspective-erp-on-hana-and-fi-analytics 2015
Practitioner perspective-erp-on-hana-and-fi-analytics 2015
 
Co pa extraction
Co pa extractionCo pa extraction
Co pa extraction
 
SAP Integration with Excel - Basic Guide
SAP Integration with Excel - Basic GuideSAP Integration with Excel - Basic Guide
SAP Integration with Excel - Basic Guide
 
How to create_an_ecatt
How to create_an_ecattHow to create_an_ecatt
How to create_an_ecatt
 
Cellediting bex
Cellediting bexCellediting bex
Cellediting bex
 
Funds management configuration sap ag
Funds management configuration sap agFunds management configuration sap ag
Funds management configuration sap ag
 
BPC Session1
BPC Session1BPC Session1
BPC Session1
 
ERP Made Simple (preview)
ERP Made Simple (preview)ERP Made Simple (preview)
ERP Made Simple (preview)
 
Sap sd notes
Sap sd notesSap sd notes
Sap sd notes
 
63556309 sap
63556309 sap63556309 sap
63556309 sap
 
Maintaining comment fields directly in planning layouts using the transaction...
Maintaining comment fields directly in planning layouts using the transaction...Maintaining comment fields directly in planning layouts using the transaction...
Maintaining comment fields directly in planning layouts using the transaction...
 
技術文件 - Dashboard 效能調整-1
技術文件 - Dashboard 效能調整-1技術文件 - Dashboard 效能調整-1
技術文件 - Dashboard 效能調整-1
 
Copa configuration
Copa configurationCopa configuration
Copa configuration
 
Work status illustrated
Work status illustratedWork status illustrated
Work status illustrated
 

Viewers also liked

How to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selectionHow to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selectionValko Arbalov
 
Errors in process chains
Errors in process chainsErrors in process chains
Errors in process chainsSiva Kollipara
 
[SAP BW] Process Chain with Invalid Character
[SAP BW] Process Chain with Invalid Character[SAP BW] Process Chain with Invalid Character
[SAP BW] Process Chain with Invalid CharacterMarcos André
 
Customer exit variables in sap
Customer exit variables in sapCustomer exit variables in sap
Customer exit variables in sapSidharth Sriram
 
Dso job log and activation parameters
Dso job log and activation parametersDso job log and activation parameters
Dso job log and activation parameterssakthirobotic
 
Using error stack and error dt ps in sap bi 7.0
Using error stack and error dt ps in sap bi 7.0Using error stack and error dt ps in sap bi 7.0
Using error stack and error dt ps in sap bi 7.0gireesho
 
Hybrid provider based on dso using real time data acquisition in sap bw 7.30
Hybrid provider based on dso using real time data acquisition in sap bw 7.30Hybrid provider based on dso using real time data acquisition in sap bw 7.30
Hybrid provider based on dso using real time data acquisition in sap bw 7.30Sabyasachi Das
 
Management 2.0 Hackathon
Management 2.0 HackathonManagement 2.0 Hackathon
Management 2.0 HackathonCraig Thomler
 
Management 2.0 : Manage Collaboration inside Enterprise
Management 2.0 : Manage Collaboration inside EnterpriseManagement 2.0 : Manage Collaboration inside Enterprise
Management 2.0 : Manage Collaboration inside EnterpriseAnthony Poncier
 

Viewers also liked (11)

How to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selectionHow to write a routine for 0 calday in infopackage selection
How to write a routine for 0 calday in infopackage selection
 
Errors in process chains
Errors in process chainsErrors in process chains
Errors in process chains
 
[SAP BW] Process Chain with Invalid Character
[SAP BW] Process Chain with Invalid Character[SAP BW] Process Chain with Invalid Character
[SAP BW] Process Chain with Invalid Character
 
Customer exit variables in sap
Customer exit variables in sapCustomer exit variables in sap
Customer exit variables in sap
 
Dso job log and activation parameters
Dso job log and activation parametersDso job log and activation parameters
Dso job log and activation parameters
 
Using error stack and error dt ps in sap bi 7.0
Using error stack and error dt ps in sap bi 7.0Using error stack and error dt ps in sap bi 7.0
Using error stack and error dt ps in sap bi 7.0
 
Hybrid provider based on dso using real time data acquisition in sap bw 7.30
Hybrid provider based on dso using real time data acquisition in sap bw 7.30Hybrid provider based on dso using real time data acquisition in sap bw 7.30
Hybrid provider based on dso using real time data acquisition in sap bw 7.30
 
Management 2.0 Hackathon
Management 2.0 HackathonManagement 2.0 Hackathon
Management 2.0 Hackathon
 
Management Consulting
Management ConsultingManagement Consulting
Management Consulting
 
Sap fiori
Sap fioriSap fiori
Sap fiori
 
Management 2.0 : Manage Collaboration inside Enterprise
Management 2.0 : Manage Collaboration inside EnterpriseManagement 2.0 : Manage Collaboration inside Enterprise
Management 2.0 : Manage Collaboration inside Enterprise
 

Similar to Variable Exit in Sap BI 7.0 - How to Start

Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)Srinivas Dukka
 
Creating new unit of measure in sap bw
Creating new unit of measure in sap bwCreating new unit of measure in sap bw
Creating new unit of measure in sap bwRajat Agrawal
 
Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsHicham Khallouki
 
Pricing Efficiency
Pricing EfficiencyPricing Efficiency
Pricing EfficiencyDaya Nadar
 
Dynamic variant creation
Dynamic variant creationDynamic variant creation
Dynamic variant creationyoung moon woo
 
User exits
User exitsUser exits
User exitsanilkv29
 
_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdf_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdfssuserfe1f82
 
Using infoset query %2c sap query and quick viewer
Using infoset query %2c sap query and quick viewerUsing infoset query %2c sap query and quick viewer
Using infoset query %2c sap query and quick viewerShailendra Surana
 
Using infoset query ,sap query and quick viewer
Using infoset query ,sap query and quick viewerUsing infoset query ,sap query and quick viewer
Using infoset query ,sap query and quick viewerbsm fico
 
Scalable security modeling sap bw analysis authorizations
Scalable security modeling   sap bw analysis authorizationsScalable security modeling   sap bw analysis authorizations
Scalable security modeling sap bw analysis authorizationsPallavi Koppula
 
SAP Quickviewer
SAP QuickviewerSAP Quickviewer
SAP Quickviewerotchmarz
 
Beginner's guide create a custom 'copy' planning function type
Beginner's guide  create a custom 'copy' planning function typeBeginner's guide  create a custom 'copy' planning function type
Beginner's guide create a custom 'copy' planning function typeNaveen Kumar Kotha
 
How to find_information_on_sap_eam
How to find_information_on_sap_eamHow to find_information_on_sap_eam
How to find_information_on_sap_eamNguyen Hai
 
How to Create SAP MarketPlace user id
How to Create SAP MarketPlace user idHow to Create SAP MarketPlace user id
How to Create SAP MarketPlace user idAshwin Mane
 
Creating transaction and screen variants
Creating transaction and screen variantsCreating transaction and screen variants
Creating transaction and screen variantsvenkat reddy
 
SAP PR released
SAP PR releasedSAP PR released
SAP PR releasedpiwal123
 
Lo extraction part 7 enhancements
Lo extraction   part 7 enhancementsLo extraction   part 7 enhancements
Lo extraction part 7 enhancementsJNTU University
 

Similar to Variable Exit in Sap BI 7.0 - How to Start (20)

Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)Backup%20 domain%20controller%20(bdc)%20step by-step(1)
Backup%20 domain%20controller%20(bdc)%20step by-step(1)
 
Creating new unit of measure in sap bw
Creating new unit of measure in sap bwCreating new unit of measure in sap bw
Creating new unit of measure in sap bw
 
Creating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflowsCreating attachments to work items or to user decisions in workflows
Creating attachments to work items or to user decisions in workflows
 
Pricing Efficiency
Pricing EfficiencyPricing Efficiency
Pricing Efficiency
 
Dynamic variant creation
Dynamic variant creationDynamic variant creation
Dynamic variant creation
 
User exits
User exitsUser exits
User exits
 
Query
QueryQuery
Query
 
_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdf_Using Selective Deletion in Process Chains.pdf
_Using Selective Deletion in Process Chains.pdf
 
Using infoset query %2c sap query and quick viewer
Using infoset query %2c sap query and quick viewerUsing infoset query %2c sap query and quick viewer
Using infoset query %2c sap query and quick viewer
 
Using infoset query ,sap query and quick viewer
Using infoset query ,sap query and quick viewerUsing infoset query ,sap query and quick viewer
Using infoset query ,sap query and quick viewer
 
Process chain
Process chainProcess chain
Process chain
 
Scalable security modeling sap bw analysis authorizations
Scalable security modeling   sap bw analysis authorizationsScalable security modeling   sap bw analysis authorizations
Scalable security modeling sap bw analysis authorizations
 
Cube remodelling
Cube remodellingCube remodelling
Cube remodelling
 
SAP Quickviewer
SAP QuickviewerSAP Quickviewer
SAP Quickviewer
 
Beginner's guide create a custom 'copy' planning function type
Beginner's guide  create a custom 'copy' planning function typeBeginner's guide  create a custom 'copy' planning function type
Beginner's guide create a custom 'copy' planning function type
 
How to find_information_on_sap_eam
How to find_information_on_sap_eamHow to find_information_on_sap_eam
How to find_information_on_sap_eam
 
How to Create SAP MarketPlace user id
How to Create SAP MarketPlace user idHow to Create SAP MarketPlace user id
How to Create SAP MarketPlace user id
 
Creating transaction and screen variants
Creating transaction and screen variantsCreating transaction and screen variants
Creating transaction and screen variants
 
SAP PR released
SAP PR releasedSAP PR released
SAP PR released
 
Lo extraction part 7 enhancements
Lo extraction   part 7 enhancementsLo extraction   part 7 enhancements
Lo extraction part 7 enhancements
 

Recently uploaded

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Recently uploaded (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Variable Exit in Sap BI 7.0 - How to Start

  • 1. Variable Exit in Sap BI 7.0 - How to Start Applies to: This article is applicable to SAP BI 7.0. For more information, visit the Business Intelligence homepage. Summary This document provides an introduction for the creation and management of variables type customer exit in BW queries. Author: Ricardo de Azeredo Rosa Company: SAP Labs Brazil Created on: 24 May 2009 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 Intelligence (BW, SEM and Planning) working in various critical projects in this area. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1
  • 2. Variable Exit in Sap BI 7.0 - How to Start Table of Contents Variable Exit – Starting .......................................................................................................................................3 Project Management of SAP Enhancements .................................................................................................3 BEX Query Designer and Variable Type Customer Exit.................................................................................4 Customer Exit and ABAP Code ......................................................................................................................5 Testing and Debugging ...................................................................................................................................6 Additional Information .....................................................................................................................................8 Related Contents ................................................................................................................................................9 Copyright...........................................................................................................................................................10 SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 2
  • 3. Variable Exit in Sap BI 7.0 - How to Start Variable Exit – Starting SAP provides a variable of type customer exit for BW queries which customer is able to manage its values depends on their business requirements. It is necessary some background in ABAP to start in this area, the proposal of this document is to help on those tasks. It is structured in the following sequence: • Project management of SAP Enhancements • Query BEX Query Designer and Variable Type Customer Exit • Customer Exit and ABAP Code • Test and Debug • Additional Information Project Management of SAP Enhancements In order to start it is necessary to activate a new project for a SAP enhancement. So as to execute that you need to call the transaction CMOD, inform a name for your project and press the button ‘create’. A second screen requesting a short description will be showed, just enter the required information and ‘save’: 1 2 It is necessary to inform the enhancement for your new project. In the list, select that one responsible for handle the variables in the BI/BW queries: ‘RSR00001 – BI: Enhancements for Global Variables in Reporting’ Choosing ‘components’, it is possible to verify that function module EXIT_SAPLRRS0_001 is already assigned for the new project, selecting that one (by double clicking), system jumps to the function module definition which has basically an instruction like ‘INCLUDE ZXRSRU01.’. Actually the report ZXRSRU01 is reserved for store the customer code which will manage the variable values in the BW query. Now it is necessary to create the report ZXRSRU01 in transaction SE38. But before this procedure we need a variable which will be handled in that report. In the next item the steps to create a simple query and a user exit variable type will be explained. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 3
  • 4. Variable Exit in Sap BI 7.0 - How to Start BEX Query Designer and Variable Type Customer Exit 1. In the query designer 7.1, create a new query following the standard procedure. Select the characteristic which you want to filter and create a new variable: 2. Select the technical name and the description for your new variable in the appropriated area: 3. Set the type ‘Customer exit’ in the field ‘Processing by’: 4. Select your characteristic and restrict that one by the variable created in the previous item as a filter for your query (use the drag and drop): SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 4
  • 5. Variable Exit in Sap BI 7.0 - How to Start 5. Create a simple query in the ‘Rows/Columns’ area that we can use as example: 6. Save your query and now we are able to create the customer exit in the program ZXRSRU01. Customer Exit and ABAP Code Now the program ZXRSRU01 can be created, you can use the transaction SE38 for that. The most important information here is that the ‘customer exit program’ will receive the variable name of the BW query in the ABAP variable ‘i_vnam’, which is defined as an import parameter in the function module EXIT_SAPLRRS0_001 and the BW query’s variable value is handled in the table E_T_RANGE. So: it is necessary to create a program that check the variable name in order to confirm if we are handling the correct one and manage its current values in the table E_T_RANGE. It is an example of the code: *&---------------------------------------------------------------------* *& Include ZXRSRU01 *&---------------------------------------------------------------------* DATA: l_s_range TYPE rrrangesid. CASE i_vnam. WHEN 'Z_RARTST'. l_s_range-low = '12345'. l_s_range-sign = 'I'. l_s_range-opt = 'EQ'. APPEND l_s_range TO e_t_range. ENDCASE. You can create a similar program for a test proposes. Just be careful with the name of the variable, it should be the same you have informed in the restriction of your query in the previous item (in this example ‘Z_RARTST’ – of course the technical name.). Active and save your new program before leave. Before to execute the test, you need to go in the transaction CMOD once more and activate the customer exit otherwise the system will not execute your code. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 5
  • 6. Variable Exit in Sap BI 7.0 - How to Start Your Customer Exit is ready to be tested. Transaction RSRT is a good option for that: Testing and Debugging Note: This is not the idea of this document to discuss about ABAP debug; maybe some knowledge in this area is required First, set a break point in your code, for instance, as per example below: Call transaction RSRT and execute your query: SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 6
  • 7. Variable Exit in Sap BI 7.0 - How to Start The program will stop in the statement BREAK-POINT: It is possible to verify the values assigned in the runtime for the variables (I_VNAM, for instance): After the statement ‘APPEND’ (some F5’s in the debugger tool), this is the value for E_T_RANGE: Verify that the E_T_RANGE-LOW value has already the desired value ‘12345’. And this is the result for in the variable screen (if you press F8 to continue the execution of the program and leave the debugger): The Variable was populated with required value, exactly as expected. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 7
  • 8. Variable Exit in Sap BI 7.0 - How to Start Additional Information Of course this is just a simple example for starting with this feature. Some additional knowledge is required for deeper developments in this area. In the debug mode you are able to explore some other parameters like I_STEP and I_S_RKB1D for instance. Checking I_S_RKB1D, just as an example, you have access to the query attribute, it means that beyond the variable name it is possible to check some other information in order to set the variable value, like query and infoprovider name and so on. Checking the I_STEP, as another example, it will help you to set the time that exit is triggered, as following: I_STEP = 1 Call directly before the variable is entered I_STEP = 2 Call directly after the variable is entered. This step is activated only if the same variable could not be filled for I_STEP = 1 and it is not ready for input. I_STEP = 3 In this call, you can check the values of the variables. Activating an exception (RAISE) causes the variable screen to appear again. I_STEP = 2 is also then executed once more. I_STEP = 0 The enhancement is not called from the variable screen. The call can come from the authorization check or from the monitor. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 8
  • 9. Variable Exit in Sap BI 7.0 - How to Start Related Contents http://help.sap.com/saphelp_nw70/helpdata/EN/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm note 492504 - Dependent customer exit-type variables http://help.sap.com/saphelp_nw70/helpdata/EN/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm For more information, visit the Business Intelligence homepage. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 9
  • 10. Variable Exit in Sap BI 7.0 - How to Start Copyright © 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, 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 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. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 10