cancel
Showing results for 
Search instead for 
Did you mean: 

SAP user in mapping

Former Member
0 Kudos

Hi everyone!

Is it possible to use the sy-uname for the logged on user (XI system) in the mapping? I know I can retrieve it with an ABAP mapping before the XI mapping, but I would like to know if it can be found in a system field or anything...

regards Marianne

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi.

Thanks for that input, but it still returns value 'null'...I have some ideas now that I can look into so I'll see what I can get from it...

Marianne

Former Member
0 Kudos

Hi mariane

Set the parameter

Apply URL parameter

Parameter1 - sap-user

This has to be setup in Sender HTTP adapter. With this the value will be passed when there is a data posted to URL for your sender adapter.

http://xiserver:port/sap/xi/adapter_plain?namespace=senderNamespace&interface=senderinterface&service=sender service&party=sender party&agency=&scheme=&QOS=QOS&sap-user=userid &sap-password=password&sap-client=PI client&sap-language=EN 

Thanks

Gaurav

justin_santhanam
Active Contributor
0 Kudos

Marianne,

Please go thru Bhavesh's reply in the below thread.

raj.

Former Member
0 Kudos

Hi

Thanks. The only problem is that it gives me the *adm user, not the user that is logging on the XI system with the request (a sync https request).

Is there another System.getProperty(****) that can give me the loggen on user??

Marianne

Former Member
0 Kudos

try to get all the properties from System.getProperties() and look if any one of them is useful...

justin_santhanam
Active Contributor
0 Kudos

Marianne,

I'm not sure whether Smitha's reply in the below thread might help you!

raj.

Former Member
0 Kudos

Hi Anand

I guess I have to be in a java mapping to use the system.getProperties() method? A bit hard as I do not have this for this scenario. Or can I use this method somewhere else?

I'll anyway try to look further for the different properties.

Rai: I have tried dynamic configuration before, but in this case it only gives me 'null' as output...

Marianne

Former Member
0 Kudos

Hi Mariane

You can get the user of the HTTPS request

This is possible when you have sap-user in the URL of HTTP.

Set the parameter

Apply URL parameter

Parameter1 - sap-user

Then in mapping just write a UDF

 DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

DynamicConfigurationKey keyURL1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/HTTP", "UrlParamOne");
String ourUser = conf.get(keyURL1);

return ourUser;

You can pass this user to target message. I think this you was looking for.

Thanks

Gaurav

Edited by: Gaurav Bhargava on Oct 30, 2008 12:45 AM