You are on page 1of 8

SAP BW - Dynamic Call Customer

Exit Variables Using Same Exit

Applies to:
This article is applicable to all the SAP BI 7.0 consultants who are accustomed with SAP ABAP skills.
For more information, visit the EDW Homepage

Summary
This document explains how to dynamically call the Customer Exit Variables, without doing any modifications
to the exit for the enhancement RSR00001 (Enhancement for Global Variables in Reporting).
Author: Suraj Tigga
Company: Capgemini Consulting India Pvt. Ltd.
Created on: 29 July 2010

Author Bio
Suraj Tigga is a Senior SAP BI / ABAP consultant at Capgemini Consulting, India. Suraj joined
Capgemini Consulting in 2008 and has worked on multiple SAP BI implementation and support
projects.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 1
SAP BW - Dynamic Call Customer Exit Variables Using Same Exit

Table of Contents
Scenario ....................................................................................................................................................... 3
Step-by-Step Solution ................................................................................................................................ 3
Query ........................................................................................................................................................................... 3
Enhancement (RSR00001) .......................................................................................................................................... 4
Function Module Code ................................................................................................................................................. 5
Execution ..................................................................................................................................................................... 6
Related Content ............................................................................................................................................ 7
Disclaimer and Liability Notice ....................................................................................................................... 8

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 2
SAP BW - Dynamic Call Customer Exit Variables Using Same Exit

Scenario
Query built on a infocube ZSD_O05 (Order: Condition Data) which returns all the sales document for
Condition Category EQ ‘D’.

Step-by-Step Solution
Document explains to fulfill the above requirement and create function modules which are called dynamically
from enhancement RSR00001, without doing any modification to the enhancement code.
Entire process is explained in three steps:
Query: Brief about the Data Target and Query
Enhancement (RSR00001): Calling the respective function module.
Function Module Code: Function Module which returns the values for the customer exit variables.
Execution: Defines the query design and the execution process.

Query
Query is built of the Infocube ZSD_O05 (Order: Condition Data).
Data Target: ZSD_O05

Query: ZSD_O05_SALES

Infoobject Variable Processing By

0CALMONTH ZCALMTH Manual Entry

0KNTYP ZKNTYP Customer Exit

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 3
SAP BW - Dynamic Call Customer Exit Variables Using Same Exit

Enhancement (RSR00001)
Transaction: SMOD

Here the Function Module derived value is ‘ZBWF_VAR_ZKNTYP’.Make sure all your Function Modules are
prefixed with ‘ZBWF_VAR_’.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 4
SAP BW - Dynamic Call Customer Exit Variables Using Same Exit

Function Module Code


Function Module: ZBWF_VAR_ZKNTYP
We need to consider only Category Code EQ ‘D’.

IMPORT Parameters:
I_VNAM LIKE RSZGLOBV-VNAM
I_VARTYP LIKE RSZGLOBV-VARTYP
I_IOBJNM LIKE RSZGLOBV-IOBJNM
I_PERIV TYPE RRO01_S_RKB1F-PERIV
I_STEP TYPE I 0
EXPORT Parameters:
I_T_VAR_RANGE TYPE RRS0_T_VAR_RANGE
E_T_RANGE TYPE RSR_T_RANGESID

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 5
SAP BW - Dynamic Call Customer Exit Variables Using Same Exit

Execution
Go to transaction RSRT and execute the Query and enter the CALMONTH value (Switch on the Debug
Mode):

DEBUG (Mode)

Report Output:

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 6
SAP BW - Dynamic Call Customer Exit Variables Using Same Exit

Related Content
For more information, visit the EDW Homepage

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 7
SAP BW - Dynamic Call Customer Exit Variables Using Same Exit

Disclaimer and Liability Notice


This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not
supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.
SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this do cument,
and anyone using these methods does so at his/her own risk.
SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or
code sample, including any liability resulting from incompatibility between the content within this document and the materials and
services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the conte nt of this
document.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2010 SAP AG 8

You might also like