You have imported the required interfaces and gotten the required factories.
More information: User Management Functions for Users .
This procedure describes how you can get a user and read an attribute of that user. Use this procedure when you need to display user data and no existing application suits your needs. Once your custom application has read the data, you must decide how to display it.
The SAP NetWeaver Application Server (AS) Java includes a user viewer application. This application is meant to display contact information to other users.
More information:
SAP Help Portal: Allowing Users to View the Contact Information of Other Users .
This example gets the user demo_user and reads the attribute myAttributeName in the com.example namespace.
public static void showUser(String logonID, String nameSpace, String attributeName) { try { // Get the user. // Show basic data. /* * Check the attribute type and read the attribute content with the * corresponding method. */ // Read the content of a multi-value string attribute. // Read the content of a single-value binary attribute. } else { // TODO: Handle attribute not available or does not exist. } } catch (NoSuchUserException nsuex) { // TODO: Handle NoSuchUserException. } catch (NoSuchUserAccountException nsauex) { // TODO: Handle NoSuchUserAccountException. } catch (UMException umex) { // TODO: Handle UMException, } catch (UMRuntimeException umrex) { // TODO: Handle UMRuntimeException. } }