on 07-09-2016 9:20 AM
Hello All,
I have sap.m.Table with 10 Columns.
Now in that one column is Total Resultant Loss and another is Resultant Loss.
Now i want to display summed up value in Total Resultant Loss.
This sum should be done based on condition i,e if the column has same loss types and units should be summed up together and displayed in the first column and remaining columns should be empty.
Please find the attached Screen shot for more information.
Regards,
Shekar.
Hi Shekar,
Did you find any solution. I have the same requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mantri,
Sorry, I was not aware your table was grouped.
So far, this is not possible in SAPUI5 on a standard way.
The only thing that is possible, is to display a footer in a column, which will be at the bottom of the table.
If this is not what you need, but you need it per group, you'll have to custom build something.
Greets,
Caspar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Caspar,
Thanks for your response.
If you find any solution in mean time Please let me know.
Regards,
Shekar.
Hi Shekar,
The calculation will have to be done in code, best is to loop through your model and place the found values in a new JSON model, then bind it to your sum-controls.
To display the sum of a column correctly, you can use a column footer, like so:
<Column minScreenWidth="Tablet" demandPopin="true" hAlign="Left" width="4em">
<Text text="{i18n>TableLabelUsed}"/>
<footer>
<Text text="{path: 'MockModelTotals>/LeaveTotalsLegalLeaveTableUsed', formatter:'hrstamgegevens.model.formatter.floatValue'}"/>
</footer>
</Column>
Then it will display a footer, that shows the sum of the values.
I hope this suits your scenario
Greets,
Caspar
PS: Check out this link for more info, and a JS example: Sum of values in each column in a table in sapui5 - Stack Overflow
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Casper,
My requirement is to Sum up for only single column.
But in that single column i need to add the values for specific Group.This is some thing siimilar to adding the values in items in a sales order.
Here i need to sumup Total Loss Unit Column for every group and teh added value should only be displayed in first Row of the event.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.