cancel
Showing results for 
Search instead for 
Did you mean: 

Rest lookup and read header data

Muniyappan
Active Contributor
0 Kudos

Hi All,

My PI version is 7.4 SP 13 dual stack.

I am doing proxy to rest scenario. I have Purchase order create and update scenario. i am able to do PO creation using post method. no issues with po creation.

While sending Purchase  order update, i need to pass the Etag value in the http header in if-Match parameter. Rest team told to get the etag value by calling get method first and then pass po update data to put method.

i am trying to use rest look up to call get method and retrieve the etag value. but Etag is not coming under body. it is coming under header.

is it possible to read the http header value in the lookup?

i know in synchronous interface, we can read the rest response header values in dynamic configuration. 

current workaround:

I am thinking to use this work around to tackle the issue.

In PO creation interface, Etag value is coming the dynamic configuration of response message. I will read this value in pi message mapping and pass it to ECC to store in custom table.

When PO update interface executes, i will perform RFC lookup to get the Etag value and pass it to put method. in the response i will get the Etag value from rest and will update in ztable again.

in order to post message to rest, i have to send the token id. for that i am doing rest lookup. so for PO update i will be doing first RFC lookup to get etag and rest look up to get the token id.

Please let me know if anyone has better solution for this.

Regards,

Muni

Accepted Solutions (0)

Answers (1)

Answers (1)

Muniyappan
Active Contributor
0 Kudos

Pasting dynamic configuration values which comes in normal synchronous scenario