cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a function in Update Rules to reverse a key figure sign

Former Member
0 Kudos

We would be appreciated if someone could provide a sample code in Update Rule by calling a function called NEGATIVE which is in BW to reverse a sign of a key figure!

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can use a Formula in the update rules just multiply *(-1)

Former Member
0 Kudos

hi Fernando,

Could you write a sample code on it?

I use Debit/Credit Amount * ( - 1 ), but when checking it, it's not working and says "Formula element is not allowed here". "Debit/Credit Amount" is the key figure.

Thanks

Message was edited by: Kevin Smith

Message was edited by: Kevin Smith

edwin_harpino
Active Contributor
0 Kudos

hi Kevin,

it should like

Debit/Credit Amount * 1-

you can switch 'expert mode', click the icon beside checking syntax, here we are allowed to directly enter the formula and technical name is used.

another way is use 'routine' and code is

result = comm_structure-deb_cre_dc * -1.

hope this helps.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

simple code FIELDNAME = FIELDNAME * -1.

/manfred

Former Member
0 Kudos

Hi,

Or

you can also use the formula NEGATIVE( ) in update rule.

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

hi Anil,

Could you write the whole code in details?

Thanks