Using Customer Exit Variables in BW Reports_3a Part - 6
Using Customer Exit Variables in BW Reports_3a Part - 6
Applies to:
SAP NetWeaver Business Warehouse (Formerly BI), Will also work on SAP BI 3.5. Business Intelligence
homepage.
Summary
This article gives clear picture about how to use Characteristic Customer Exit Variables in SAP-BW/BI
Reports.
Author Bio
Surendra Kumar Reddy Koduru is a SAP BI Lead Consultant currently working with ITC
Infotech India Ltd (Bangalore/INDIA). He has got rich experience and worked on various
BW/BI Implementation/Support Projects and he is the author for various Articles and Blogs
(SAP-BW/BI) in SAP Community Network.
SAP COMMUNITY NETWOR SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 1
Using Customer Exit Variables in BW/BI Reports: Part - 6
Table of Contents
Introduction: ........................................................................................................................................................ 3
Live Scenario: ................................................................................................................................................. 3
Steps: ........................................................................................................................................................................... 3
Code: ........................................................................................................................................................................... 5
Code Explanation:........................................................................................................................................................ 8
Report Designer: .......................................................................................................................................................... 8
Selection Screen: ....................................................................................................................................................... 11
Report Result: ............................................................................................................................................................ 12
Related Content ................................................................................................................................................ 14
Disclaimer and Liability Notice .......................................................................................................................... 15
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 2
Using Customer Exit Variables in BW/BI Reports: Part - 6
Introduction:
This article addresses the requirement of Customer Exit variables in BW/BI Reports; in this article I’m
explaining the following scenario…
How to use the Characteristic Customer Exit Variables in BW/BI Reports, how to display the data only for
First Day of the Fiscal Year Period based on User Input Fiscal Year Period.
Live Scenario:
In some of the SAP-BI/BW reports (Here I taken Sales example) users want to see the Sales revenue data
for the First Day/date of the Fiscal Year Period based on Users Input Fiscal Year Period.
Steps:
Create Customer Exit Variable ZDATE_C on 0CALDAY.
For reference look into the following screens.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 3
Using Customer Exit Variables in BW/BI Reports: Part - 6
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 4
Using Customer Exit Variables in BW/BI Reports: Part - 6
Code:
Goto CMOD TCode in SAP-BW/BI and then give your Project Name and click on Change button.
Click on Components
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 5
Using Customer Exit Variables in BW/BI Reports: Part - 6
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 6
Using Customer Exit Variables in BW/BI Reports: Part - 6
CASE i_vnam.
WHEN 'ZDATE_C'.
IF i_step = 2.
LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZFYP_UE'.
CLEAR: l_s_range.
ZGJAHR = loc_var_range-low+0(4).
zpoper = loc_var_range-low+4(3).
l_s_range-low = ZDT.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.
APPEND l_s_range TO e_t_range.
ENDLOOP.
ENDIF.
ENDCASE.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 7
Using Customer Exit Variables in BW/BI Reports: Part - 6
Code Explanation:
The Function Module 'FIRST_DAY_IN_PERIOD_GET ' will take Fiscal Year, Fiscal Year
Variant and Period as input, and it will give the first day/date of that Fiscal year
period.
Report Designer:
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 8
Using Customer Exit Variables in BW/BI Reports: Part - 6
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 9
Using Customer Exit Variables in BW/BI Reports: Part - 6
In Filters:
Drag & Drop 0FISCVARNT, 0FISCPER and restrict 0FISCVARNT with “V3” (as per India) and 0FISCPER
with ZFYP_UE User Input Variable.
In Rows:
Drag and Drop Material and Plant.
In Columns:
Create New Selection and Drag and Drop Amount and 0CALDAY, restrict 0CALDAY with ZDATE_C
Variable like above.
Save and Execute the Report :
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 10
Using Customer Exit Variables in BW/BI Reports: Part - 6
Selection Screen:
Once you execute the report you can see the following selection screen:
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 11
Using Customer Exit Variables in BW/BI Reports: Part - 6
Report Result:
See the following Report Result:
Here the result is displayed for 01.08.2010 date, because in 005.2010 first day is 01.08.2010.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 12
Using Customer Exit Variables in BW/BI Reports: Part - 6
See the below Image from RSRT, i.e. execute the report in RSRT then see Input and Output like below.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 13
Using Customer Exit Variables in BW/BI Reports: Part - 6
Related Content
Using Customer Exit Variables in BW Reports Part - 4
Using Customer Exit Variables in BW Reports Part - 3
How to use Customer Exit Variables in BW Reports: Part - 2
Using Customer Exit Variables in BW or BI Reports Part - 1
Using Text Variables with Customer Exits in Report Headings
Using Text Variables with Customer Exits in Report Headings
Variables of Type Customer Exit
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 14
Using Customer Exit Variables in BW/BI Reports: Part - 6
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 15