Skip to Content

Catch a POST Payload.

Good afternoon fellow SAPers.

I am wondering if there's a posibility to keep a trace of the payloads sent to GW services. I know there's the transaction /IWBEP/TRACES, however this is an On - Demand trace and it has a period for when it can keep the Trace up.

Question is if there's a standar way to do the following.

My client requieres us to keep a log of the info sent from our Device to the backend, I need to figure out if there's a way to catch the payload and keep it on a file like XML for reference. Otherwise I could catch the POST Payload that we get from the method read_entry_data and convert it into a XML.

I know it's a weird requierement, but we want to keep a trace of the failed payloads to figure out some issues with the app.

With no further ado, I'm grateful for any ideas that you guys could have.

Cheers.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Aug 18, 2016 at 04:20 AM

    As I can understand you "want to keep a trace of the failed payloads to figure out some issues with the app.".

    Gateway Offers full fledged Error log in case of any such error. The error log can be accessed using transaction /IWFND/ERROR_LOG.

    In the error log you can check the request data section for the payload and the header . No need to explicitly store it anywhere


    Error.png (144.9 kB)
    Add a comment
    10|10000 characters needed characters exceeded

    • If there is any kind of fault during the OData service call that can be captures anyway using the technique I have explained.

      However I am not aware of any explicit way to capture the request as it. The service developers are only exposed to the DPC/MPC classes where the request is already parsed. So here in these places you do not have access to the pure xml /json request.

      However also storing/logging every simple request may slow down your application.

      But if such functionality is absolutely essential in your case, I would suggest you to store the parsed payload received in the DPC methods to some custom table by some custom code. This is not different from the original XML/JSON that comes with the OData request call. Ultimately what matters to you is only the content not the format.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.