cancel
Showing results for 
Search instead for 
Did you mean: 

Routine in Bex - urgent pls.

Former Member
0 Kudos
50

I have 2 columns A and B in the report:

A B C

-


1234 1234 1234

5903 0 5903

0 3287 3287

I want to get the column C.

So, the condition for the column C would be :

if A<>0 and B <>0 then A

else if A==0 then B

else if B==0 then A

I heared that this can be done by routines . I need the code to do this . Also let me know where to put the code.

This is urgent pls.

Vaishali

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

((A<>0)(B<>0)A)(A=0)*B(B=0)*A

Hopefully this will help.

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Nag. That made my task simple.:)

Former Member
0 Kudos

I'll try after the users stop using the report. will update you on this...

so u sure, no need of routines for this ??

Former Member
0 Kudos

Hi,

No need to write coding.....directly u can get these by unsing formula as told in the above forum....there u get all these conditions in Boolean operators. so just make use of them..

Thanks & Regards

Former Member
0 Kudos

Vaishali,

This is a simple formula which can be written in the new formula of the query.

For column C, you just create a New Formula and use write the formula as given by our friend in the above post.