cancel
Showing results for 
Search instead for 
Did you mean: 

how to develop odata service for one single rfc? operation read and write

former_member182645
Participant
0 Kudos

Hi All

How to develop odata service for single rfc? operation read and write

RFC contain

Accepted Solutions (0)

Answers (1)

Answers (1)

AshwinDutt
Active Contributor
0 Kudos

Hello Radhesh,

If your FM is able to do both Read and Create, then you can use that FM to get data when Read Service is called and use the same to Create data when POST is fired.

You ca also have a single Entity by setting appropriate property as KEY(s) in your GW model to achieve the above.

Just for an Example ->

Say you have Entity ' Employee' in the GW model and have properties ' EmployeeID ' and ' FirstName ' and ' Last Name '.

You can Make ' EmployeeID ' as Key in the GW model.

1. During POST FirstName and LastName is passed to the FM and it returns EmployeeID on successful create operation.

2. Now for Read, pass the above EmployeeID to get the newly created data.

For straight forward cases like above, you can use SEGW and FM to perform the mapping to implement Create and Read operations, Generate Objects.

On successful Create, Read is fired displaying the newly created data the Response

Regards,

Ashwin

former_member182645
Participant
0 Kudos

Hi Ashwin

Thanks for reply.

This is my rfc/fm.

And SEGW

n result

AshwinDutt
Active Contributor
0 Kudos

You need to put Beak Point in Get_Entity method and debug. This way you can find out the issue.

former_member182645
Participant
0 Kudos

i think DPC class has to debug right?

former_member182645
Participant
0 Kudos

i tried to put break point at dpc and dpc_ext class and at get_entity method.

n tried to run service in /iwfnd/gw_client

seams debug not working.....

please let me know to debug

thanks in advance

EkanshCapgemini
Active Contributor
0 Kudos

Hi,

To troubleshoot a gateway service, check this .

Put an external break point in GET_ENTITY method of your entityset in DPC_EXT class.

Thanks,

Ekansh

former_member182645
Participant
0 Kudos

hi eknash

i am doing same thin for debug... might be doing wrong way...

after set debug .... how to go next?

does i have to test service in /iwfnd/gw_client ?

or run frm same class?

EkanshCapgemini
Active Contributor
0 Kudos

After putting the external breakpoint for your user, test the READ call in gateway client. It should trigger the breakpoint.

former_member182645
Participant
0 Kudos

yes i try to execute get method but seams its not stoping at break point...

it is necessary to redefine dpc_exp-get entity class?

coz i import rfc

done mapping at query and read opration.

and checking result....

this is right way or i have to redefine class?

former_member182645
Participant
0 Kudos

i checked in error log.,

in bottom it show

destination=none is this matter?

EkanshCapgemini
Active Contributor
0 Kudos

Hi Radhesh,

If the RFC that you are using is in the same system, it would be having destination as NONE but if the RFC is in any other system then the destination would be that system. It depends on your landscape.

former_member182645
Participant
0 Kudos

hi eknash

can u tell me plz

what will be the import and export or table parameter for FM for gateway

as

i want to retrive data with odata

table structure

siteid, iono, volum n voleh

i tried lots of way to do it, i am doing in 7.4 where it say to necessary to implement get_entity set