cancel
Showing results for 
Search instead for 
Did you mean: 

logged on User ID to be passed to RFC iview

Former Member
0 Kudos

Hi,

EP Version : NW04 SP 18

I have created a RFC iview to call a function module. My FM has 'User Id' field as one of its input fields which should take current logged on user id as the input at run time. How can this be achieved?

I tried to pass the value <logonid> or <username> or <j_user> to get current logged on user and none of the above helped.

Am I using the right value to get the current user id?

Thanks,

Vishnu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Basically you can't! The RFC iView is in my opinion a bad way to get data out of SAP. It is difficult to edit and passing paramaters is a nightmare.

Any chance you can use Visual Composer instead, or maybe right a little portal component to do the same thing?

Ps: if you're using SSO< the username that is used to start the RFC is the same username in the backend system, so maybe you can use sy-uname?

Cheers

Former Member
0 Kudos

Hi Michael,

Thanks for your response. I will have to get help from ABAP developer to try your solution. I will update you with my result.

Thanks,

Vishnu

Former Member
0 Kudos

Hi Michael,

I finally used SY-UNAME to solve this problem. Thanks for your suggestion.

Vishnu

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

Use request.getUser().getLogonUid() (request is ofcourse your IPortalComponentRequest)

Hope it helps

br Peter