cancel
Showing results for 
Search instead for 
Did you mean: 

Front-End issue

Former Member
0 Kudos

Hello, I have a query about a report design. This is what my report looks like:

Material     Fiscal Period     Begin No.     RKF1     RKF2     Difference

101               01/2014          100                                                    

101               02/2014                                      200                      

101               03/2014                                                     300       

101               04/2014                                      500                      

Currently I am doing RKF2 - RKF1 and printing result in difference column

Material     Fiscal Period     Begin No.     RKF1     RKF2     Difference

101               01/2014          100                                                    

101               02/2014                                      200                         -200

101               03/2014                                                     300          300

101               04/2014                                      500                         -500

My requirement is to make my difference as cumulative ok so it should be like this:

Material     Fiscal Period     Begin No.     RKF1     RKF2     Difference

101               01/2014          100                                                     100

101               02/2014                                      200                         300 because (100 + 200)

101               03/2014                                                     300          then I should take 300 + 300 = 600

101               04/2014                                      500                         then I should take 600+500 = 1100

so the ending number in my difference should be 1,100.  This is a custom keyfigure I am using. I think this concept is in Inventory where you take beginning balance etc. but how can i implement that concept in my custom keyfigure?

Please suggest a way.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

former_member185132
Active Contributor
0 Kudos

In Query designer, select the Difference column. In the properties on the right hand side, select the Calculations tab. Select the "Cumulated" checkbox and in the direction, select "Calculate along columns"

Former Member
0 Kudos

Thanks for the feed back. I tried to do what you suggested but it does not work. One thing to mention is that Difference column is another RKF and keyfigure is restricted by Fiscal Month/Year. Please let me know if this is possible in bex if not then how should this be done in the back end.

Thanks.

former_member185132
Active Contributor
0 Kudos

What is the output you're getting now?

Also, I think difference should be a CKF and not an RKF. And why do you restrict it by Fisc Month/Year?

Former Member
0 Kudos

Hello, I was able to get my problem by following your advise. everything works if i start beginning of the year but if i start in the middle of the year it does not. so this is what it looks like.


Months/Year   Opening     Months Activity       New Column(I called it a difference column)

03/2014          $200                                        $200

04/2014                                   $100               $300

05/2014                                   $20                $320

06/2014                                   $10                $330

07/2014                                   $30                $360

which is fine but if i start my report from 06/2014 it will pick up $10 and not $330 where as i want it to pick up $330.
is there a way to do that please?

Thanks.

former_member185132
Active Contributor
0 Kudos

I think you'll have to add the Diff column in the data model (DSO/Cube) and populate via ABAP routines. This problem cannot be solved in pure BEx.

former_member202718
Active Contributor
0 Kudos

Hi Venkat,

As said by Suhas...we have to do it in the backend at EDW layer..also you can go through the Non Cumulative Key Figures concept but that requires you to create a KF and then to try it out.

regds

SVU123

former_member183012
Active Contributor
0 Kudos

Hi Venkat,

You are getting the output correctly when you are not providing 06/2014.and when your providing date it is giving 10 that is also correct because you are restricting whole data to perticular period.

if you want to show diffrence without restiction(static) at Bex level then I would suggest do at infoprovider level add one infoobject and populate with diffrence it will show diffrence Bex will not calculate at runtime.

Regards,

Ganesh Bothe

Former Member
0 Kudos

Thankyou sir, but how do i populate the difference? what should be my logic in the backend?

former_member185132
Active Contributor
0 Kudos

You can implement the skeleton logic described below. Write it in the end routine. It needs the target to be a DSO, so put a DSO between the source and the reporting cube and implement the routine in the TRFN that loads this DSO.

Take an ABAPper's help if required.

  1. Select from target_dso for all entries in Result_package where material = result_package-material
  2. For each record in the result package do the following.
    1. Total the "Opening" and "Months activity" fields from the target_dso entries, where the month < result_record-month.
    2. In result_record, set the difference fld = above value + result_record-month_activity.

That should do it.

Former Member
0 Kudos

Are you telling me to do this?  The first three columns is how my data looks right now in the dso so i will add another field called Custom Field.

Material      FiscPER       ZNUM      Custom Field
101                  001/2014           10            10
101                 002/2014            10            10+10 = 20
101                 003/2014            20            20+20 = 40

but how do i know if material 101 has already been loaded with such and such period?

Thanks.

former_member185132
Active Contributor
0 Kudos

That's why the first step in the logic is the SELECT from target_dso. That will give you the contents of the target DSO and help you determine whether the material was loaded for a particular period.

former_member183012
Active Contributor
0 Kudos

Hi Venkat,

You need to apply ABAP logic based on material and period that menas same material with same period apply addition to the keyfigure.If you are confused Please take help from your ABAP team.

Regards,

Ganesh Bothe

former_member202718
Active Contributor
0 Kudos

Hi Venkat,

Did u think of giving a try to Non Cumulative KF.

Check this 0TOTALSTOCK key figure in the system with its properties..

regards

SVU

Former Member
0 Kudos

Thank you sir. so you are saying that i will have to scan the same dso that i am loading to for a match if exists any?  correct?

Thanks.

Answers (0)