cancel
Showing results for 
Search instead for 
Did you mean: 

Custom subclasses for MPC & DPC

GrahamRobbo
Active Contributor
0 Kudos

Hi,

I have some gateway services that I provide for several customers. So I have common MPC, DPC, MPC_EXT & DPC_EXT classes that I deploy to all these customers. The gateway service is registered by SEGW to point to the EXT classes at runtime.

I want to also have customer-specific enhancements to these classes - and it seems to me the most logical way is to subclass the _EXT classes for each customer and then point that customers' service at the new subclass.

This is all fine until I try and change the service definition to point to the new subclasses. I can't find a way to maintain this anywhere. It seems the important configuration tables are /IWBEP/I_MGW_OHD and /IWBEP/I_MGW_SRH - but I can't find a standard way of maintaining these fields.

So, in essence, I want to configure a Gateway service to use a MPC & DPC that I provide rather than the one generated by SEGW.

Cheers

Graham Robbo

Accepted Solutions (1)

Accepted Solutions (1)

former_member184867
Active Contributor
0 Kudos

Hello Graham

Based on your requirement is it not possible to REDEFINE the service? Service Redefinition can be useful to put more logic/condition.

Gateway also provides Service Extensibility concept from SP9. Check out this https://scn.sap.com/community/gateway/blog/2014/08/08/extending-a-service-using-the-gateway-service-...

In this case the inherited service overrides the base service, that meas the using the base service URL you can call the Redefined service.

You right, these configuration  tables are filled by Gateway Registration mechanism. If you try to do so, you may explore transaction /IWBEP/REG_SERVICE and /IWBEP/REG_MODEL. Here you can change the model and service by providing new MPC/DPC class, which contains your new functionality.

Regards

atanu

GrahamRobbo
Active Contributor
0 Kudos

Thanks Atanu,

your suggestion of using the tools to extend the service comes pretty close to what I need to do. Certainly a better match than any other options I have found so far.

Cheers

Graham Robbo

former_member184867
Active Contributor
0 Kudos

Hello Graham,

One point I would like to mention.

The change that you do in the mentioned transactions are not reflected in SEGW. That means still SEGW shows the OLD classes which will not be called anymore in the runtime.

Sometimes this will cause confusion and extra debug effort for developers who may analyze or debug the OData Service at some later point in time.

Regards,

Atanu 

GrahamRobbo
Active Contributor
0 Kudos

Yeah thanks - I also had trouble when trying to remove the extension service. I was unable to get the base service working again except by creating a new extension service. This was because the service was still pointing at the subclass of the (now deleted) original extension service.

And as we already know we are unable to maintain that setting.

Answers (0)