Retrieve user in webdynpro code through ume api
Hi
How to get the user name through code in webdynpro application.
please tell me which UME api to use.
Regards
Vidyadhar
Hi,
Check the code below, you can retrive the user details
ISearchResult rst = UMFactory.getUserFactory().getUniqueIDs();
IUserFactory usf = UMFactory.getUserFactory();
IUser iuser = null;
IUserListElement userElement = null;
int i = 0;
while (rst.hasNext()) {
iuser =
UMFactory.getUserFactory().getUser(rst.next().toString());
String email = iuser.getEmail();
String fname = iuser.getFirstName();
String lname = iuser.getLastName();
let me know if there are any issues.
regards
Anil
Similar Messages
-
How to change the font style of user in webdynpro code
Hi Experts
I have retrieved the user in webdynpro code through ume api .
But the username is getting displayed in bold by default.
Could you suggest me how to convert it to normal font so that the username is not displayed in bold.
Regards
ChandanaHi,
You haven't mentioned which UI elememt you are using to display the user name. For textView you can use the design property and set the value as standard.
Regards
Ayyapparaj -
How to get Portal Login user ID and Groups using UME API in JSPDynpages
Hi Experts,
How can I get the portal logged user ID and bsed on that ID need to get his assigend groups.
For this Initially I need to get the logged user ID using UME API.
Can you drop the code to write and display using JSP Dynpages?
Thanks
Venkat.Hi,
Try the below code
IUserFactory userfact=UMFactory.getUserFactory();
IUser user=userfact.getUserByUniqueName(request.getUser().getUserId());
String usrid=user.getUniqueName();
And also you can get the groups assigned to user by using the below code
Iterator groups = user.getParentGroups(true);
while (groups.hasNext()) {
String groupstr = (String) groups.next();
IGroup g = UMFactory.getGroupFactory().getGroup(groupstr);
response.write("Group name "g.getUniqueName()"<br>");
Regards
Suresh -
How to retrieve all users in the portal with UME API
Hi everybody,
I would like to know how to retrieve all the users from a portal, which uses LDAP as a source (there are users created in the portal as well)
My code snippet is :
IUserFactory userFactory = UMFactory.getUserFactory();
UserSearchFilter searchFilter = userFactory.getUserSearchFilter();
searchFilter.setDisplayName("*", ISearchAttribute.LIKE_OPERATOR, false);
ISearchResult searchResult = userFactory.searchUsers(searchFilter);
My problem is that with the code above, only the users created in the portal are displayed, and no LDAP users.
Does someone know how to retrieve all the users whatever is the source?
Regards
Renaudprakash's code should work.
however, mine code below doesn't user a search filter. it retrieves everyuser including users like indexadmin etc. Note:
result.next().toString();
returns a weird uniqueID used in the portal world.
getUniqueName()
gives your the usernames (sAMAccountName in Microsoft AD) people use to logon to the portal.
try {
IUserFactory uf = UMFactory.getUserFactory();
ISearchResult result = uf.getUniqueIDs();
while (result.hasNext()) {
String uniqueid = result.next().toString();
IUser user = uf.getUser(uniqueid);
String userid = user.getUniqueName();
} catch(Exception e) {
//systemout -
"Password has expired" for user created via UME API
Hi,
I have written a service that processes new user accounts and uses the UME API to create them. The code works fine on my local Sneak Preview installation of EP6 SP16, allowing the created users to logon and forcing them to change their password on first login.
When I try and run this code on EP6 SP14 it completes without generating any exceptions but when I try and login I get the message "Password has expired" and cannot login or change the users password.
Does anyone know why?
I have the following UME settings for both servers:
ume.logon.security_policy.password_change_allowed = TRUE
ume.logon.security_policy.password_change_required = TRUE
ume.logon.security_policy.password_expire_days = 99999
The SP14 server also uses LDAP to authenticate users primarily and has the following setting:
ume.persistence.data_source_configuration = dataSourceConfiguration_ads_deep_readonly_db.xml
There are some other UME configuration differences but none that seem relevant to this problem.
Can anyone suggest what the problem might be?
Cheers,
Steve ArcherThe Xp machine is fine acessing the mb
its the macbook that is having a problem accessing the xp machine coz it says that the password has expired
but there is no password for the user on the xp machine that i am trying to access from my mb
so that would be:
xp to mb = fine all working
mb to xp = password expired even though no password required for the xp user -
Retrieving billing/usage through Azure API
I'm looking to retrieve my account usage details through Azure API but couldn't find the relevant API for that.
I know I can download the CSV file of usage details in Azure Portal Account->Subscriptions->Download Usage Details, and would need to retrieve the same through API.
Any help is appreciated. Thanks in advance.Hi ksrishna,
Thanks for your posting!
Currently we don't got the billing usage file using API. You could download in the account page on the portal. Also, you could vote this feature via this customer feedback page:
http://feedback.azure.com/forums/170030-billing/suggestions/1143971-billing-usage-api
Regards,
Will
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
EMail Notification for the Newly Created users using UME API
Hi ,
In my application ,the user creation is handled by custom Admin module which uses the UME APIs. Upon creating the user, we need to send a notification mail to the user's email id which he provided in the Add new user form.
<b>Is there any direct APIs available to notify the user via email. I hope the Standard user creatin module in User Administration also uses the same UME APIs.</b>
Please let me know the possibilities.
Appreciate your help.
<b><b>Sample Code:</b>
<b>IUserFactory mUserFact = UMFactory.getUserFactory();
IUserMaint mUserMaint = mUserMaint = mUserFact.newUser(aUser.getLogin());
IUserAccountFactory mAccountFact =UMFactory.getUserAccountFactory();
IUserAccount portalAccount = null;
mUserMaint.setDisplayName(aUser.getLogin());
mUserMaint.setXXX();
mUserMaint.save();
mUserMaint.commit();
portalAccount = mAccountFact.newUserAccount(aUser.getLogin(), mUserMaint.getUniqueID());
mAccount.setPassword("XXXXXX");
aUser.setPassword(mPassword);
mAccount.save();
mAccount.commit();</b></b>
Thanks and Regards,
SekarHi,
I have used the Java Mail API directly send the notification upon new user creation.
Thanks and Regards,
Sekar -
Hi All,
I am trying to lock and unlock the users using UME api's.
This is the code which I had used.
com.sap.security.api.IUser user = UMFactory.getUserFactory().getUserByLogonID("test");
String userId = user.getUniqueName();
IUserAccountFactory uaf = UMFactory.getUserAccountFactory();
IUserAccount ua = uaf.getUserAccountByLogonId(userId);
IUserAccount uma = uaf.getMutableUserAccount(ua.getUniqueID());
IUserFactory uf = UMFactory.getUserFactory();
uma.setLocked(true,0);
uma.save();
uma.commit();
uf.invalidateCacheEntryByLogonId(userId);
When I checked the status of this user "test" in user administration, the status is shown as locked. But when i tried to login with the user "test", I could login successfully.
Couldnt know how this happens. Any points to what is going wrong.
Thanks in advance.
Regards,
Yoga
PS: Useful answers will be rewarded.hi,
you need to use the mutable user account.create one button and on the action of the button put the following code.
try
IWDClientUser wdUser = WDClientUser.getCurrentUser();
IUser user = wdUser.getSAPUser();
IUserAccount[] acct = user.getUserAccounts();
String userId = acct[0].getLogonUid();
IUserAccountFactory accountFactory = UMFactory.getUserAccountFactory();
IUserAccount account = accountFactory.getUserAccountByLogonId("cindranil");
IUserAccount mutableAccount = accountFactory.getMutableUserAccount(account.getUniqueID());
mutableAccount.setLocked(false,IUserAccount.LOCKED_BY_ADMIN);
mutableAccount.save();
mutableAccount.commit();
catch(Exception e)
wdComponentAPI.getMessageManager().reportSuccess("Error");
regards
Indranil
reward points if useful -
Assigning roles to LDAP users through BIP API
Hi.
My customer has BIP 11g and OIM 9.1.0.2 running on the same weblogic server (11g). Both authenticate against the same LDAP server.
One of our desired next steps is to provision from OIM the BIP roles to each LDAP user so every user gets the correct roles (and access to the correct reports) according to the groups he has on OIM.
I've been searching for info regarding this without success. The BIP API doc does not show any info about assigning roles to users.
We don't need to manage LDAP users, BIP roles, etc... through OIM. We only need to assign BIP roles to LDAP users.
Is it possible to make that assignments through BIP API?
If not, any other ideas? New ideas or different approaches are welcome.
Thanks in advance.In OBIEE 11g which includes BIP the application roles are applied to LDAP users and groups using the Enterprise Manager Fusion Control.
During the upgrade process from OBIEE 10g to OBIEE 11g the groups do get assigned to these roles transparently so there must be some API to leverage this functionality.
I would start there, http://download.oracle.com/docs/cd/E14571_01/bi.1111/e10541/admin_api.htm
There are no specific instructions on accomplishing what you seek but if you have some WLST or Java Skills you should be able to get something prototyped.
Let me know if that helps. -
Enabling a User through OIM API
Hi I am trying to enable a user through OIM API, However the end date is already passed for that user, I am setting up a new end date through the Program (showm below). However the update user is not working (i am not sure).
Map usermap = new HashMap();
usermap.put("Users.User ID", User_id );
Map grpmap = new HashMap();
grpmap.put("Groups.Group Name", Group_Name);
tcResultSet ts = userClient.findUsers(usermap); //find all users
String existing_end_date = ts.getStringValue("Users.End Date");
tcResultSet tg = groupClient.findGroups(grpmap); //find requireq group
long ukey = ts.getLongValue("Users.Key");
long gkey = tg.getLongValue("Groups.Key"); //find group key
// ENABLE THE USER
java.util.Date new_end_date = new java.util.Date(111,1,1);
Calendar cal = Calendar.getInstance();
cal.setTime(new_end_date);
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String Str1 = dateFormat.format(cal.getTime());
String Str2 = existing_end_date + " 12:00:00";
System.out.println(User_id+" OLD End Date:" + Str2 + " New End Date: " + Str1);
Map usermap2 = new HashMap();
usermap2.put("Users.User ID", User_id );
usermap2.put("Users.End Date", Str1);
userClient.updateUser(ts,usermap2);
userClient.enableUser(ukey);
I am getting the following error:
U0000018 OLD End Date:2009-09-30 12:00:00 New End Date: 2011-02-01 12:00:00
2/12/2010 15:02:53 oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
WARNING: Exception returned by remote server: {0}
Thor.API.Exceptions.tcAPIException: The user cannot be enabled because the end date is passed.
Not sure why it is happening. It looks like the Updateuser is not working, or something else?
Please advise. Thanks in advance.Hi Suren,
thanks for the note.
I found that as soon as I enable the user, I am getting the followimg messages in the opmn logs:
INFO,06 Dec 2010 10:55:41,841,[XELLERATE.JAVACLIENT],System Event Handler: Validating Organization for an User.
INFO,06 Dec 2010 10:55:41,944,[XELLERATE.JAVACLIENT],System Event Handler: Triggering Processes related to User.
INFO,06 Dec 2010 10:55:42,402,[XELLERATE.JAVACLIENT],System Event Handler: Enabling the User
INFO,06 Dec 2010 10:55:42,421,[XELLERATE.JAVACLIENT],System Event Handler: Validating Organization for an User.
INFO,06 Dec 2010 10:55:42,427,[XELLERATE.JAVACLIENT],System Event Handler: Triggering Processes related to User.
INFO,06 Dec 2010 10:55:42,439,[XELLERATE.JAVACLIENT],System Event Handler: Changing application data based on Organization change.
INFO,06 Dec 2010 10:55:42,442,[XELLERATE.JAVACLIENT],System Event Handler: Auto-Group Membership Event.
INFO,06 Dec 2010 10:55:43,715,[XELLERATE.JAVACLIENT],System Event Handler: Evaluating User Policies
So, the access policies are getting evaluated, triggering provisioning processes.
What I am planning to do is, to disable the access policies and try to run the Program.
Because of this issue, my Program is throwing an error (until I looked into the opmn logs, it doesn't make sense).
6/12/2010 10:55:50 oracle.j2ee.rmi.RMIMessages EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
WARNING: Exception returned by remote server: {0}
Thor.API.Exceptions.tcAPIException: Error occurred enabling Xellerate User instance.
Regards
Vijay Chinnasamy -
Retrieve already deployed webdynpro for java source code from portal server
HI ,
We have webdynpro for java apllication already deployed on the J2EE server. We found the ear file related to this application. But I am not able to make any changes to the ear file in NWDS as it cannot be directly imported into NWDS. We do not have NWDI for software logistics and the resource who built the WDJ application has left the company. Is there any way that I can retrieve the complete source code of the application from the portal. I need to make some changes to Webdynpro component and its view. I have worked with basis team to retrieve the ear file from portal server. But I could not make any progress just with the ear file. Thank you for your help in advance
Regards,
KMM.You are probably breaking some license agreement by de-compiling the content of the 'war' files. Why not ask the people who provided the 'war' file if you could have the source and build system.
-
Create user via UME API/LDAP
Hi,
I'm trying to create a user using the UME Api
IUserMaint umeUser = UMFactory.getUserFactory().newUser( uniqueId );
.... set properties on umeUser...
umeUser.commit;
The user created ok in our ldap server (Tivoli DS) but on the root dn, i.e. ou=companyX,c=se
Is there a way to create the user in another ldap-node, say ou=internetUsers, ou=companyX, c=se?Hello Mattias,
You should set the property
<b>ume.ldap.access.creation_path.uacc = ou=internetUsers, ou=companyX, c=se</b>
Check this for more:
http://help.sap.com/saphelp_nw2004s/helpdata/en/63/14f5b51a6eff429f2d8b2063400e82/content.htm
This path is where new user accounts are created.
This path must be relative to the path defined in
ume.ldap.access.base_path.uacc
If this property is not defined, user accounts are stored in the path defined in
ume.ldap.access.base_path.uacc
Greeting,
Praveen Gudapati -
How to Update UDO through DI API code
Hello,
I have created UDO through DI API successfully, now I want to update the UDO through DI API code, and want to add some more child tables, but I am unable to do that, its showing me message that UDO successfully updated but when I am checking through B1, I can see that newly created child tables are not ticked in the check boxes. I am pasting my code, Please some one tell me how to fix this problem.
Private Sub AddUDO()
Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.ChildTables.TableName = "DC3_N"
oUserObjectMD.ChildTables.Add()
oUserObjectMD.ChildTables.TableName = "DC4_N"
oUserObjectMD.Code = "UDO_CHECK_N"
oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
oUserObjectMD.Name = "UDO_CHECK_N"
oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document
oUserObjectMD.TableName = "DMT_N"
oUserObjectMD.GetByKey("UDO_CHECK_N")
lRetCode = oUserObjectMD.Update()
If lRetCode <> 0 Then
If lRetCode = -1 Then
'chkUDOAfter.SetItemChecked(12, True)
Else
oCompany.GetLastError(lRetCode, sErrMsg)
MsgBox(sErrMsg)
End If
Else
MsgBox("UDO: " & oUserObjectMD.Name & " was updated successfully")
'chkUDOAfter.SetItemChecked(14, True)
End If
oUserObjectMD = Nothing
GC.Collect() 'Release the handle to the table
End Sub
Regards,
Sudeshna.Hi Ian,
I have pasted the line "oUserObjectMD.GetByKey("UDO_CHECK_N")" immediately after "oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
" like below:
oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
oUserObjectMD.GetByKey("UDO_CHECK_N")
but this time it is adding the two new tables in UDO, but some how removing the first Master table from UDO.
Can you tell me how solve this, or can you provide some working code example regarding this.
Regards,
Sudeshna. -
Unable to created users through UME on portal with AS ABAP as its data sorc
Hi,
Unable to created users through UME on portal with AS ABAP as its data source.
I have assigned SAP_BC_JSF_COMMUNICATION to the user SAPJSF but this only helps in editing the already existing users but not in creating new users on portal.
I have checked that that the role SAP_BC_JSF_COMMUNICATION is properly generated and has * in all authorizations. I have even assigned SAP_ALL and SAP_NEW to SAPJSF and another ID.
DO we need to make any config changes to make the database writable from portal. Please advise.
Thanks,Hi,
If your system is a AS ABAP + +JAVA System,, you have to do the following
1. Login to Client 001 using SAP GUI
2. Create a user id
3. Login to portal and you will be able to see the user.
4.Assign him the portal rights
If you want the portal to use seperate Database for USers, there is a setting in Visual admin, that you can change for the same, but i dont remember that -
Unable to Change Withholding Tax Base Amount while creating Service AP Invoice through DI API?
Dear All,
I am trying to create Service AP Invoice through DI API.
If I post the document without changing SAPPurchaseInvoice.WithholdingTaxData.TaxableAmount the dount ocument is created in SAP without any problem.
But if I change amount in above field then DI API throws error Unbalanced Transaction.
If I post same document in SAP with changed base amount it got posted in SAP without any Issue.
Where I am doing wrong?
please guide.
Using:
SAP B1 version 9 Patch Level 11
Location : India.
Thanks.Hi ,
maybe you can find solution to these note 1812344
1846344 - Overview Note for SAP Business One 8.82 PL12
Symptom
This SAP Note contains collective information related to upgrades to SAP Business One 8.82 Patch Level 12 (B1 8.82 PL12) from previous SAP Business One releases.
In order to receive information about delivered patches via email or RSS, please use the upper right subscription options on http://service.sap.com/~sapidp/011000358700001458732008E
Solution
Patch installation options:
SAP Business One 8.82 PL12 can be installed directly on previous patches of SAP Business One 8.82
You can upgrade your SAP Business One to 8.82PL12 from all patches of the following versions:8.81; 8.8; 2007 A SP01; 2007 A SP00; 2007 B SP00; 2005 A SP01; 2005 B
Patch content:
SAP Business One 8.82 PL12 includes all corrections from previous patches for releases 8.82, 8.81, 8.8, 2007, and 2005.
For details about the contained corrections, please see the SAP Notes listed in the References section.
Notes: SAP Business One 8.82 PL12 contains B1if version 1.17.5
Patch download:
Open http://service.sap.com/sbo-swcenter -> SAP Business One Products -> Updates -> SAP Business One 8.8 -> SAP BUSINESS ONE 8.82 -> Comprised Software Component Versions -> SAP BUSINESS ONE 8.82 -> Win32 -> Downloads tab
Header Data
Released On
02.05.2013 02:34:18
Release Status
Released for Customer
Component
SBO-BC-UPG Upgrade
Priority
Recommendations/additional info
Category
Upgrade information
References
This document refers to:
SAP Business One Notes
1482452
IN_Wrong tax amount was created for some items in the invoice with Excisable BOM item involves
1650289
Printing Inventory Posting List for huge amount of data
1678528
Withholding amount in the first row is zeroed.
1754529
Error Message When Running Pick and Pack Manager
1756263
Open Items List shuts down on out of memory
1757641
Year-end closing
1757690
SEPA File Formats - New Pain Versions
1757898
Incoming Bank File Format
1757904
Outgoing Bank File Format
1762860
Incorrect weight calculation when Automatic Availability Check is on
1770690
Pro Forma Invoice
1776948
Calendar columns are wrong when working with Group View
1780460
OINM column description is not translated
1780486
UI_System crash when you set extreme value of double type to DataTable column
1788256
Incorrect User-Defined Field displayed in a Stock Transfer Request
1788372
ZH: 'Unacceptable Field' when export document to word
1788818
RU loc: No freight in the Tax Invoice layout
1790404
Cash Flow Inconsistency when Canceling Payment
1791295
B1info property of UI API AddonsInstaller object returns NULL value
1791416
Adding a new item to BoM is slow
1794111
Text is overlapping in specific localization
1795595
Change log for item group shows current system date in all the "Created" fields
1797292
Queries in alerts should support more query results
1800055
B1if_ Line break issue in inbound retrieval using JDBC
1802580
Add Journal Voucher to General Ledger report
1803586
Not realized payment is exported via Payment Engine using 'SAPBPDEOPBT_DTAUS' file format
1803751
Period indicator of document series can be changed although it has been used
1804340
LOC_BR_Cannot update Nota Fiscal Model
1805554
G/L Account displayed in a wrong position when unticking the checkbox "Account with Balance of Zero"
1806576
Payment Cannot Be Reconciled Internally
1807611
Cannot update UDF in Distribution Rule used in transactions
1807654
Serial No./Batch inconsistency by canceled Inventory Transfer
1808694
BR: Business Partner Code cannot be updated with CNPJ CPF error
1809398
CR_Cannot Display Related Multi-Value Parameters
1809758
Arrow key not work for Batch/Serial Number Transactions Report
1810099
Tax Amount is Recalculated Even if Tax Code Is Not Changed
1811270
Upgrade fails on Serial And Batches object with error code -10
1811846
Cannot run Exchange Rate Differences when multi branch is activated
1812344
Withholding Tax Amount Is Not Updated in Payment Once Witholding Tax Code Is Changed in Document through DI API
1812740
DI:"Operation Code" show wrong value when add "A/P Tax Invoice" based on "A/P Invoice"
1813029
US_Vendor address on 1099 Summary by Form/Box Report is not updated according to the latest Invoice
1813835
Wrong amounts of Goods Return in Open Item List
1814207
Preliminary page prints setting does not keep after upgrade
1814860
Value "Zero" cannot be imported to "Minimum Inventory Level" field via Excel file
1815535
RFQ: Web front end not displayed in supplier language
1815810
GT: Adding Incoming Payment for Some Cash Flow Relevant Accounts Fails
1816191
BR:System Crashes While Working with Tax Code Determination Window
1816611
CR_Crystal Report Displayed Incorrectly Afte
Maybe you are looking for
-
The best way to get reports 6i output into Excel 97
Hi there, I have a number of graphical reports that have a few group levels. These generate HTML or PDF output ok. I want to get the output to look as close to the HTML/PDF output from Report Server or Runtime into Excel 97. Outputting as HTML and im
-
IBook G3 Dual USB Not Finding Server
I just did a full clean restore for disk ... I'm now trying to connect to the internet via Ethernet . I'm getting error message " The specified server could not be found" , The system defaults to Explorer (5.1) which I'm not familiar with . I check m
-
I'm Panther (10.3.9), RCN cable, no wireless, no router. My connection drops 5-10-15 times a day. Hitting "renew DHCP lease" brings it back. I work at home and am often up/downloading large graphics files, and this is destroying my productivity. I tr
-
Updated to 9.5.5 version
A while back I updated to the Reader 9.5.5 and recently, when viewing pdf files and wanting to print, the print screen remains empty ergo I am unable to print the pdf file I'm wanting. This has happened in several areas, different sites, so there is
-
Photoshop prints smaller than desired
Please assist, I know I must have some setting or workplace thing set incorrectly but can't find it. I have a PSD file that is 8.5 x 11 inches with resolution of 300px. When I go to print it, it prints as a thumbnail size. I tried dropping the resolu