cancel
Showing results for 
Search instead for 
Did you mean: 

RFC to REST scenario, using 1 parameter as part of URL and other parameters as part of PUT Request

former_member201275
Active Contributor
0 Kudos

I have an RFC in SAP which has 3 import parameters:

Person number

Street

City

I have a URL which is something like:

https //development.addresses.xyz.net/rest/person/1234

(where 1234 is the person number)

The request body of the PUT service has street and city:

{ “street”: “string”,

“city”: “string” }

I would like to be able to enter the person number i.e. 1234 automatically into the URL at run time, and not have to hard code it.

The problem is, when the person number is part of the PUT request it doesn’t of course work because Person number is not in the PUT request.

Is there a way to do this?

I have other RFC scenarios where I send the person number in the Request, and then use a GET service to return information in the RESPONSE body, and that is pretty easy i.e. something like this:

https //development.addresses.xyz.net/rest/person/{nPersonnumber}

And this works fine.

How to do this for a PUT service where there is more than just the Person Number field?

Any help is greatly appreciated.

kottiyil_ramnath
Participant
0 Kudos

Hi Glen,

I was just looking at the sample you provided. In that, URL has {nPersonnumber} which in fact is wrong it has to be the pattern element which is {number}. Is that a typo?

Regards,

Ramnath

former_member201275
Active Contributor
0 Kudos

Hi Ramnath,

yes it is just a typo, I didn't want to include the actual values i use so i typed over them and in some cases it is not 100%

Accepted Solutions (0)

Answers (0)