Hi,
Which version are you on ?
Regards,
Murali
Hi,
Which version are you on ?
Regards,
Murali
Murali,
This is mainly because the Service Builder was still evoloving while many services for Fiori Wave 1 were getting developed. Even now, you can go ahead with a code based approach for developing Gateway services. Earlier to ODC approach, there were two/three more development approaches for developing a Gateway services, which are deprecated now. As in any Product development, SAP has evolved its tooling for Gateway over time.
regards
Krishna
But that must be transactional, something like 'no person can be stored in the DB without an spouse', that's why I cannot batch the operation, I have to receive both entities and perform the store in SAP, if not, then I just don't save none of them.
Hi Vidhya,
Do not use old launchpage.
Important Note: Please use new UI with new SAP Fiori launchpad
Regards, Masa
SAP Customer Experience Group - CEG
Thanks Chandra.
But while developing SAP NW GW service, where can i set this display format property for Date? I see there are flags for different properties but how to set such properties for specific fields?
Regards
Gaurav Karkara
Hi Experts,
for batch batch update,create and delete call i am using two methods
/IWBEP/IF_MGW_CORE_SRV_RUNTIME~CHANGESET_BEGIN
/IWBEP/IF_MGW_CORE_SRV_RUNTIME~CHANGESET_END
/IWBEP/IF_MGW_CORE_SRV_RUNTIME~CHANGESET_BEGIN{
mf_batch = abap_true. // this one is an custom attribute i have created for my DPC_EXT class
EXIT.
}
/IWBEP/IF_MGW_CORE_SRV_RUNTIME~CHANGESET_END{
CHECK mf_batch EQ abap_true.
commit work.
CLEAR mf_batch.
}
first of all i am not getting why we write EXIT in changeset_begin method.
Including this also i am getting other 2 method of different interface in my DPC_EXT
/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN
/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_END
So could you please tell me what is the purpose of extra 2 methods?
Regards
Saumya
Hi Gaurav,
while creating project, you need to select Service with Vocabulary-Based Annotations to use annotations. Please refer Working with Annotations - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library
Also follow the steps mentioned at Adding Vocabulary-Based Annotations to Data Model Artifacts - SAP NetWeaver Gateway Foundation (SAP_GWFND) - SAP Library
Regards,
Chandra
Hi,
Reason for 2 methods --> As the DPC_EXT class implements 2 interfaces /IWBEP/IF_MGW_APPL_SRV_RUNTIME and /IWBEP/IF_MGW_CORE_SRV_RUNTIME hence you will see 2 methods. This is also true for other methods such as get, read, create entity etc.
But to redefine CHANGESET_BEGIN and CHANGESET_END, you need to redefine
/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_BEGIN
/IWBEP/IF_MGW_APPL_SRV_RUNTIME~CHANGESET_END
Regarding EXIT statement, if the methods do not contain any code ie virtually empty then you could just redefine it with EXIT statement means just exit with empty implementation.
I will suggest to read this document http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40546820-3ea7-2f10-dfab-be373c0da357?overridelayout=t… for more explanatiion.
Regards,
Chandra
Hi Chandra,
first of all thanks for your reply.Let me explain one example .....
Suppose i have to create 10 entity, so that time i will use batch.And my batch will contain 10 POST
request.For each request of above batch first changeset_begin will call then create_entity then changeset_end will call.As per above sequence changeset_end will call 10 times. if i will put commit work statement inside changeset_end then after creation of each entity commit will happen.
but i want to commit after completion of all POST request of a given batch.
So my question is, can i calculate or identify total no of request present inside one batch from server side.
Then only for last request i can write commit.
Please Help me.
Regards
Saumya
Hi Gaurav,
The names EXEC_DATE and EXEC_TIME suggest that these two backend fields belong together and combined identify the point in time at which something gets executed.
If that is the case, the best modeling approach here is to combine the two backend fields EXEC_DATE and EXEC_TIME into one OData property ExecDateTime of type Edm.DateTimeOffset (Offset == with time zone information).
That way the real business semantics is visible in the OData model, and the implementation detail of storing the point in time in two ABAP fields is gracefully hidden from the consumer.
Regards!
--Ralf
Hi All,
I am developing one native iOS app using smp , relay and sap netweaver server.
I have created the Odata service using RFC and the service is working fine in all browsers and rest client.
But when I am trying to access the service from my iOS code it is giving error that SUPJSONException : expected string, found. Internal server error.
I checked my server logs on SMP side and it is saying that IOException caught In Handle method of GWProxy.
I am able to access the service from netweaver server , relay server and smp server.
Please suggest some way to resolve this issue.
With Regards
Neha Pandey
Sorry for late update.. Transports took more time to update destination.. Thanks for response..
Hi Sheetal,
you need to implement logic for filter in get_entityset method of DPC_EXT class.
you will get the filter values in the method parameter IT_FILTER_SELECT_OPTIONS.
There is alternative way to get the values as well. Please see my blog Let’s code CRUDQ and Function Import operations in OData service!
so you have to read the filter value and then accordingly use it to filter data.
Regards,
Chandra
Hi Sheetal,
Remove slash ( / ) after entity set name and give the parameter names should be case sensitive which are same as in metadata
use below URL
/sap/opu/odata/sap/ZCRM_RESOURCEPLANNINGTOOL_SRV/ResourcesSet?$filter=PartnerId eq '0000000190'
The custom bapi is having input parameters not required to implement the filter logic in DPC_EXT class if you are using service builder,the builder automatically created filter logic for the input fields..please make sure your bapi, how it is working in debug mode..
Thanks
Sreenivas
Hi Sreenivas,
I tried this , However I face the same issue
any suggestion .
Sheetal
Hi Sheetal,
Check your custom BAPI with input parameter: PartnerId eq '0000000190' then if it is working fine then keep break point and debug the code in DPC class get entity set method : /IWBEP/IF_MGW_APPL_SRV_RUNTIME~GET_ENTITYSET
Thanks
Sreenivas
Sadly, my incident went nowhere. For those interested, I've included the conversation below (start from the bottom and work your way up):
05/21/2014 - 09:40:13 EST - Reply by SAP
Hello,
our services are not intended to be redefined and
overwritten. Hence our classes are marked for this as final.
05/20/2014 - 12:58:27 EST - Info for SAP by Roger Beach
I don't mean to beat this to death, however, given the theory you are
presenting, why doesn't SAP mark every class that they release as
final. Then we would never be able to inherit any of the standard
delivered classes.
I don't think the intent was to create a situation where customers
could not redefine this service. Is there something wrong with
unmarking this class as final?
05/20/2014 - 12:00:49 EST - Reply by SAP
Hello,
why do you get a reference to our class /UI2/CL_GW_DP_LAUNCHPAD_00 if
you create an own model and data-provider with SEGW.
Please try to avoid to use /UI2/CL_GW_DP_LAUNCHPAD_00 as class-name.
Why is the inheritance of /UI2/CL_GW_DP_LAUNCHPAD_00?
Before generation, please try to avoid any reference to our
LAUNCHPAD-service. Do not use our service-name in generation. Please
tryto do the assignement in a second step.
05/20/2014 - 11:28:54 EST - Info for SAP by Roger Beach
I am confused due to the fact that what you are describing is what we
did.
We generated our own classes by adding a Z to the name so we ended up
with:
ZCL_ZGW_LAUNCHPAD_02_MPC
ZCL_ZGW_LAUNCHPAD_02_MPC_EXT
ZCL_ZGW_LAUNCHPAD_02_DPC
ZCL_ZGW_LAUNCHPAD_02_DPC_EXT
however, due to the inheritance of /UI2/CL_GW_DP_LAUNCHPAD_00 by
ZCL_ZGW_LAUNCHPAD_02_DPC, we get syntax errors.
Are you stating that first we should copy /UI2/CL_GW_DP_LAUNCHPAD_00 to
a Z class and then inherit that one?
05/20/2014 - 11:13:16 EST - Reply by SAP
Hello,
It is not intended to be able to overwrite our class-implementation.
If there is a need to redifine/replace our LAUNCHPAD-service with your
own one, you may generate the
coding in SEGW and assign new class-names. You will not have to
overwrite our classes if you genrate your own classes using SEGW.
You may check if you can generate your own model and
data-provider-class and do later the assignement of your classes to
the service using transaction /n/iwbep/reg_service.
In the standard delivered Gateway Service for working with Launchpads there is a function import that updates the frequently used counter to whatever the current counter is +1.
I have a requirement to provide a button on the UI so that the end user can reset the counter. Theory being, there job may change and while they may have access to certain applications that are in their frequently used list, they may not need them as frequently any longer and they should have the option to remove them.
It would have been fabulous to redefine this standard delivered service and make the change, but given the current class inheritance and SAP's unwillingness to unmark a super class as final, this is not possible.
We are writing a new gateway service whose sole pupose is to update this counter to 0.
Most of the code to accomplish this can just be copied from existing classes.
I am struggling with how this should be structured.
I had put this together in an update entity method. However, this doesn't seem correct since we are basically passing a reference id like:
04ZESS0DZESS_MYHR_FPM20005056A51C9D1EE3AFFEA106D591C3EA
And expecting the code to update some obscure table with a value of 0 for the counter.
1) Is this a correct approach?
2) Should this be done in a function import given that we aren't really updating the entity per se but rather some end user personalization attribute?
3) Is there an issue with having a Gateway Service that is comprised of nothing but one function import?
Any thoughts on this requirement are appreciated, perhaps we are heading down the wrong path altogether....
Hi Roger,
May be you do not even need a oData service, rather you just need a generic REST Service. Read the below doc by Martin,
Generic REST enablement with SAP NetWeaver Gateway
Also I put my thoughts here as well.
oData for Everything? may be not!
regards
Krishna
I do not think the person answering the question has really understood the 'Redefine' option.
As we do not want to overwrite, not even override, but just want to create a custom service, reusing existing service. I would suggest persisting on the question, till you get a reasonable answer.
regards
Krishna