cancel
Showing results for 
Search instead for 
Did you mean: 

SAP NetWeaver Gateway Service Pass function imports parameter

kaan_ozdogan
Participant
0 Kudos

Hi Experts,

I can try to pass parameter to rfc function via url.

How can I do it ?

I create function import parameter but I couldnt configure.

My query is

**********************/sap/opu/odata/sap/ZWEBDI_FIORI02_SRV/DiSet?URUNTIPI=35

Thnks,

Accepted Solutions (1)

Accepted Solutions (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Kaan,

URL Convention is as below :

sap/opu/odata/sap/<Your Service Name>/<Function Import Name>?<Parameter Name>='XXX'

As per the latest screen shot,

1. Set the method to GET in GW Model and generate the Run-Time Objects

2. Write Logic in ExecuteAction method of the DPC_EXT class.

3. Clear the model cache in /iwfnd/cache_cleanup

4. While firing in Gateway Client, set HTTP method to GET with the Below URL and should work ->

sap/opu/odata/sap/<Your Service Name>/uruntipi?URUNTIPI='XXX'

Regards,

Ashwin

kaan_ozdogan
Participant
0 Kudos

Hi,

I have new problem,

Method 'EXECUTE_ACTION' not implemented in data provider class

error.


How can I implement method?

I try but I couldn't

ChandraMahajan
Active Contributor
0 Kudos

Go to DPC_EXT class and redefine method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION.

kaan_ozdogan
Participant
0 Kudos

Hi,

I did this steps but get error

Method 'EXECUTE_ACTION' not implemented in data provider class


I redefine method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION.


ChandraMahajan
Active Contributor
0 Kudos

you redefined wrong method.as per screenshot, it seems you redefined /IWBEP/IF_MGW_CORE_SRV_RUNTIME~EXEC_SERVICE_OPERATION.

As I mentioned earlier redefine /IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION.

kaan_ozdogan
Participant
0 Kudos

There is same error.

I redefined this method for DPC and DPC_EXT class

ChandraMahajan
Active Contributor
0 Kudos

you just need to redefine DPC_EXT class method. Please check implementation code for /IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION in my blog

Check for point 6 - Function Import. Also I will suggest to debug the code by putting external point into method. and if possible try to go through all operations that I mentioned in my blog and debug so that you will understand it better.

Regards,

Chandra

Answers (1)

Answers (1)

former_member182372
Active Contributor
0 Kudos
kaan_ozdogan
Participant
0 Kudos

there is an error

Resource not found for the segment 'Di'.

kammaje_cis
Active Contributor
0 Kudos

The URL is good. Did you generate runtime artefacts?

Problem might be with you cache.

Run on your Gateway /IWFND/CACHE_CLEANUP

kaan_ozdogan
Participant
0 Kudos

Didnt change anything.

We cant pass parameter still.

former_member182372
Active Contributor
0 Kudos

Krishna, I am confused. Usually name of the Function Import is the same as in URL, no?

like i have update_user_settings Function Import and I call it like 

sap/opu/odata/xxx/XX_XX_SRV/update_user_settings?...



why Set at the end?

kammaje_cis
Active Contributor
0 Kudos

Ah..

Maksim,

I actually meant the URL given by you is right, and wanted him to additionally clear the cache.

Kaan,

Sorry for confusion.

- URL has to be sap/opu/odata/sap/ZWEBDI_FIORI02_SRV/Di?URUNTIPI=35

After you created the function import, did you generate runtime artefacts and clear cache after that?

kaan_ozdogan
Participant
0 Kudos

This get correct entity without set parameter.

I want to set parameter to rfc function to get entity.

former_member182372
Active Contributor
0 Kudos

>>Resource not found for the segment 'Di'.


that means it is not available, artifacts are not generated successfully

seVladimirs
Active Contributor
0 Kudos

Because you are asking EntitySet to provide you data by calling DiSet.

I fully agree with Maksim and Krishna, correct url must be /sap/opu/odata/sap/ZWEBDI_FIORI02_SRV/Di?URUNTIPI=35

Make sure that method /IWBEP/IF_MGW_APPL_SRV_RUNTIME~EXECUTE_ACTION in your *DPC_EXT has been redefined.

In case it's still doesn't help, please send us screenshot of your Function Import settings.

kaan_ozdogan
Participant
0 Kudos

Hi,

ChandraMahajan
Active Contributor
0 Kudos

you have not specified HTTP method type(GET/POST). specify correct method type and then again regenerate runtime artifacts etc. Check Function import operation as mentioned here

-Chandra

seVladimirs
Active Contributor
0 Kudos

+ you also need to set-up correct cardinality

So please set HTTP method: GET (since I assume you want to read data) + change cardinality to 0..n in this case empty respond will be possible.