cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Bex Designer logic

Former Member
0 Kudos


HI Team,

I have to write a logic for a key figure(compa ratio i.e D_XHR3000_C005) as :

IF INDHRMTH = M
  NDIV0 ( ( D_XHR3000_C003 / D_XHR3000_C011 )) ELSE NDIV0 ((D_XHR3000_C001 /
  D_XHR3000_C004 ))

AL above mentioned are the Calculated Key figures using which I have to derive a new key figure value

Now INSHRMTH is a characteristics having value as M or H( I have to use this in above formula). to achieve the above requirement , how it did is as follows :

Now I created a restricted a key figure say D_XHR3000_R001 using the key figure D_XHR3000_C003 restricted with cahracteristics INDHRMTH with restriction as 'M'.

Now in the calculation of key figure(D_XHR3000_C005) , I write the below

( D_XHR3000_R001 <> 0 ) * NDIV0 ( ( D_XHR3000_C003 / D_XHR3000_C011 )) + NDIV0 ((D_XHR3000_C001 / D_XHR3000_C004 ))

the logic I though is D_XHR3000_R001 returns 0 if the value of INSHRMTH is not equal to M as wrote as logic , but it fails where I am getting INSHMRTH as 'H'

Highlighted is the values of the restricted ket figure, since here INSHRMTH is H & hence Compa-Ratio should be HourlyWage(D_XHR3000_C001) / MIDPOINT(D_XHR3000_C004) , But it is calculated as 0 .

Can any suggest why this is going as wrong or any other suggestion for implementing this logic .

Best regards,

Fox

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi my intail code itself is working good to me, but actaully since the numerator is very samll as compared to denominator , hence giving me zero.

But thanks for your prompt reply Loed.

Kind Regards,

Pankaj

Loed
Active Contributor
0 Kudos

Hi,

So your question is already answered?

You may now click the CORRECT ANSWER to close this thread..

Regards,

Loed

Answers (1)

Answers (1)

Loed
Active Contributor
0 Kudos

Hi,

Try changing the equation of D_XHR3000_C005 with this:

( D_XHR3000_R001 > 0 ) * NDIV0 ( ( D_XHR3000_C003 / D_XHR3000_C011 )) + NDIV0 ((D_XHR3000_C001 / D_XHR3000_C004 ))

OR

Here is another approach..

So you already have D_XHR3000_R001..

Create another RKF, let's call it D_XHR3000_R002, restrict it with characteristic INDHRMTH with restriction as 'H' (if you have other values then just EXCLUDE 'M')..

Create two (2) formulas, let's call them CKF_R001 and CKF_R002, and enter these equations..

CKF_R001 = NDIV0 ( ( D_XHR3000_C003 / D_XHR3000_C011 ))

CKF_R002 = NDIV0 ((D_XHR3000_C001 / D_XHR3000_C004 ))

In your COMPA_RATIO, enter this equation:

D_XHR3000_C005 = CKF_R001 + CKF_R002




Hide the CKF_R001, CKF_R002, D_XHR3000_R001 and D_XHR3000_R002..

Just post here for questions..

Regards,

Loed

Former Member
0 Kudos

HI Loed,

Since you are no where using CKF_R001 & CKF_R002, then whats the use of them . Seems you forget to use it in your proposal?

Regards,

Fox

Former Member
0 Kudos


Sorry Loed, I mean Since you are no where using D_XHR3000_R001& D_XHR3000_R001, then whats the use of them . Seems you forget to use it in your proposal?

Please bear with me.

Regards,

Fox

Loed
Active Contributor
0 Kudos

Hi,

I did use it..

D_XHR3000_C005 = CKF_R001 + CKF_R002

Regards,

Loed