cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate grouping of rows in Analytical Table

0 Kudos

Hi,

I was referring to the Analytical Table example from SAPUI5 Explored.

I noticed that if you use the grouping feature and from the table settings, you group on Product Category, the table is rendered and there are multiple rows shown for the same product category.

e.g. Product Category: Accessory is shown 4 times in the rows with repeated data (name, price, etc.)

This is also the case for a custom application I built where the grouping is done on ID number field. It shows me two grouped rows of ID number with same data instead of one entry.

This seems like  a bug in the Analytical Table control. Is there a solution to handle this ?

Regards,

Melwyn

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

Hi Melwyn,

I faced same issue but I am not remember exactly how I resolved, but please check below points.

1.  If you are mapping odata Entity set properties with Database table fields then make sure all Key fields are displaying on output.

or if you are mapping with FM or BAPI fields then you have to write custom code for Sorting, filter and Grouping.

2. Make sure you have created Annotation for ALL output fields in oData Service ("Define" Method in MPC_EXT Class). Sample code shown below.

     DATA(lo_property) = lo_entity_type->get_property( 'GeneratedId' ).
     DATA(lo_annotation) = lo_property->/iwbep/if_mgw_odata_annotatabl~create_annotation(
     /iwbep/if_mgw_med_odata_types=>gc_sap_namespace ).
     lo_annotation->add(
     iv_key = /iwbep/if_ana_odata_types=>gcs_ana_odata_annotation_key-aggregation_role
     iv_value = /iwbep/if_ana_odata_types=>gcs_ana_odata_annotation_value-dimension-dimension ).


*" Hide Field

   lo_annotation->add(
     iv_key = 'visible' iv_value = 'false' ).


3. Make sure GeneratedId (ABAP Field name is GENERATED_ID) created as a key field in oData Service and this is the only key field in oData Service.


Hope this info helpful.


Thanks & Regards,

Sasidhar V.

0 Kudos

Any clues to the above ?