cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI: How to use Login-User in Message-Mapping (SOAP) at Runtime

maxmuenker
Explorer
0 Kudos

Good Morning,

I´m searching for a solution to find out which user has effected the incoming soap-message in the PI (Dual Stack). This should be read out at runtime in the message mapping (for example java-mapping).


I want a general EDI-Input Scenario for external partners and so i need to know at runtime which user has sent the message. The information i need is written in the Header-Information of the SOAP-Message in the bullet "RunTime".


Any idea how a java-mapping for example could look like?

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor

Hi Max!

Sender SOAP adapter has an ASMA attribute called "SRemoteUser". Didn't you try to make use of it?

Regards, Evgeniy.

maxmuenker
Explorer
0 Kudos

Hi Evgeniy,

thank you for the fast answer.

I´ve read about that attribute, but i can´t bring it realy in connection to my problem.

How can i make use of it in the message mapping or use it to proove if the customer-nr in the payload is right to the User? Is it possible to read this attribute with java-Mapping?

Regards, Max.

former_member190293
Active Contributor

Hi Max!

These attributes are sent within message header in "Dynamic Attributes" section:

Sure, you can read it using any kind of mapping. Here is the code snippet for pure java mapping:

public void transform(TransformationInput in, TransformationOutput out)throws StreamTransformationException {
DynamicConfiguration dc = in.getDynamicConfiguration();
DynamicConfigurationKey remUsrKey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/SOAP", "SRemoteUser");
String remoteUser = dc.get(remUsrKey);
}

Regards, Evgeniy.

maxmuenker
Explorer
0 Kudos

Hi Evgeniy,


perfect. Thank you. I searched at the wrong place. I looked at message-mapping instead of mapping-program in operation mapping. My fault.

Regards, Max

Answers (0)