cancel
Showing results for 
Search instead for 
Did you mean: 

Pass uname into RFC FM

Former Member
0 Kudos

Hi,

In my OrgChart (3.0 SP2, SSO with Logon tickets) data retrieves from SAP under system user. Now I need to pass real user name into z-FM (to restrict some data retrieving), but call this FM under system user. Is that possible, to pass user name as input parameter? How?

Best regards,

Sergey Aksenov

Accepted Solutions (0)

Answers (2)

Answers (2)

lukemarson
Active Contributor
0 Kudos

Hi Sergey,

In your function module you need to declare SY-UNAME so that it uses the logged-in users user Id.

Best regards,

Luke

StephenBurr
Active Contributor
0 Kudos

Sergey,

Good question

I haven't tried this recently but previously you could reference fields in the user object (see data element UserPopulationInfo for the fields available).

Format to reference the field was:

[![CURRENTUSER.USERID]!]

So you should be able to use this in your NakisaRFC config (OTFSchema) for example to pick up the user id of the current user and use it to drive the data extraction.

If the above format doesn't work, try

[![CURRENTUSER['USERID']]!]

Does that help?

Stephen

0 Kudos

Hi Stephen,

I am facing a similar issue. We are passing the userid and password as a part of the connection string. This is required to avoid providing additional display authorization to users.

If we donot pass the user credentials then sy-uname is working fine. However if we pass user credentials then it is taking the credentials of the system user.

Our RFC function has two parameters perno and uname . Perno is passing fine but unable to pass the parameter uname ( uname need current userid ).

We are using a linked data element to display the additional field .Can you please suggest how to pass the nakis logged in user id .

Regards

Sumeet

StephenBurr
Active Contributor
0 Kudos

Is this also 3.0 SP2?

If not, please start a new thread and post the details relevant to your system.

0 Kudos

Yes we are also running Nakisa 3.0 SP2

Regards

Sumeet