Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

17
8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 1/17  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 Applies to: SAP NetWeaver Business Warehouse (Formerly BI), Will also work on SAP BI 3.5. For more information, visit the EDW homepageSummary This article describes how to Calculate the Difference between Created date and Changed date in BW or BI Reports. Author: Surendra Kumar Reddy Koduru Company: ITC Infotech India Ltd. (Bangalore/INDIA) Created on: 23 June 2011 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.

Transcript of Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

Page 1: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 1/17

 

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 Differencebetween Created Date andChanged Date in BW/BI Reports

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 BIReports.

Author:  Surendra Kumar Reddy Koduru

Company:  ITC Infotech India Ltd. (Bangalore/INDIA)

Created on: 23 June 2011

Author Bio

Surendra Kumar Reddy Koduru is a SAP BI Lead Consultant currently working with ITC InfotechIndia Ltd (Bangalore/INDIA). He has got rich experience and worked on various BW/BIImplementation/Support Projects and he is the author for various Articles and Blogs (SAP-BW/BI) in

SAP Community Network.

Page 2: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 2/17

  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 2

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 

Page 3: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 3/17

  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 3

Introduction / Requirement:

This article describes how to Calculate the Difference between Created date and Changed date in BW or BIReports, 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 replacementpath on Changed Date, then create a formula and just do simple subtraction in report.

Creating Variable on Created Date:

This formula is just Dummy formula to create a formula variable we need to create a formula first then in thatwe can create a formula variable, that is the reason I’m creating the formula, and a fter creating the bothformula variables we will edit the same formula and then create actual calculations in that formula.

Page 4: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 4/17

  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

Page 5: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 5/17

  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 5

Select the Edit option and then follow the below steps.

Page 6: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 6/17

  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 6

In General tab, give Technical name, Type of Variable is by default Formula, Processing By you must selectReplacement Path finally you need to select the Reference Characteristic, i.e. from which Field you arereplacing the value into this Variable, in our case Create Date.

In Currency/Unit tab, select Dimensions is Date, because we are doing Date calculations.

Page 7: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 7/17

  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

All Tabs of the Variable:

See all the below screen, which will give the complete properties of the Variable, it is easy for you to createyour self.

Page 8: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 8/17

  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

Page 9: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 9/17

  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

Creating Variable on Changed Date:

Follow all the above steps i.e. similar to Created Date Variable. So I’m giving final screen of Changed DateVariable.

You just see the below screens, you can get the variable details

Page 10: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 10/17

  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

Page 11: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 11/17

  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

Page 12: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 12/17

  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 12

See the both variables in below Screen.

We will create a formula and in that we will subtract Changed Date with Created Date then we will getdifference between two Dates.

Page 13: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 13/17

  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 13

Creating Formulas with both Variables in report:

We are created a Formula in report and then open in Edit mode and create the formula like below.

Page 14: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 14/17

  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 14

Save and Execute the report:

See the above result; it calculated the correct number of day’s  difference between Changed and CratedDates.

Page 15: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 15/17

  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 15

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 - 4Using 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 

Page 16: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 16/17

  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 16

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. 

Page 17: Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

8/13/2019 Calculating the Difference Between Created Date and Changed Date in BW_BI Reports

http://slidepdf.com/reader/full/calculating-the-difference-between-created-date-and-changed-date-in-bwbi-reports 17/17

  Calculating the Difference between Created Date and Changed Date in BW/BI Reports

Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is notsupported 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 document,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 orcode 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 content of thisdocument.