cancel
Showing results for 
Search instead for 
Did you mean: 

set column value of rows referencing other column

Former Member
0 Kudos

Hi everyone,

i have a web dynrpro table with columns empno ,bankname, accounttype , amount , newamount. the total amount in a single bank is always 100. ie for bank A if he has 3 account types t1,t2 , t3 the sum of total amount wil be 100 always.

empno bankname accounttype amount newamount

111 A T1 30 0

111 A T2 20 0

111 A T3 50 0

111 B T1 50 0

111 B T2 50 0

Now employee can set new amount for each account types but sum should be 100. If he changes only 1st row "new amount " to 25 then i should auto populate new amount column of 2nd row and 3rd from amount column and put as 20 and 50(thei have to validate the new sum is 100 or not).what is the best way to acheive this.

To make it simple my question is based on change of value in a column , how to set the value of other columns for grouped row. from above example i can say 1st 3 rows belong to 1 group based on emp no and bankname combination.

Appreciate your help.

Thanks,

pkv

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member185879
Active Contributor
0 Kudos

Hello PKV,

Its better to create a action in the column's input field and calculating accordingly. Once calculated if value is more than 100 then provide him the error message saying "The Sum should be more than 100".

Or Create a button to validate the table and check for all the banks and display all the messages at once, so that user will know that he needs to change the values for how many banks.

Regards

Nizamudeen SM

junwu
Active Contributor
0 Kudos

maybe you can just give an error when user try to save, if the rule is violated.

i don't think it's a good idea to automatically change the value of other row. user may not remember the original value changed by you.