on 11-03-2015 1:53 PM
Hi,
I have a requirement. I need to create a formula in BEx,
If cost centre = ABC and if the value of FK1 is negative than multiply by -1 else FK1
basically our cost centre ABC comes with negative values and we need to converter in positive values
please help me to write down the formula.
Thanks
Hi Asif,
Your formula would be
(((costcenter == 'ABC') * (((FK1 < 0) * (-1))+ ((FK1 > 0) * FK1)))
Analysis:
Condition : If cost centre = ABC and if the value of FK1 is negative than multiply by -1 else FK1
A.) Cost Center = ABC and Value of FK1 is not negative
Formula: (1) * (0+FK1) Result = FK1
B.) Cost Center NE ABC and Value of FK1 is not negative
Formula: (0) * (0+FK1) Result = 0
C.) Cost Center = ABC, FK1 is negative
Formula: (1) * (FK1 + 0) Result: FK1
Thanks,
Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Asif
You don't have to involve cost centre in this formulae. Just create a formula with the below syntax. It should work.
As you said, ABC will hold only negative values.
(KF1 < 0 ) * (KF1 * -1) + (KF1)
Regards
Karthik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Asif,
You can try with a formula variable of type customer exit.
In the cmod you can write a simple Abap code to achieve the requirement.
Regatds,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.