Getting current user's business role
Hi,
Is there any function that read current user's business role in CRM?
Best Regards.
Sadi
Hi Sadi,
Try something like this:
DATA ls_user_role TYPE string.
DATA lr_profile_instance TYPE REF TO if_crm_ui_profile.
*- Read User Role
lr_profile_instance = cl_crm_ui_profile=>get_instance( ).
CALL METHOD lr_profile_instance->get_profile
RECEIVING
rv_result = ls_user_role.
Kind regards,
Garcia
Similar Messages
-
Getting current user's member of group
Hi expert(s),
I have developed web application using jsp, now i need to know whether the current user logged in at client PC, is member of certain group available in the database, i can get current user using System.getProperty(), but i have to get the list of groups, he/she belongs to. So that i can check his group to authenticate...
What is the workaround?
Waiting for your kind reply.
Thanks & Regards,
Sri.Experts, i give you .net code for done my need, i need to convert/use it in java platform, please give me some useful tips.
If G_sSecurityMode = "ADSL" Then
GUser = System.Environment.UserName
ReDim sGroup(6)
'Default NT user groups which will be created at every system during installation
sGroup(0) = "CPMSDOMAINADMIN"
sGroup(1) = "CPMSCLIENTADMIN"
sGroup(2) = "CPMSDATAPREPADMIN"
sGroup(3) = "CPMSDATAPREPUSER"
sGroup(4) = "CPMSINVENTORYADMIN"
sGroup(5) = "CPMSINVENTORYUSER"
G_sUserGroup = " " 'Global variable defined in GLbdecleration module
'Loop defined to identify the group(s) associated with the current NT user
For i = 0 To 5
objGroup = GetObject("WinNT://" & sMachine _
& "/" & sGroup(i) & ",group")
For Each objUser In objGroup.Members
If UCase(GUser) = UCase(objUser.Name) Then
G_sUserGroup += "'" + sGroup(i) + "'" + ","
End If
Next
Next
G_sUserGroup = G_sUserGroup.TrimEnd(",") 'To truncate the last "," in a g_susergroup string
If Len(Trim(G_sUserGroup)) = 0 Then
MsgBox("No group(s) defined for the user " + GUser, MsgBoxStyle.Information)
Me.Close()
End If
Else
MsgBox("Invalid Security Definition", MsgBoxStyle.Information)
Me.Close()
End If -
Get current user in portal service context
hi guys,
We want to implement a portal service which will check user's role from LDAP, and we need to get the current user id.
We know for class IPortalComponentRequest, there is method getUser().getUserId(), is there any similar method for IServiceContext? or any way for us to get user id in portal service?
regards,
Guo FengHi Feng,
Implement
public String getParameter(IPortalComponentRequest arg0, String arg1)
eg in your implementation class and add the following code.
IUserContext userContext = arg0.getUser();
String username = userContext.getLogonUid();
String full_name = userContext.getDisplayName();
HTH -
How to get the user list under role
Hi Gurus,
in mdm console, if you select a role, you will see the users who are assigned to this role.
how can I get this user list through java api.
Ouser server is MDM7.1SP5
Best regards,
JohnHello John
you cann't get users list.
you can get user roles information since SAP MDM 7.1 SP3:
com.sap.mdm.security.commands GetUserRoles Command
A command to retrieve the array of roles for the specified user
more about api you can read here(What's New in MDM Java and .NET API - part):
http://help.sap.com/saphelp_nwmdm71/helpdata/en/13/041975d8ce4d4287d5205816ea955a/frameset.htm
Regards
Kanstantsin Chernichenka
Edited by: Kanstantsin Chernichenka on Mar 11, 2011 3:10 PM -
Not able to get current user in PCD Filter factory implementation method
hi all,
In the PCD Filter factory implementation method . i am using the following code
public Object getObjectInstance(Object arg0, Name arg1, Context arg2, Hashtable env)
throws Exception
if (Constants.ASPECT_NAVIGATION.equals(env.get(Constants.REQUESTED_ASPECT)))
IUser user = (IUser) env.get(IPcdContext.SECURITY_PRINCIPAL);
String department="null";
if (user != null)
department=user.getDepartment();
if ((department != null) && (!department.equals("")))
filterExpression = "(" + FilterDepartmentService.Department_ATTRIBUTE_KEY + "=" + department + ")";
return filterExpression;
but i cannot able to get the current user. how to get the current user in the above method..
Regards,
Shanthakumar.Hi,
First print the output for env.get(IPcdContext.SECURITY_PRINCIPAL);
If it returns null, set it from the request object first (from the method where Hashtable is declared and request obj is available) and then use it in this getObjectInstance method.
env.put(IPcdContext.SECURITY_PRINCIPAL, request.getUser());
Regards,
Harini S -
Caml query - get current user name
I have an external list via BDC (so cannot change column type, create calculated column or workflow
). There is a text column “Supervisor”. I need to create a view that display all items which the value of “Supervisor” = current login user’s display name or login name (windows user name).
I tried set up the field on the UI with [Me] function which does not work because “Supervisor” is not an user/group type column. Now I am working on the code. I found the follow caml query on the web that is close to what I need:
<Eq>
<FieldRef Name='Supervisor' LookupId='TRUE'/>
<Value Type='Integer'><UserID/></Value>
</Eq>
I know this only work if the ‘Supervisor’ type is “User”. I just wonder if someone know how to replace the <Value> with a text string
of the current user’s display name or window name? I really appreciate for any help (I have struggled with this issue for a week).
Forget to mention that I am working on a web part page in SharePoint designer, not in Visual Studio. So I cannot not using spcontext class.Thank you again for your response. For this method, I need need to find a way to get the current user to a variable, the use the varrible in the query. This works for me:
<ParameterBinding Name="UserID" Location="CAMLVariable;ServerVariable(LOGON_USER)" DefaultValue="CurrentUserName"/>
<Eq>
<FieldRef Name="Supervisor"/>
<Value Type="Text">{UserID}</Value>
</Eq>
<Eq>
<FieldRef Name="AttnMonitor"/>
<Value Type="Text">{UserID}</Value>
</Eq> -
Urgent : How to get current user id
Hello,
fnd_global.user_id returns -1
fnd_profile.get('user_id',x_user_id) return null
can anyone help how to get current logged in user to apps.
Regards,
Dinesh.Hi Dinesh,
You must also make sure you have initialised the app.
If you run this from sqlplus then it will return -1.
If however you run this from within a concurrent program then the user id will be returned.
Try using this from sqlplus fnd_global.apps_initialize
Eg.
begin
dbms_output.put_line(fnd_global.user_id);
fnd_global.apps_initialize(user_id => 3551,
resp_id => 1,
resp_appl_id => 1);
dbms_output.put_line(fnd_global.user_id);
end;
/ -
How to get current user in Exchange 2007 OWA customization page?
Hi,all
I customize an ASPX page(smsconfig.aspx) in Exchange 2007 OWA( this file in ..\Exchange\ClientAccess\OWA\smsconfig.aspx, I don't modify registry.xml & web.config).
My Exchange 2007 OWA has been configurated with Forms-Based Auth.
https://mail.myexchange.com/owa/smsconfig.aspx The page works fine, but it cannot get current logon user with HttpContext.Current.User.Identity or
UserContext.MailboxIdentity or UserContext.LogonIdentity
<%@ Page language="c#" AutoEventWireup="false" Inherits="Microsoft.Exchange.Clients.Owa.Core.OwaPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import namespace="Microsoft.Exchange.Clients"%>
<%@ Import namespace="Microsoft.Exchange.Clients.Owa.Core"%>
<%@ Import namespace="Microsoft.Exchange.Clients.Owa.Premium"%>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Text" %>
<script runat="server">
。。。(my codes in here)
</script>
thanks for your help.
Your Passion.My Potential.Microsoft.Exchange.Clients.Owa.Core.OwaContext.Current.UserContext.LogonIdentity.PrimarySmtpAddress
Высказанное мною здесь - мои личные взгляды, а не позиции корпорации Microsoft. Вся информация предоставляется "как есть" без каких-либо гарантий. -
To get current user through trigger
Hi,
I want audit trail through database trigger. But I noticed in trigger 'portal30.wwctx_api.get_user' is failed to parse. Is there any way to get the current user in trigger?
Thanks,
SumitaPrior to calling the get_user function you'd need to set the context first by invoking the wwctx_api.set_context method.
Peter -
How do i get the current user name/details on weblogic 8.1 server.
I used to use 'weblogic.security.acl.Security.getCurrentUser()' in weblogic 6.1
but i'm investigating moving to weblogic 8.1 and this no longer works. I assume
i should be using MBeans but not really sure exactly which one.
Any pointers would be very helpful.
Thanks in advance
AlanThanks - I was looking to deeply into the problem.
"Anders Mathisen" <[email protected]> wrote:
in which context is this, servlet/jsp or ejb?
in a jsp try the request.getRemoteUser(), or in an EJB use the EJBContext
and retreive the principal.
- Anders Mathisen
"Alan" <[email protected]> wrote in message
news:3fdf3e12$[email protected]..
How do i get the current user name/details on weblogic 8.1 server.
I used to use 'weblogic.security.acl.Security.getCurrentUser()' inweblogic 6.1
but i'm investigating moving to weblogic 8.1 and this no longer works.I
assume
i should be using MBeans but not really sure exactly which one.
Any pointers would be very helpful.
Thanks in advance
Alan -
How to get Current User Group NAME
I am using the com.sun.security.auth.module.NTSystem to obtain information on the current user logged into the NT System. This class gives me the user name, all the group SIDs associated with the current user and also the current user's primary group SID.
But I am not able to retrieve the group Name based on these SIDs.
Please tell me how to find out the Group Name such as "Workgroup" etc. instead of Group SID.
This is very urgent. So please help me.
Thanks in advance!!!I'm having the same problem.
If you found a solution could you post it here.
Thanks. -
How to write customer exit code to get current user as default in variable
Hi guys,
I design a query which has a variable called var_employee , I also set some default values for this variable in query designer. But I would like to set the current user account who logon on (who execute the query) in the dropdownlist as default user when the variable selection screen appear. of course after that he can choose other avaiable value.
I look up some related threads, all says that this need some customer exit code, and they mention to use CMOD to create the customer exit , but I don't know the detail process, as I am pretty new on this.
The attribute of the var_employee variable is : employee(defined info object by myself) characterstic value, customer exit.
Can somebody show me the process to create the customer exit, and the apap code in detail if possbile. then I can try.
Thanks a lot in advance.
Best Regards,
BenHi,
Please have a look at:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
Krzys -
How to get Current User from edir C#
Hi
1) Using C# Ldap Library, How can I get the current logged in User name
2) If I have a user name in the following format : User.Ou.Ou.O
How can I convert that format into a DN and then find the user in
the tree ?
Thanks
KaranMahant
KaranMahant's Profile: http://forums.novell.com/member.php?userid=64239
View this thread: http://forums.novell.com/showthread.php?t=386653KaranMahant;1857953 Wrote:
> Hi
>
> 1) Using C# Ldap Library, How can I get the current logged in User name
> ?
>
> You can use the 'getbinddn' extension facility to do this (in case you
> use eDirectory as the server). Check the following sample:
> http://forgeftp.novell.com/ldapcshar...s/GetBindDN.cs
>
> 2) If I have a user name in the following format : User.Ou.Ou.O
> How can I convert that format into a DN and then find the user in
> the tree ?
>
> There is no helper APIs available in the C# LDAP SDK to convert the
> dotted format to ',' separated ones. If you are astarter, LDAP expects
> the data to be in ',' separated format as:
>
> cn=user,ou=test,o=org.
>
> Thanks
-WITH REGARDS,-
*-Palaniappan N-*
palaniappan1's Profile: http://forums.novell.com/member.php?userid=12325
View this thread: http://forums.novell.com/showthread.php?t=386653 -
Get child users of composite role
Hello
There is FM (ESS_USERS_OF_ROLE_GET ) which bring all user of roles but what i want it's more complicated
IF there is composite role i want to get all the user that in the roles under the composite role .
Let say i have composite role with two roles inside (in the role tree ) .
Composite role
user1"this is the users of the composite role
user2
user3
Role number 1
user4
user7
user9
Role number 2
user 8
user 5
user7
user6
What i want is to get all the users of the composite role and the child role (which is parent ) .
which is .
users 1 - 9.
I read some previous post on this issue in the forum but what I need is to use just this FM without access to the DB
table such as T_AGR_AGRS and COLL_ACTGROUPS_GET_ACTGROUPS ,
What i need to do is recursive call on the FM ESS_USERS_OF_ROLE_GET .
Regards
Joy
Edited by: Joy Stpr on Aug 23, 2009 8:50 AMHello Joy,
How is it possible to use just function module ESS_USERS_OF_ROLE_GET to get data without DB access?
I mean this function module takes input as Simple/Composite ROLE so you have to have some list maintained
which will be input for this function module.
I think you can load composite and simple role in table and loop at it to make calls to function module ESS_USERS_OF_ROLE_GET to get users for compsite/simple roles.
Some input has to be there, That's what I feel.
Check if this helps!
Thanks,
Augustin. -
How did i get current users in my LocalAreaNetwork
Hi everybody...
I need to find the computers Name and the login user name in my LAN. i get computer name using 'net view'
command.but i am unable to find the currently login username for particular computer..is it possible to get the login
username from the input computers Name.
I am using windows xp os..
If any body have idea please reply me...Some OS's support several users logging into the same box at the same time.
# who
posman pts/0 May 6 14:17 (10.82.163.90)
posman pts/1 May 6 14:17 (10.82.163.90)
root pts/2 May 6 14:18 (10.82.163.90)
So what is the "current" login username of the above box?
Even XP can suspend a user session and leave the programs running while another user logs in.
Maybe you are looking for
-
Code for email on a button click
hello, a have a form , with no of record. my requirment is when i click a button all records in that form email as an attachment. thanks yash
-
Java and Partner Applications - EXTREMELY URGENT
gurus, i'm trying to register a single sign on servlet application as a partner application. i followed ths steps as mentioned in the SSO SDK version 307 and when i try to run the application i get the following error - ******* START ERROR ******** E
-
IWeb '08 Images Not Publishing and Image Distortion in Application
I created a website a couple of years ago and recently noticed two issues: 1) Images I included on the site are now not showing up on the published site, but still appear in iWeb '08 app. 2) Images and graphics in iWeb '08 app are barely showing up.
-
Time range parameter doesn't work in JRC
Hi All, I have a optional parameter (BusinessHours) with time type in my report. In my selection formula I have a statment like: If HasValue({?BusineeHours}) Then // do something Else // do something else The report WORKS fine when running within rep
-
volume key not working ofter last update