cancel
Showing results for 
Search instead for 
Did you mean: 

Get MII login name without applets

Former Member
0 Kudos

We have been modifying our MII pages to minimize use of applets and maximize use of AJAX.

With the example Javascript code I have, there is one thing I don't know how to do: get the UserID of the logged-in user without the use of applets.

With any applet on the page, I can use this syntax:
var username = document.[AppletName].getPropertyValue("IllumLoginName");

How can I do the same thing without the use of applets?

Thanks,

Greg

Accepted Solutions (1)

Accepted Solutions (1)

former_member185280
Active Contributor
0 Kudos

I think you can make a call to this service to get the current users info: /XMII/Illuminator?service=admin&mode=CurrentProfile

Former Member
0 Kudos

This was a step in the right direction.

(For my AJAX purposes it was important to add "&Content-Type=text/xml" to the end:

/XMII/Illuminator?service=admin&mode=CurrentProfile&Content-Type=text/xml)

However, this worked only when the logged-in user also happens to be an administrator. It doesn't work for just any user. Is there a way of obtaining the name of the logged-in user (and other info such as their roles would also be helpful!) even if that user isn't an administrator?

Greg

former_member185280
Active Contributor
0 Kudos

Sorry I forgot about the PropertyAccessServlet which is what I think you really need. See if this thread helps:

http://scn.sap.com/thread/1302749

jcgood25
Active Contributor
0 Kudos

Any irpt file will allow you the simple usage of tokens like {IllumLoginName} in hidden form field elements or anywhere in the body of the page (just not inside script blocks).

Former Member
0 Kudos

Thanks Christian. That was exactly what I needed.

/XMII/PropertyAccessServlet?mode=list&Content-Type=text/xml

Former Member
0 Kudos

Interesting, I did not know that. I will check it out sometime!

Answers (0)