Skip to Content
0

OData GW service for Fiori Elements ListReport

Jul 04, 2017 at 02:51 PM

68

avatar image
Former Member

Hi,

I' ve created a GW service based on a DDIC structure, implemented the GET_ENTITYSET and GET_ENTITY method of _DPC_EXT class and redefined the DEFINE method of _MPC_EXT class.

Within the DEFINE method I set the entity type as aggregation.

DATA(lo_entity) =  model->get_entity_type( gc_rueckmeldung ).
lo_entity->set_semantic(  /iwbep/if_ana_odata_types=>gcs_ana_odata_semantic_value-query-aggregate).

I then defined the properties either as dimension or measurement.

DATA(lo_property) = co_entity->get_property( 'Rueck' ).  
IF lo_property IS BOUND.  
  DATA(lo_annotation) =
  lo_property->/iwbep/if_mgw_odata_annotatabl~create_annotation(
    /iwbep/if_mgw_med_odata_types=>gc_sap_namespace
  ).  
  IF lo_annotation IS BOUND.
    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
    ).
  ENDIF.
ENDIF

Everything works fine except that my measure-column isn' t totaled. I' m not using SADL, so I can' t redefine the QUERY method of the corresponding interface.

My question now is: How can I enable calculation and display of totals for the measure-column?

Regards,

Thomas

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers