cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How To get compliant with iFlow Design Guidelines - Define Identifiers To Search In Message

cp11
Explorer
0 Kudos
293

Hello SAP experts,

I use the designguidelines when creating iFlows, but there is one point where I am unable to achieve compliance.

It concerns the following point in the Design Guidelines: Define Identifiers To Search In Message Processing Logs.

My current approach:

At the beginning of the iFlow, I have implemented a Groovy script that stores important values for identifying the customer in the CustomHeaderProperty.

Unfortunately, this does not seem to be enough to make me compliant with the Design Guidelines under ‘Define Identifiers To Search In Message Processing Logs’.

Here is the Groovy script I used:

import com.sap.gateway.ip.core.customdev.util.Message;

def Message processData(Message message) {
    
	def messageLog = messageLogFactory.getMessageLog(message);
	if(messageLog != null){

		def sEquiID = message.getHeaders().get("EquiID");		
		if(sSapAuthenticatedUserName!=null){
			messageLog.addCustomHeaderProperty("EquiID", sEquiID);		
        }

		def sOrderID = message.getHeaders().get("OrderID");		
		if(sSapAuthenticatedUserName!=null){
			messageLog.addCustomHeaderProperty("OrderID", sOrderID);		
        }

	}
	return message;
}

cp11_0-1762760275098.pngcp11_1-1762760289235.png

 

Do you have any idea what else I need to do?

Best regards

Chris

Accepted Solutions (1)

Accepted Solutions (1)

Andrzej_Filusz
Contributor

Hello Chris,

Please fix "copy&paste" error in your script: replace the first occurrence of "sSapAuthenticatedUserName" with "sEquiID" and the second one with "sOrderID".

Then set the following header variables: SAP_ApplicationID, SAP_Sender, SAP_Receiver and SAP_MessageType. You can use Content Modifier - the Message Header tab.

Best regards,

Andrzej

 

cp11
Explorer
0 Kudos

Hello Andrzej,

you're right, I made a copy-paste mistake. Thank you for pointing that out.

I tried your solution, and it's exactly what I was looking for.

Thank you very much for your help.

Best regards,

Chris

Answers (0)