Skip to Content

SAP REST Receiver - Access Response HTTP Header values

Hello,

I am developing an interface in ERP using SAP PI with REST adapter (Receiver). It is a synchronous call and I need to read the Response HTTP Header to get the location. I can see the http header attributes in DynamicConfiguration in sxmb_moni (ERP) but do not know how to access them in my program. Can you please suggest?

Thanks and Regards

Sathya

Add comment
10|10000 characters needed characters exceeded

  • Mark Dihiansan Sathya Gunasekaran

    HI Sathya,

    Something like this

    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/REST","Location");
    String location = conf.get(key);
    
    return location;
  • Thanks Mark. I am an ABAP developer learning PI :). Progressing slowly. But hoping to reach there! Thank you once again. Will update you once I am able to receive the http header in ERP!

    Thanks again

    Sathya

  • Mark Dihiansan Sathya Gunasekaran

    Best of luck in your journey to SAP PI learning! :)

  • Get RSS Feed

0 Answers