cancel
Showing results for 
Search instead for 
Did you mean: 

Trace In SAP HCI

0 Kudos

Dear Experts,

Trace period Is 10 minutes only in SAP HCI. How to increase the trace timing in SAP HCI. How to save the payload for whole day. Is there any option is there to save the request and response payload. Please help me on this to store the data . Is there any possiblity to achieve this development.

Regards,

Naveen

Accepted Solutions (1)

Accepted Solutions (1)

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Naveen,

As per my understanding if your iflow is very big having lot of steps then this MPL will grow like anything and after certain limit MPL will be truncated.So its better to have it as attachment compared to pasting it in MPL.

For your query below should do the same,but I doubt about how much volume this property can hold.

import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
  def body = message.getBody(java.lang.String) as String;
  def messageLog = messageLogFactory.getMessageLog(message);
  if(messageLog != null){
  messageLog.setStringProperty("Logging#1", body) 
  }
  return message;
}

Regards,

Sriprasad Shivaram Bhat

Thank you so much sriprasad,

I am getting Proper MPL Payload Response.

Regards,

Naveen

Answers (2)

Answers (2)

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Naveen,

As per my understanding there is a option to increase the tracing period from backend only.

Even your SFTP way of achieving works.Similarly have a look at below 2 blogs where you can store the payload in MPL ( thinking payload size is not huge ) even that also help you.

https://blogs.sap.com/2018/04/10/enhancements-to-message-processing-log-viewer-in-the-web-applicatio...

https://blogs.sap.com/2016/04/19/hci-logging-using-groovy-scripts/

Hope this clarifies most of your queries.

Regards,

Sriprasad Shivaram Bhat

0 Kudos

Thank you so much Sriprasad for replying.

From the blog,

Actually,I have tried this below code i got attachment file in message monitoring.


import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
  def body = message.getBody(java.lang.String) as String;
  def messageLog = messageLogFactory.getMessageLog(message);
  if(messageLog != null){
  messageLog.setStringProperty("Logging#1", "Printing Payload As Attachment")
  messageLog.addAttachmentAsString("ResponsePayload:", body, "text/plain");
  }
  return message;
}

But my requirement is i need to show payloads in Message Processing Log Itself:

Please help me groovy script to show payloads like below screenshot in MPL either Request or Response Payload.

Payloads:Instead of file. i need to show the payloads in log itself like below screenshot.

Example screenshot i have attached below:

Regards,

Naveen

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Naveen,

From developer perspective its not possible to change this timeline.

You can create a ticket to LOD-HCI-PI-RT to get it changed with clear case for changing it.

Regards,

Sriprasad Shivaram Bhat

0 Kudos

Thanks Sriprasad for replying.

1)I will raise a ticket in LOD-HCI-PI-RT,after raising a ticket whether one day will increase trace timing?

2)Else,I need to save all the request and response payload to SFTP Folder. When i required after 15-20 days i will take it from SFTP Folder whether it is possible to store like this way?

3)If we are able to get request and response payloads in logs?

As point 2 i need to save those payloads which i have highlighted in my below screenshots.

As Point 3 i am refering the below link.

https://blogs.sap.com/2016/04/29/monitoring-your-integration-flows/

Point 3 referring

Can you please suggest me which one is suitable for My requirements.

Regards,

Naveen