on 04-26-2016 11:23 AM
Hello,
i work on "My Shopping Cart" SRM Fiori application.
I need to add a customer field among an entity type's properties. The ABAP structure type name is /SRMNXP/S_SC_HEADER: i added my CUF in its include /SRMNXP/INCL_CUS_MINISC_HDR.
In SEGW, i created a Z project and i redefined the SAP GW OData technical service name /SRMNXP/SHOPPING_CART.
Then, i imported the properties from data source in order to add my CUF.
Finally, i generated the runtime objects (artifacts).
Nevertheless, data provider base and extension classes failed due to syntax error (The final class "/SRMNXP/CL_DATA_ACCESS_BASE" cannot have any subclasses).
What am i missing?
Moreover, after solving this point, is there any other steps to realize?
One final question: where can i look at standard entity types for a technical service (as the way displayed in SEGW after OData service redefinition?)
Thank you for you help.
Regards.
Laurent.
Hi all,
below a summary of what i did:
1) i redefine OData service /SRMNXP/SHOPPING_CART following this SAP Help Redefining OData service (GW)
2) i generated the service following this SAP Help Generating Runtime Objects
3) i activated and maiintained the service following this SAP Help Creating the ABAP Classes and Registering the Service
But i still have the error message "The final class "/SRMNXP/CL_DATA_ACCESS_BASE" cannot have any subclasses." when i check my DPC end DPC_EXT classes...
In /N/IWFND/MAINT_SERVICE transaction, using the SAP Gateway Client, if i execute a request URI for metadata with my new service name, my new property (my CUF) is correclty added to the standard ones.
But if i execute a query for my entityset (collection), i have a DUMP in ST22. This DUMP is also linked to DPC_EXT class...
Does this mean i do not have to generate the DPC classes?
Or, if i have to generate thoses classes, how to do it without the syntax error?
Thank you for your help.
Regards.
Laurent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the original class /SRMNXP/CL_DATA_ACCESS_BASE has not been marked 'READY' for redefinition. I do not have this class in my landscape, so I could not check.
In SE24, look for final checkbox under 'Properties' tab. If it is marked final , you can not inherit from it, and thus you can not redefine this service.
Example Screenshot:
Sometime this may be done intentionally by the owner of the original service to stop further redefinition .
Hello Atanu,
yes, you are correct: superclass /SRMNXP/CL_DATA_ACCESS_BASE is a final class
But the problem is this class is the class used as DPC in most of the service names for software component SRMNXP01 (used for SRM UI Add-On but also for "My Shopping Cart" and "Tracking Shopping Cart" Fiori Apps)...
So why SAP defined this class as "Final"?
Due to this, how can i redefine standard services?
Regards.
Laurent.
There can be situation where the owner of the service may want to stop you from further redefinition of the service. This may be due to technical limitation of the service , architectural design or something else. But this is a decision that the owner of of the service has taken and this stops you from any further action on it.
However this is very application specific and can not be answered in generic Gateway context.
To know the actual reason you may either ask the question in SRM SCN community or raise a message to SAP for further clarification
Hello,
thanks Ashish and Vinita,
As it seems most of the data and model previder classes for SRM UI Add-On are final ones, we cannot use SEGW transaction.
It is mandatory to use BAdI for model and data provider enhancement or redefinition.
Regards.
Laurent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Laurent
Maybe the thread is already closed but still if you would want to consider an alternative option which I find much easier compared to extending the services is using the BADI's and passing data to it .
/SRMNXP/BD_ENHANCE_MODEL
You can use this BAdI to enhance the gateway service model and add fields to the UI.
Let me know if this helps ?
Regards
Vinita
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ashish,
sorry for the delay...
I double click onto error message, but i do not jump to the class as in transaction /IWDND/ERROR_LOG with the button "Active source".
So i go directly to the class ZCL_ZUIX_TEMPORARY_SC_DPC in SE24 transaction.
Doing a check, i have error "The final class /SRMNXP/CL_DATA_ACCES_BASE" cannot have any subclasses".
I have the same error with ZCL_ZUIX_TEMPORARY_SC_DPC_EXT class.
Why do i have this error? Artifacts are generated automatically...
Regards.
Laurent.
Hi,
The artifacts are not generated as the DPC class is blank. The problem which are getting is valid as that /SRMNXP/CL_DATA_ACCESS_BASE is a final class, its just following OOP rule.
Why didn't you use the badi /SRMNXP/BD_ENHANCE_MODEL.
I am sorry but I am really confused, as why it is calling a final class.
Can you tell one thing, what did you do in service implementation for this entity, did u do a mapping.?
I can't even check this class and the modelling work as I am not having this application .
Why don't you do a cross check from the original application (If you can).
That might help.
Regards
Ashish
Hello,
the only things i did in SEGW is described in my previous messages.
The service name concerned (SHOPPING_CART) was previously maintained and activated in /IWFND/MAINT_SERVICE.
You tell me to implement /SRMNXP/BD_ENHANCE_MODEL BAdI: so, SEGW transaction has no use?
Do you have any link to clear documentation which explains how to enhance entity type properties?
Thank you.
Regards.
Laurent.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.