cancel
Showing results for 
Search instead for 
Did you mean: 

Optional function parameters in Odata Service

0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Patrick_vN
Active Contributor
0 Kudos

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.

kammaje_cis
Active Contributor
0 Kudos

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.