Skip to Content
Technical Articles
Author's profile photo Bhaskar Burra

Sap.m.Column group rows / mergeDuplicates with mergeFunctionName method

mergeDucplicates is a powerful feature when used properly alongwith mergeFunctionName. we can use it to Group rows of information with the same values. That information can be text (by Using getText), images ((by Using getSrc) or formattedText (getHtmlText). But this can also be used to conditionally group items with the same value. For ex. if you want to merge names of the people with the same pernr.


Here is a plunkr for merging suppliers with the same category.

Not all the “Red Point Stores” are merged.  and also the “Titanium” entries are not merged too as they belong to a different categoty. Where as “Technocom” and  some of the “Red Point Stores” are merged.


<Column mergeDuplicates="true" mergeFunctionName="data#mergeKey" hAlign="Center">
        <Text text="Supplier" />


<Text text="{SupplierName}" class="te xtStyle">
          <core:CustomData key="mergeKey" value="{SupplierName}+{Category}" />



Define the customdatea with a key. give it the value you want to compare. use that key using the data#key to mergeFunctionName.


This is like calling Text“mergeKey”) which will return Supplier Name + Category.

Happy coding



Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Michelle Crapo
      Michelle Crapo

      Nice example.  And easy to download.  And now I have yet another tool in my "bag of tricks".

      Thank you,