on 11-04-2013 4:00 PM
Hi All,
I have been working on trying to learn how to extend SAP Fiori apps, using this documentation: http://help.sap.com/saphelp_fiori/fiori10_extend_en.pdf
Firstly I simply wanted to redefine the Gateway service for Travel Expense Approvals - Technical Service Name SRA008_SRV.
I followed these steps:
3. Generated by service, giving the service name, the name ZSRA008_SRV.
At this point I got a message to say there was a sytax error in the DPC:
When I investigated what this error was I found that the error was that the DPC was inheriting from the original service data provider, which is final:
But surely, I should be allows to redefine this service? This is meant to be one of the joys of Fiori, that you can redefine the services....
But my error is so fundamental, that when I attempt to make a call to the OData service I get an instant error that there is a syntax error in the DPC.
Has anyone else come accross this?
What did you do to overcome it?
Have I made a mistake in the steps I made?
Thank you in advance!
Lindsay
Hi Lindsay,
This, like a few other "extensible" parts of Gateway has not been implemented in an extensible way.
Even if the superclass was not finalised, there are too many private methods in that class to make it worthwhile to subclass it; they won't be visible so you would have to copy them.
Your best bet, at this stage in the product lifecycle, is to copy the original DPC, modify that and assign it to your service. Not ideal but it will work until a proper and consistent enhancement strategy is introduced that allows proper re-use of components.
Regards
Ron.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I wonder how convenient it is that the DPC class for MyLeaveRequests in the documentation is not a final class (in either version 1 or 2 of that service). Did they pick this one because it would work or was it just (bad?) luck that they picked one that would work where others won't.
Obviously there are some quality checks required on this software, as it is not consistent at all. MyLeaveRequests fits the bill for redefinition, why can't the rest of Fiori.
I just did what you suggested:
I copied the DPC for the service, and then created a new service, with the same MPC (avoiding the service builder completely!) - and this works great - and more importantly this also avoids another problem I was encountering:
I had tried to create a new service and just "include" the old service, but when I was calling the service sy-uname was being changed to DDIC!
But by instead, copying the DPC and creating a new service that was I am not having these problems.
I guess the difficulty still arises when I want to change the model of this - but then I can copy the model, and make sure that my DPC references the new MPC.
Still trying things out... will let you know!
Thanks Ron,
Lindsay
Lindsay,
I am trying to enhance a GW service, sra010_timesheet_approval_srv, I can see the service in SICF but when I choose Redfine GW (Odata) it does not show up in the list of services to choose from?
Any thoughts?
Thanks, Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mike,
SICF doesn't define the service. If there is a node there, it should be in the service catalog but that isn't always 100% true
Can you see the service in /IWFND/MAINT_SERVICE, either as active or inactive? If it's there you should be able to redefine it. If it's not there, the software component needs to be installed.
FYI, the DPC/MPC of this service are not finalised, so this should be enhanceable.
Regards
Ron.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.