Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Logic to divide two Key Figures

ace_bw
Participant
0 Kudos

Dear Experts,

Could anybody help me by giving code for simple division.I have 2 Key figures and dividing both have to store value in third key figure.

Eagerly waiting for response.Thanks in advance.

Rgds

ACE

4 REPLIES 4

matt
Active Contributor
0 Kudos

kyf3 = kyf2 / kyf1.

But I'd use a formula. Where are you doing this calculation? Transfer rule, update rule or where?

matt

0 Kudos

Hi matthew,am using the same in Update rule.Please note even i planned to create formula for this.But its not possible coz whn i go to create formula for the third KF,in list of Infoobjects i cant see the first two which i have created.For the first two KF i have used the formula by keeping value 1 (constant) to get the count on the records(for material and fiscperiod).

Rgds

ACE

matt
Active Contributor
0 Kudos

I'd repost this in the BW forum - you're more likely to get useful help. Mention the version of BW you are on as well.

To my knowledge this is possible via a formula, so I suspect there is a different problem. ( You have set the "show me" to "all fields" ?).

matt

Former Member
0 Kudos

data: a type i value ' 10',

b type i value ' 5',

c type i.

c = a / b.

write:/ c.

REgrds,

Vani