Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Redefined Service - New Entityset methods did not get created

Hello Experts,


I enhanced a standard service in SEGW and created 2 entity types and sets. Consistency Check and Runtime Aritifacts generation were successful. However, the new DPC_EXT class does not have CREATE_ENTITY, DELETE_ENTITY, GET_ENTITY, GET_ENTITYSET and UPDATE_ENTITY for the newly created Entity Sets. Instead, it shows me methods as - /IWBEP/IF_MGW_APPL_SRV_RUNTIME~CREATE_ENTITY etc.




I read in a lot of help documents and examples that these methods are created automatically in the form of <ENTITYSET_CREATE_ENTITY> , <ENTITYSET_GET_ENTITY> and should be REDEFINED as needed.


Redefining the DPC Implementation Class - SAP NetWeaver Gateway - SAP Library


Base Class: Data Provider Class - SAP NetWeaver Gateway - SAP Library

Implementation Class: Data Provider Class - SAP NetWeaver Gateway - SAP Library

What am I missing?


Thanks,

Rohan

Former Member
replied

Hi Rohan,

SEGW does unfortunately not create these methods if you add an entity set to a redefined service.

You have to implement the generic methods in your DPC_EXT class, check whether your newly created entity set is accessed.

If not you can call the method of the base class that will call the methods for the other entity sets of the redefined service.

Best Regards,

Andre

method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITY.

DATA lv_entityset_name TYPE string.
DATA
lr_entity TYPE REF TO data.

lv_entityset_name =
io_tech_request_context->get_entity_set_name( ).

CASE
lv_entityset_name.

   WHEN ‘<
NewEntitySet>'.

  


   WHEN OTHERS.

super->

/iwbep/if_mgw_appl_srv_runtime~get_entity

(    EXPORTING
   …
  
   IMPORTING
   er_entity = er_entity ).
ENDCASE.

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question