Developer

Implement GET_ENTITYSET for Defined Entities

A GET_ENTITYSET method corresponds to a QUERY operation that returns zero to many entries. It is responsible for generating the entity collection, and is the equivalent of downloading and synchronizing MBOs.

Each entity has a corresponding service implementation that executes at runtime. You can implement standard operations such as create, read, update, and delete (CRUD) as well as query, to support the maintenance of the entity. See How to Develop Query Options for an OData Service Using Code-Based ImplementationInformation published on SAP site for more information.

For this example, you will implement the GET_ENTITYSET for the three entity sets: BusinessPartners, SalesOrders, and SalesOrderItems. A standard set of five method shells are generated for each entity type:
  • <Entity>_GET_ENTITYSET - corresponds to a common “Get List” query and is also functionally equivalent to a full MBO download. Without any filters, a standard GET_ENTITYSET operation call returns the entire entity collection.
  • <Entity>_GET_ENTITY - corresponds to a read operation.
  • <Entity>_CREATE_ENTITY
  • <Entity>_UPDATE_ENTITY
  • <Entity>_DELETE_ENTITY
Depending on the entity, operation type, and the corresponding business object in the business back-end, the actual implementation varies from simple to complex.