on 07-13-2017 7:13 AM
Hi,
I understand that there are many blog or tutorial out there on how to extend SAP standard oData using SEGW to add new field in the standard entity but all of them are using append structure approach to add new field into the standard structure of the entity.
My issue here is I need to extend SAP standard oData service that does not using ABAP structure in the entity definition. All fields are defined manually in the entity definition. Because of this approach, I cannot populate the value of the custom field in getEntity and getEntitySet method since the ET_ENTITYSET structure will be derived from the parent and cannot be changed. (Message Parameters/exceptions of inherited methods or events cannot be changed shown when I accessing method parameter of getEntitySet).
Is there anyone that know how to overcome this issue without the need to change SAP standard delivered oData service definition?
Thank you,
Abraham
Can you create custom entity set and then populate it ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how did you do it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In extended service DPC_EXT class redefine method of get_entityset .
There put the code of new entityset added .
Dont forget to put OTHER condition in CASE , this will get called for originals Entity sets .
Then for custom entity make the new method in DPC_ext class and call it from redefined entityset method.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shilpa,
Please bear with me while I'm trying to understand your advise here.
Let say I have entity named EntityA.
If I redefined the service, I will have Z_dpc_ext->EntityA_get_entityset with et_entityset parameter typed the same as the standard oData service entity. In this case, we cannot populate information if we add custom field in the redefined Z entity because the method parameter is not changed.
Your advise is to call new method from redefined entitityset method but isn't that the parameter et_entityset itself in the end will still be the same type as et_entityset of the standard entity?
Am I missing something here?
Thank you.
Regards,
Abraham
Hi,
It seems like nobody knows the answer including SAP employee themselves.
In that case, I have no choice but to change SAP standard oData service definition directly.
Thank you.
Regards,
Abraham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.