Skip to Content
-1

Optional function parameters in Odata Service

Feb 02, 2017 at 04:09 PM

209

avatar image

Dear colleagues,

I have created a Odata Service in transaction SEGW on the basis of an RFC function module. I have created the Data Model and the Mapping to the RFC function module within the Service Implementation.

My problem now: I have always to define my import parameters as key because only in this case it is possible to do the mapping for all import parameters for the function module within the Service Implementation.

Now I tried to set one parameter as "Nullable" with the hope that this import parameter is handled as optional parameter during the test call within the Gateway Client. But this is rejected by the Gateway Service Builder. Not possible because its a key

Does anybody have an idea how to use optional import parameters during Service Creation?

Thanks a lot in advance!

BR Matthias

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Krishna Kishor Kammaje
Feb 04, 2017 at 06:50 PM
0

First of all my suggestion is to use a code based implementation. (not based on mapping RFC and auto generating).

That will give you lots of flexibility while handling practical scenarios.

Share
10 |10000 characters needed characters left characters exceeded
Patrick van Nierop Feb 06, 2017 at 01:57 PM
0

I would use a DDIC structure to define the GW entity (standard or custom depending on the fields required), and then call the bapi(s) in the respective methods of the DPC_EXT class.

As Krishna Kishor Kammaje says, it gives you a lot more flexibility.

Share
10 |10000 characters needed characters left characters exceeded