Search
Search

# SAP Bex Designer logic

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

##### Former Memberreplied

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

1 View this answer in context
View more on this topic or