Former Member

# BEx query design to accomodate complex business logic

Hi

I have a business requirement where need to use 2 logic based on the nature of data.

Logic 1:

Raws---- Col1 -Col2 -- Col3

Col4--

Col5

-

(KF1) -(KF2) -(For = KF1 - KF2)-- (For = KF1 * 0.3) (For = Col4 - col3)

G/L acc1 -100 -80 -- -20

70--

50

G/L acc2 -200 -175 - 25

140--

115

G/L acc3 -100 -0

100
70
--

(30)

.

.

G/L accn

Logic 2:

If Col 2 has "0" (please refer to G/L acc3 value in above mentioned example which has 0 value in Col2); Col5 should have value of Col3 instead of formula i.e. Col4 - Col3

The actual result should be as under:

Raws---- Col1 -- Col2 -- -Col3

Col4--

Col5

-

(KF1) -(KF2) -(For = KF1 - KF2) -(For = KF1 * 0.3) -(For = Col4 - col3)

G/L acc1 -100 -- -80

20
70
--

50

G/L acc2 -200 -- -175 -- -25

140--

115

G/L acc3 -100 -- -0

100
70
--

"100" (As per logic 2)

.

.

G/L accn

Thank you for your help and time.

Regards

Anish

10|10000 characters needed characters exceeded

Former Member
Posted on Aug 19, 2004 at 07:02 AM

for Col5 create a formula like this..

( col2 = 0 ) * col3 + (col2 >0 )*(col4-col3)

this meets your requirement for logic 2.

hope this helps..

10|10000 characters needed characters exceeded
• Former Member
Posted on Aug 19, 2004 at 09:20 PM

It worked

Thank you for the solution.

Regards

Anish

10|10000 characters needed characters exceeded
• You are thanking a poster for his answer.

Please next time also give him points.