on 2025 Mar 14 12:55 PM
I want to Redefine FDP_EF_PURCHASE_ORDER in order to extend the entity sets to add some fields, but when I try to edit FDP_EF_PURCHASE_ORDER I get a message that editing is prohibited because its SAP standard. But according to the SAP help SAP Help and blogs Blogs I should be able to do it? What am I missing?
Request clarification before answering.
That is the thing - this blog is just wrong and the documentation is not so clear but it says:
To redefine a service for the first time, proceed as follows - Empty project:
The blog should not teach to change the standard - this change is lost on the next system upgrade. How come this blog has 32 Kudos and 35 comments of former members I will never know.
So the right way of extending an SEGW service is by creating a new (empty) one and then using the the "Redefine" option.
Right click on the "Data Model" folder > Redefine > OData Service (SEGW)
When generating the runtime artifacts for the first time it will ask you if you want to overwrite the standard service. Usually that is the best option so you don't need to adjust the UI app to use your own service. But that means that any call to the standard API will actually call yours. You can add the fields using the SEGW interface but you will need to populate them by using your DPC_EXT class.
Make sure to reuse as much logic as possible by redefining methods and calling the super class using the super reference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FabioPagoti Should I copy the callback class as well then as per note 0003009083 ?
A "callback" class is something very specific of this context/app. I see it it's final so you cannot extend the class.
However this class is a Badi implementation so you might have some lucky by creating a new custom implementation.
It's not clear what you want to achieve here but clearly this is out of scope of the SEGW enhancement.
There are many classes which implement IF_APOC_COMMON_API so clearly there are ways of creating your own callback class.
@FabioPagotiThe context is as follow:) I have client that wants their own custom version of a Purchase Order (MM_PUR_PURCHASE_ORDER). I created new Master and Content template which I linked via config and that pulls through correctly. They have some address fields i.e their Invoice To Address which should be read from a z-table and one or two non standard fields on the form, which got me to the point where I had to extend the OData service in order to 1) add the non standard fields 2) add the coding for the custom address. So I did my redefinition that created ZFDP_EF_PURCHASE_ORDER and ZCL_ZFDP_EF_PURCHAS_01_DPC_EXT. So my understanding was that I should link that redefined OData to the content template in Output Management Form Template.. but the Z redefined service does not show up there? That is why I thought I had to change it in the call back class.. but maybe I am missing something again ? :))
User | Count |
---|---|
78 | |
11 | |
9 | |
8 | |
7 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.