Professional Documents
Culture Documents
Applies to:
SAP NetWeaver Business Warehouse (Formerly BI), Will also work on SAP BI 3.5. For more information,
visit the EDW homepage.
Summary
This article describes how to Calculate the Difference between Created date and Changed date in BW or 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 NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 1
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
Table of Contents
Introduction / Requirement: ................................................................................................................................ 3
How to Achieve: .............................................................................................................................................. 3
Creating Variable on Created Date: ................................................................................................................ 3
All Tabs of the Variable: .................................................................................................................................. 7
Creating Variable on Changed Date: .............................................................................................................. 9
Creating Formulas with both Variables in report: .......................................................................................... 13
Save and Execute the report: ....................................................................................................................... 14
Related Content ................................................................................................................................................ 15
Disclaimer and Liability Notice .......................................................................................................................... 17
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 2
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
Introduction / Requirement:
This article describes how to Calculate the Difference between Created date and Changed date in BW or BI
Reports, this is useful whenever you want to find out the delay in days between Created and Changed dates.
How to Achieve:
Using Formula Variables with replacement path in BEx reports we can achieve it. Create one formula
variable with replacement path on Created Date Character and another formula variable with replacement
path on Changed Date, then create a formula and just do simple subtraction in report.
This formula is just Dummy formula to create a formula variable we need to create a formula first then in that
we can create a formula variable, that is the reason I’m creating the formula, and after creating the both
formula variables we will edit the same formula and then create actual calculations in that formula.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 3
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 4
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
Select the Edit option and then follow the below steps.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 5
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
In General tab, give Technical name, Type of Variable is by default Formula, Processing By you must select
Replacement Path finally you need to select the Reference Characteristic, i.e. from which Field you are
replacing the value into this Variable, in our case Create Date.
In Currency/Unit tab, select Dimensions is Date, because we are doing Date calculations.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 6
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 7
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 8
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 9
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 10
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 11
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
We will create a formula and in that we will subtract Changed Date with Created Date then we will get
difference between two Dates.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 12
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
We are created a Formula in report and then open in Edit mode and create the formula 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
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
See the above result; it calculated the correct number of day’s difference between Changed and Crated
Dates.
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 14
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
Related Content
For all Articles and Blogs by Surendra Kumar Reddy, Please visit this URL
Using Customer Exit Variables in BW Reports Part - 1
Using Customer Exit Variables in BW Reports Part - 2
Using Customer Exit Variables in BW Reports Part - 3
Using Customer Exit Variables in BW Reports Part - 4
Using Customer Exit Variables in BW Reports Part - 5
Using Customer Exit Variables in BW Reports Part - 6
Using Customer Exit Variables in BW Reports: Part - 8
Using Customer Exit Variables in BW Reports: Part - 9
Using Customer Exit Variables in BW Reports: Part - 10
Using Customer Exit Variables in BW Reports: Part - 11
Using Customer Exit Variables in BW Reports: Part - 12
Using Customer Exit Variables in BW Reports: Part - 13
Using Customer Exit Variables in BW Reports: Part - 14
Using Customer Exit Variables in BW Reports: Part - 15
Using Customer Exit Variables in BW Reports: Part - 16
Using Customer Exit Variables in BW Reports: Part - 17
Using Customer Exit Variables in BW Reports: Part - 18
Inventory Management (0IC_C03) Part - 1
Inventory Management (0IC_C03) Part - 2
Inventory Management (0IC_C03) Part - 3
To Check the Files/Reports in Application Server and trigger mail alerts
Calculating the Ageing of the Materials
Using Selective Deletion in Process Chains
Triggering the Process Chains at Particular Date using Events
Analysis Process Designer (APD) Part - 1
Analysis Process Designer (APD) Part - 2
Analysis Process Designer (APD): Part - 3
Open Hub Destination: Part 1
Open Hub Destination: Part 2
InfoSpoke Part 1
InfoSpoke Part 2
Using Rule Group in SAP-BI Part - 1
Data Flow from LBWQ/SMQ1 to RSA7 in ECC and Delta Extraction in BI
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 15
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
Checking the Data using Extractor Checker (RSA3) in ECC Delta Repeat Delta etc...
Data Flow from LBWQ SMQ1 to RSA7 in ECC (Records Comparison)
How to Correct Routines in Transformations
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
© 2011 SAP AG 16
Calculating the Difference between Created Date and Changed Date in BW/BI Reports
SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com
© 2011 SAP AG 17