cancel
Showing results for 
Search instead for 
Did you mean: 

Obtaining UserName at Runtime

Former Member
0 Kudos

Hello Experts,

I do have a SOAP to SOAP scenrio. Here sender system makes a HTTPS call to intermediate server. Intermediate server does e Revoke check and copies certificate to HTTP header. From here intermediate server makes HTTP call to PI.

On PI basis/admin side this Certificate is mapped to a user and scenario gets executed. So far so good.

But then we have multiple receivers and receivers needs to be determined at runtime depending on Certificate.

Since this certificate is already mapped to an user, if I can find the current username it can be used for receiver determination.

So please suggest me how can I find current user on PI at runtime? Any help/ hints on this topic would be of great help to me.

Otherwise I need to find a way to read in HTTP header from SOAP CAll? Or any other ideas to accomplish this requirement.

looking forward for quick replies.

Kind Regards,

Abhi.

Accepted Solutions (1)

Accepted Solutions (1)

PriyankaAnagani
Active Contributor
0 Kudos

Hi Abhi,

>>>>please suggest me how can I find current user on PI at runtime?

I dint get clear idea about your end to end scenario...but to find the current user at runtime, one idea that i got is.... in message mapping you can perform RFC lookup(ZRFC in PI system that returns system variable sy-uname) and proceed according to your requirement.

Regards

Priyanka

Former Member
0 Kudos

Hi Priyanka,

Thanks for quick reply, but I doubt if this RFC lookup will work. As this lookup will return the user used to make a lookup call i.e. PI user configured on RFC adapter and not user on sender call. I am not sure if RFC lookup can be made with logged on user in any way as i have not worked on RFC lookups for long time?

I am looking for some kind of Dynamic config parameters or java code to detect this user.

Kind Regards,

Abhi.

Former Member
0 Kudos

Hi All,

I have solved the issue.

I have used the SRemoteUser attribute of SOAP sender for receiver determination.

This attribute gets populated with logged in SAP user at runtime.

Thanks to all those who tried to help me! I am closing the thread now.

Kind Regards,

Abhi.

Answers (0)