Skip to Content
3
Nov 25, 2022 at 04:35 PM

How to enhance EWM OData Services ?

558 Views

Hi guys,

during enhancement of the ewm fiori app "change inbound delivery" i recognized that the OData services for EWM apps are not programmed as explained in many tutorials . Either there is a kind of own framework for EWM OData services. For example SEGW project "/SCWM/SIMPLE_INB_DLV".

image.png

image.png

The difference
The data provider class for the inbound service is /SCWM/CL_SIM_IDLV_DPC_EXT. The generated methods for the CRUD operations of the entity were generated but not redefined.

image.png

Instead of using these methods as explained in tutorials, the general CRUD Methods where redefined.

image.png

Inside the methods sap is using a factory pattern based on system table: /scwm/i_sim_ac.

image.png

In addition there several classes/interfaces for handling the ewm specific request. It seems to be SAP created framework for EWM OData Services.

Question:

Does anyone know a kind of how to guide or best practise example from SAP how to enhance these odata services in combination with the framework ? I really would like to add entries to these table, but it's a systemtable so im not sure if its the correct way.

In my example I redefined the service/segw project and redefined the generic create_entity method to add custom code for specific entity.

image.png

To keep sure that the request for other entitys are still working the method of the super class is called.

But due to the new service name (ZEWM...) no entry in the /SCWM/I_SIM_AC class is found.

To solve this problem we redefined the init method of the DPC_EXT class, and fake the service name an namespace .

image.png

I can not believe that's the way sap suggest to extend EWM fiori apps.

Anyone can help or handle with the same problems ?

Thanks.

Attachments

image.png (23.1 kB)
image.png (5.4 kB)
image.png (17.9 kB)
image.png (49.6 kB)
image.png (58.2 kB)
image.png (54.5 kB)
image.png (33.1 kB)
image.png (30.1 kB)