Introduction

This may be obvious topic in BEx. I believe “Replacement Path” processing type is the most smartest one which can avoid many User Exit variables, for which we break our heads to write Code to do our Trend Analysis. Hope you guys got now, what am I going to demonstrate in this simple blog.

Scenarios covered are :

  1. Dummy KF to enable Selection in variable Screen
  2. Calmonth from Calday
  3. Calmonth from Calday (Range)
  4. Calyear from Calday and Calmonth

The basic pre-requisite to derive above scenarios is a Calday Variable. This can be a “Single Value” or “Interval” as well.

Imagine below in my screen shots

Calday = Invoice Clearing Date

Calmonth = Invoice Clearing Month

1. Dummy KF to enable Selection in Variable screen

Why a dummy KF is required?

Let’s suppose we have a Calday variable in Filter or in Default Values pane in our query designer. This means, we are restricting globally our time period as per the variable entry, by which we cannot calculate for past or future periods. To overcome this, we have to bring our variable to KF pane by restricting to a dummy KF and hide the KF. Then this variable becomes local and appears on the variable screen which is our desire.

Dummy KF.JPG

2. Calmonth from Calday

Suppose User enters Calday : 01.11.2013, then 11.2013 can be picked by creating a Replacement Path variable under Calmonth like below.

Calmonth from Calday.JPG

The offset length: 6 is the Key Parameter to pick up 11.2013 from 01.11.2013. This is some thing like we are considering only 6 Characters out of 8 characters through ABAP Code.

3. Calmonth from Calday (Range)

Suppose we have a Calday (Interval) : 01.07.2013 to 10.08.2013. Please observe To Date is a different month. Now we want to see our KFs as per From and To Dates.

I mean one of your KF has to show data for 07.2013  by based on From date and your Other KF has to show data for 05.2013 by based on To date.

Create two variables like Calmonth FROM and Calmonth TO by replacement path of Calday (Interval)Variable like below.

Calmonth from Calday Range.JPG

Finally you have to restrict your KFs with respective Calmonth FROM and Calmonth TO and apply Offset-3 to get 05.2013 like below. You can apply any Offset value for both variables. That’s How we can play with these derived variables.

Both KFs.JPG

After executing the report, you will get the result like below.

Result.JPG

To cross check whether our two variables have really replaced our Interval variable or not, I have drill downed with Invoice Clearing Month(Calmonth). It shows correct months for the corresponding KFs, by which we can confirm that our mechanism works.

Result with drill.JPG

4. Calyear from Calday and Calmonth

Suppose we have Calmonth and Calday variables, we can derive Calyear by creating two separate variables by considering offset parameters like below.

Calyear from calmonth and Calday.JPG

Conclusion :

We can do many of our Trend Analysis by just using “Replacement Path” and applying Offsets for past and future periods. This will reduce unnecessary time spending on User exits. We should go with User exits unless they are really required.

To report this post you need to login first.

69 Comments

You must be Logged on to comment or reply to a post.

  1. Anand Kumar

    Hello Suman,

    Good and concise explanation of  ‘Replacement path’. Keep it up.

    regrads,

    Anand Kumar

    (0) 
  2. Krishna Chaitanya

    Hi Suman,

    Very good informative and motivated doc.  It is really useful in so many scenarios.

    Thanks for sharing Boss.  You are rocking. 🙂

    Regards,

    Krishna Chaitanya.

    (0) 
      1. CH Raman

        Off the record. Congrats suman becoming Diamond level. Its Wonderful journey along with you. Once again Congrats for you support to SCN.

        (0) 
  3. Venu Gopal Boddapati

    Simple and superb suman.

    This document clarified lot of my doughts in using replacement path

    1) How to create replacement path using variable.

    2) How can we use “FROM & TO” options in replacement path

    Nice thing here is, as a finishing touch you have used OFFSET very effectively in end of this document. gr8. Thanks.

    Best Regards,

    Venu Gopal

    (0) 
  4. Saikat Pal

    This is a very good document and it proves we can derive calmonth , calyear without using customer exit or abap code.Many thanks.

    (0) 
  5. MS REDDY

    HI Suman,

    Wonderful document never seen before.. 😯 . Clearly explained with step by step navigation. 🙂 🙂

    (0) 
  6. Meghana Kuppa

    Suman! Great article! Thank you for posting it. Appreciate it! Not only did I learn about deriving 0calmonth from 0calday…I learned about you can play around with the system.

    Regards,

    Meghana

    (0) 
  7. Vikrant Soni

    Hi Suman,

    Got to see your blog post today, I must say thhis is excellent way to avoid Custmer Exits.

    Very well explained. looking forward for some more useful information from you.

    Regards,

    Vikrant

    (0) 
  8. Suman Thangadurai

    Hi,

    This is awesome, wonderful way to ignore cmod. Can you share some more thoughts on LYMTD & LYYTD using Replacement Path.

    Keep rocking, people like you are always helpful to step us further in BW!!! 😎

    SumanT

    (0) 

Leave a Reply