Created by of IUser

Hi all,
How can I get the created by attribute of an IUser object?
Thx
Ismail

Hi,
If you want to create a new Portal User through webdynpro Using IUSER, then below is the code and respective document.........
Creating user:
IUserMaint user;
          user = UMFactory.getUserFactory().newUser("userTest");
          user.setFirstName("USUARIO"); // Name
          user.setLastName("PRUEBA"); // Name 2
          user.setDepartment("userTest"); // LIFNR
          user.setEmail("user prueba");
          user.save();
          user.commit();
          IUserAccount uacc = UMFactory.getUserAccountFactory().newUserAccount("userTest", user.getUniqueID());
          uacc.setPassword("123qwe");
          uacc.setPasswordChangeRequired(false);
          uacc.save();
          uacc.commit();
Document Available at:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0bd5112-4456-2b10-c28b-9654d5ae8111
Regards,
Srinivas

Similar Messages

  • Error trying to create object of Class IUSer

    I am trying to put in a code that is based on Rle assignment for the user on the portal.
    i am trying to put this code
    IWDClientUser user = WDClientUser.getCurrentUser();
    IUser userID = user.getSAPUser();
    String Userrole=new String();
    for (Iterator iter = userID.getRoles(true); iter.hasNext();) {
    IRole role = UMFactory.getRoleFactory().getRole((String) iter.next());
    Userrole=role.getUniqueName();
    But there is an error in line IUser userID = user.getSAPUser();.
    when i say add imports it is not adding the packages required to cretae an object of this class.
    When i try to manually import
    com.sap.security.api.sda
    but am not able to.. any ideas how to acheive this and assist me if i am doing anything worng?
    regards
    Sam

    Austin,
    Sorry for asking the basic questions.This is what i am doing. I went to DC, right clicked on it and selected properties. Then select JAva build path opition and then select Libraries. There i click on Add External JARs and select com.sap.security.api.jar.
    and click ok.
    do i need to do anything else here.
    And when ever i come back after a while i see that the external
    Jar is missing. IT looks weird. I have to keep on importing the external JAr after every few operations.
    Not sure what the problem could be
    thanks a lto for your patience in helping me ou ton this issue
    Below is the erro rmessage i get when trying to activate
    Build number assigned: 165853
    Change request state from QUEUED to PROCESSING
    ACTIVATION request in Build Space "DJI_EMXSSTR_D" at Node ID: 37,961,750
         [id: 165,817; parentID: 0; type: 4]
         [options: FORCE ACTIVATE PREDECESSORS]
    REQUEST PROCESSING started at 2007-04-17 22:13:46.500 GMT
    ===== Pre-Processing =====
    Waiting 19 ms
    List of activities to be activated:
         1 activity in compartment "sap.com_SAP_ESS_1"
              ESS_lea_1005
                   [seq. no 272][created by RJOGAM at 2007-04-17 18:14:26.0][ID 06c9c16aed2511dbafd000306e5ddf50]
    Analyse dependencies to predecessor activities... started at 2007-04-17 22:13:47.253 GMT
    Analysing predecessors in compartment "sap.com_SAP_ESS_1"
         The following predecessor has to be added to request 165817:
              "XSS_lea_selectionlistview_1003"   [seq. no 271][created by RJOGAM at 4/17/07 1:34 PM][ID 53225486ec4c11db812200306e5ddf50]
    Analyse dependencies to predecessor activities... finished at 2007-04-17 22:13:47.434 GMT and took 181 ms
    Analyse activities... started at 2007-04-17 22:13:47.434 GMT
    Development line state verification started at 2007-04-17 22:13:47.509 GMT
    Verification of the development line [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/] SUCCEEDED
    Development line state verification finished at 2007-04-17 22:13:47.540 GMT and took 31 ms
    Cache verification, level 2 (Comparison of attributes) started at 2007-04-17 22:13:47.540 GMT
    Verification of the following object:
         [DC: sap.com/ess/lea, group: 0] SUCCEEDED
    Cache verification finished at 2007-04-17 22:13:47.617 GMT and took 77 ms
    Analyse dependencies to predecessor activities... finished at 2007-04-17 22:13:47.629 GMT and took 144 ms
              SKIP  : Development Component "sap.com/ess/lea"
         1 component to be build in compartment "sap.com_SAP_ESS_1"
    Analyse activities... finished at 2007-04-17 22:13:47.680 GMT and took 246 ms
    Calculate all combinations of components and variants to be built...
         "sap.com/ess/lea" variant "default"
    Prepare build environment in the file system... started at 2007-04-17 22:13:47.852 GMT
         Synchronize development configuration... finished at 2007-04-17 22:13:47.862 GMT and took 10 ms
         Synchronize component definitions... finished at 2007-04-17 22:13:47.883 GMT and took 20 ms
         Synchronize sources...
    Development line state verification started at 2007-04-17 22:13:47.970 GMT
    Verification of the development line [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/] SUCCEEDED
    Development line state verification finished at 2007-04-17 22:13:48.011 GMT and took 41 ms
    Cache verification, level 2 (Comparison of attributes) started at 2007-04-17 22:13:48.011 GMT
    Verification of the following object:
         [DC: sap.com/ess/lea, group: 1] FAILED
    Comparison of cache items on the paths:
         [/usr/sap/DJI/JC03/j2ee/cluster/server0/temp/CBS/33/.CACHE/1195/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdcontroller]
         [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdcontroller]
    on verification level 2 FAILED due to the following reason:
    Difference in attribute 'Timestamp' [Thu Mar 01 16:49:43 EST 2007][Thu Mar 01 16:49:44 EST 2007]
    Comparison of cache items on the paths:
         [/usr/sap/DJI/JC03/j2ee/cluster/server0/temp/CBS/33/.CACHE/1195/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdcontroller.xlf]
         [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdcontroller.xlf]
    on verification level 2 FAILED due to the following reason:
    Difference in attribute 'Timestamp' [Thu Mar 01 16:49:43 EST 2007][Thu Mar 01 16:49:44 EST 2007]
    Comparison of cache items on the paths:
         [/usr/sap/DJI/JC03/j2ee/cluster/server0/temp/CBS/33/.CACHE/1195/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdview]
         [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdview]
    on verification level 2 FAILED due to the following reason:
    Difference in attribute 'Timestamp' [Thu Mar 01 16:49:43 EST 2007][Thu Mar 01 16:49:44 EST 2007]
    Comparison of cache items on the paths:
         [/usr/sap/DJI/JC03/j2ee/cluster/server0/temp/CBS/33/.CACHE/1195/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdview.xlf]
         [ws/EMXSSTR/sap.com_SAP_ESS/dev/active/DCs/sap.com/ess/lea/_comp/src/packages/com/sap/xss/hr/lea/selectionlist/SelectionListView.wdview.xlf]
    on verification level 2 FAILED due to the following reason:
    Difference in attribute 'Timestamp' [Thu Mar 01 16:49:43 EST 2007][Thu Mar 01 16:49:44 EST 2007]
    Cache verification finished at 2007-04-17 22:13:54.824 GMT and took 6 s 813 ms
         Synchronize sources... finished at 2007-04-17 22:14:02.175 GMT and took 14 s 292 ms
         Synchronize used libraries...
              public part "default" of component "sap.com/tc/col/api" ... OK
                   [PP "default" of DC 226 variant "default"][SC 1196][last successful build: 162348]
              public part "default" of component "sap.com/tc/cmi" ... OK
                   [PP "default" of DC 217 variant "default"][SC 1196][last successful build: 164158]
              public part "default" of component "sap.com/tc/ddic/ddicruntime" ... OK
                   [PP "default" of DC 218 variant "default"][SC 1196][last successful build: 164158]
              public part "default" of component "sap.com/tc/wd/webdynpro" ... OK
                   [PP "default" of DC 196 variant "default"][SC 1192][last successful build: 162348]
              public part "default" of component "sap.com/tc/logging" ... OK
                   [PP "default" of DC 184 variant "default"][SC 1192][last successful build: 162348]
              public part "default" of component "sap.com/com.sap.aii.proxy.framework" ... OK
                   [PP "default" of DC 221 variant "default"][SC 1196][last successful build: 164158]
              public part "default" of component "sap.com/com.sap.aii.util.misc" ... OK
                   [PP "default" of DC 222 variant "default"][SC 1196][last successful build: 162348]
              public part "default" of component "sap.com/com.sap.mw.jco" ... OK
                   [PP "default" of DC 126 variant "default"][SC 1192][last successful build: 162348]
              public part "FloorplanManager" of component "sap.com/pcui_gp/xssfpm" ... OK
                   [PP "FloorplanManager" of DC 223 variant "default"][SC 1193][last successful build: 162556]
              public part "FloorplanManager" of component "sap.com/pcui_gp/xssfpm" ... OK
                   [PP "FloorplanManager" of DC 223 variant "default"][SC 1193][last successful build: 162556]
              public part "FloorplanManager" of component "sap.com/pcui_gp/xssfpm" ... OK
                   [PP "FloorplanManager" of DC 223 variant "default"][SC 1193][last successful build: 162556]
              public part "FloorplanManager" of component "sap.com/pcui_gp/xssfpm" ... OK
                   [PP "FloorplanManager" of DC 223 variant "default"][SC 1193][last successful build: 162556]
              public part "FPMUtils" of component "sap.com/pcui_gp/xssutils" ... OK
                   [PP "FPMUtils" of DC 224 variant "default"][SC 1193][last successful build: 162556]
              public part "FPMUtils" of component "sap.com/pcui_gp/xssutils" ... OK
                   [PP "FPMUtils" of DC 224 variant "default"][SC 1193][last successful build: 162556]
              public part "FPMUtils" of component "sap.com/pcui_gp/xssutils" ... OK
                   [PP "FPMUtils" of DC 224 variant "default"][SC 1193][last successful build: 162556]
              public part "FPMUtils" of component "sap.com/pcui_gp/xssutils" ... OK
                   [PP "FPMUtils" of DC 224 variant "default"][SC 1193][last successful build: 162556]
              public part "default" of component "sap.com/tc/ddic/metamodel/content" ... OK
                   [PP "default" of DC 219 variant "default"][SC 1196][last successful build: 162348]
              public part "default" of component "sap.com/tc/wdp/metamodel/content" ... OK
                   [PP "default" of DC 220 variant "default"][SC 1196][last successful build: 162348]
              public part "default" of component "sap.com/com.sap.exception" ... OK
                   [PP "default" of DC 123 variant "default"][SC 1192][last successful build: 162348]
              public part "default" of component "sap.com/com.sap.exception" ... OK
                   [PP "default" of DC 123 variant "default"][SC 1192][last successful build: 162348]
              public part "FcTmDataExchange" of component "sap.com/pcui_gp/tecl" ... OK
                   [PP "FcTmDataExchange" of DC 230 variant "default"][SC 1193][last successful build: 162556]
              public part "FcTmDataExchange" of component "sap.com/pcui_gp/tecl" ... OK
                   [PP "FcTmDataExchange" of DC 230 variant "default"][SC 1193][last successful build: 162556]
              public part "FcTmDataExchange" of component "sap.com/pcui_gp/tecl" ... OK
                   [PP "FcTmDataExchange" of DC 230 variant "default"][SC 1193][last successful build: 162556]
         Synchronize used libraries... finished at 2007-04-17 22:14:06.635 GMT and took 4 s 459 ms
    The source cache is in INCONSISTENT state for at least one of the request DCs. The build might produce incorrect results.
    Prepare build environment in the file system... finished at 2007-04-17 22:14:06.635 GMT and took 18 s 783 ms
    ===== Pre-Processing =====  finished at 2007-04-17 22:14:06.636 GMT and took 20 s 117 ms
    Waiting 33 ms
    ===== Processing =====
    BUILD DCs
         "sap.com/ess/lea" in variant "default"
              .. FAILURE: The build failed due to compilation errors. See build log for details. [result code: 202]
    ===== Processing =====  finished at 2007-04-17 22:16:01.800 GMT and took 1 m 55 s 131 ms
    ===== Post-Processing =====
    Waiting 12 ms
    Check whether build was successful for all required variants...
         "sap.com/ess/lea" in variant "default"   FAILED
    ===== Post-Processing =====  finished at 2007-04-17 22:16:01.815 GMT and took 3 ms
    Change request state from PROCESSING to FAILED
    ERROR! The following problem(s) occurred  during request processing:
    ERROR! The following error occurred during request processing:Activation FAILED due to build problems. See build logs for details.
    REQUEST PROCESSING finished at 2007-04-17 22:16:01.824 GMT and took 2 m 15 s 324 ms
    sam
    Message was edited by:
            sameer chilama
    Message was edited by:
            sameer chilama

  • How to create a parked document iusing BDC?

    Hi,
    I have a scenario, I need to create a Parked document (prior to approval) directly in R3 using BDC approach. After created, it will send a notification to the approval.
    I'm new to BDC. How do i do that?
    Regards,
    Rayden

    Hi Eric,
    have a look inside: it's empty!. It's the same with FM_PARKED_DOC_DELETE, FM_PARKED_DOC_PROCESS, so these functions do exactly nothing.
    Regards,
    Christian

  • Creating a file in KM with attributes or metada

    Hi friends,
    I would like to create a document/file in KM but whith some attributes or metadata attached like time, date, contact person, telefon, department....
    I'm using the following code to upload a file, but I haven't found any Thread in this Forum about how to attach some metadata or context attributes.
         IPrivateRegistreEntradaView.IFileNodeElement fileelement = wdContext.currentFileNodeElement();
         wdContext.nodeFileNode().bind(fileelement);
         /*Make a simple type of that type*/
         IWDAttributeInfo attInfo = wdContext.nodeFileNode().getNodeInfo().getAttribute("filedata");
         ISimpleTypeModifiable type = attInfo.getModifiableSimpleType();
         /**Following is the code for uploading files**/
         /*Get an object of current Portal user */
         IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
         com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
         /*create an ep5 user from the retrieved user*/
          IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser);
          ResourceContext context = new ResourceContext(ep5User);
         /*Give the path to KM in the variable path */
         RID rid = RID.getRID("/documents");
         IResourceFactory factory = ResourceFactory.getInstance();
         ICollection folder = (ICollection) factory.getResource(rid,context);
          /***Using the upload element we can upload the files to a location in the server drive***/
         /*temperory location for writing */
          String location = "give the location here";
          String fileName = location + fileelement.getFilename();
          File file = new File(fileName);
         /*Create an output stream for writing to the temperory location*/
          FileOutputStream out = new FileOutputStream(file);
          out.write(fileelement.getFiledata());
          out.close();
         /*From the temporary location read the file using an input stream*/
          FileInputStream fin = new FileInputStream(fileName);
          fin.read();
         /*Using this input stream we can write to the repository*/
          //Content content = new Content(fileelement.getFiledata(),fileelement.get)
          Content content = new Content(fin,"byte", -1);
          IResource newResource = folder.createResource(fileelement.getFilename(), null, content);
    I think the solution could be by modifying the second argument of
    IResource newResource = folder.createResource(fileelement.getFilename(), null, content);
    This argument is a "IPropertyMap" type and now takes de value "null", but I'm not sure.
    Any ideas?
    Thanks very much in advance,

    Hello Lohitha,
    Thanks your interest but that link did not help a lot.
    Roberto,
    Thanks a lot for the links, the second one really gives a guide for setting up properties in the portal.
    But I found it quite more extended that my requirements, eventhought it helps a lot, since i just would like to attach some " attributes o some simple data" to the uploding file.
    I've found an option usint IPropertyMap
    Map myMap = new HashMap();
    String DEPARTAMENT = null;
    mapeo.put(DEPARTAMENTO, "HH.RR"); //this is just a example
    IPropertyMap myProperties = new PropertyMap(myMap) {
                   public int size() {
                        // TODO Auto-generated method stub
                        return 0;
                   public boolean isEmpty() {
                        // TODO Auto-generated method stub
                        return false;
    //Here we must implement all the metodes of the interface
    //then finally call
    IResource newResource = folder.createResource(fileelement.getFilename(), myProperties , content);
    But I'm not sure it could work, I'm having technical dificulties,
    Anybody could tell us any other simple option for creating a file in KM attaching some simple attributes??
    Thanks to all.
    Ivan,

  • IIResourceFactory, IUser etc. can't be resolved in EJB???

    Hi,
    i have a EJB and want to create a new folder in my KM-Content by runtime. The problem is that the piece of code which i have to use can't be resolved in my EJB.
    Which libraries or variables should i have to insert into my project folder?
         IUser user = "sp";
         IResourceFactory factory = ResourceFactory.getInstance();
         RID rid = RID.getRID("/etc");
         IResourceContext context = new ResourceContext(user);
         IResource resource = factory.getResource(rid, context);     
    regards,
    Sharam

    Hello Stephen,
    thank you for your reply. Unfortunately it's not possible in my EJB to make an import with:
    import com.sap.security.api.jar; (Messgae->the import bc cannot be resolved)
    import bc.rf.framework_api.jar; (Message-> the import bc cannot be resolved)
    Should i insert some libraries in "Java Build Path" under "Add Variable"?
    regards,
    Sharam

  • Runtime error: Creating a simple resource in a CM repository

    Hi All,
         I am trying to create a simple Resource & a collection in a CM repository without properties.
         <b>The list of my imports is as follows:</b>
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.wcm.repository.ICollection;
    import com.sapportals.wcm.repository.IResource;
    import com.sapportals.wcm.repository.IResourceContext;
    import com.sapportals.wcm.repository.ResourceContext;
    import com.sapportals.wcm.repository.ResourceFactory;
    import com.sapportals.wcm.util.uri.RID;
         <b>I have written the following code:</b>
         IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
         com.sapportals.portal.security.usermanagement.IUser user =
                   (com.sapportals.portal.security.usermanagement.IUser) request.getUser().getUser();
                   <b>/* This is as per KM - Java iView - User Authentication */</b>
         try {
              IResourceContext context = new ResourceContext(user);
              RID rid = RID.getRID("/documents/test");
              ICollection parent = (ICollection) ResourceFactory.getInstance().getResource(rid, context);
              IResource resource = parent.createResource("file", null, null);
               } catch (Exception e1) {
              // problem while retrieving the resource
         <b>I am getting a portal Runtime error. The following is its error log:</b>
    Exception ID:07:49_28/06/05_0002_3055650
    [EXCEPTION]
    #1#com.sapportals.portal.prt.runtime.PortalRuntimeException: PortalRuntimeException
         at com.sapportals.portal.prt.core.PortalRequestManager.handleRequestException(PortalRequestManager.java:921)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:803)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:232)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    <i><b>Caused by: java.lang.NoClassDefFoundError: com/sapportals/wcm/repository/IResourceContext</b></i>
         at com.satyam.dynpage.MyDynpage.getPage(MyDynpage.java:23)
         at com.sapportals.portal.htmlb.page.PageProcessorComponent.getPage(PageProcessorComponent.java:193)
         at com.sapportals.portal.htmlb.page.PageProcessorComponent.doOnNodeReady(PageProcessorComponent.java:62)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:388)
         at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
         at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
         at com.sapportals.portal.prt.pom.AbstractNode.addChildNode(AbstractNode.java:340)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:642)
         ... 21 more
    I don't know why am i getting an exception.
    Please help me in this regard.
    Thanks in advance.
    <b>Regards,
    Sai Krishna.</b>

    You need to put a sharing reference for "com.sap.km.application" in your portalapp.xml. Check out the following portalapp.xml. You can either put
    "com.sap.km.application" or "knowledgemanagement".
    <application>
      <application-config>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb,com.sap.km.application"/>
      </application-config>
      <components>
        <component name="links_tree">
          <component-config>
            <property name="ClassName" value="com.ust.kmtree.display"/>
            <property name="SecurityZone" value="com.ust.kmtree/high_safety"/>
          </component-config>
          <component-profile>
            <property name="path" value="/documents/prakash"/>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
      </components>
      <services/>
    </application>

  • How to Access Custom Attributes created in UME.

    Hi All,
    I have created a custom attribute in UME by using the config tool, the problem that i was facing is i am unable to access those custom attributes via Iuser Api i.e even though i am using the method getAttributeNamespaces() it is returning all the attributes except the custom attributes that i have created in UME.
    Thanks in Advance,
    RV.

    Hi RV,
    Use the user.api jar in your appln.
    follow these steps in your code:
    IWDClientUser wdUser = WDClientUser.getCurrentUser();
    IUser user = wdUser.getSAPUser();
    user.getAttribute("com.sap.security.core.usermanagement", "exact name of the custom attribute");
    if you are still facing the problem paste your code here for analysis.

  • Using X509 certificates to create a client in a JCo destination / pool

    Hi,
    Our administrators have set up JCo destinations for us developers to use in connecting to the SAP R/3 back-end.  We need to use X509 certificates instead of username/password to create a connection.  How is this done?  The JCo API doesn't seem to list any class/method combination that is suitable. 
    JCO.createClient allows me to pass an X509 certificate, but it doesn't allow me to specify what JCO.Pool (i.e., JCo destination) to use. 
    JCO.addClientPool seems to allow both, but I don't think I want to really "add" a pool-- don't I just want to "use" a  pre-existing pool, i.e., one of the JCo destinations our administrator has set up? 
    Do I need to create a Client using the X509 certificate and somehow add this Client to the JCO.Pool?  I thought JCo destinations were meant to be pre-established Client pools waiting for a Client to be plucked out of it and used.  Is that wrong?  What am I missing? 
    Thanks in advance for your responses.

    Hi,
    I'm note sure whether you can use prepared JCo destinations in this case. However, if it's possible to use single JCo clients you instantiate when you need them, you have different options depending on whether you have an Enterprise Portal installed on top of your J2EE Engine or not.
    --> Without Portal
    Retrieve the user's current certificate from UME using:
    [code]com.sap.security.api.IUser currentUser = ...;
    java.security.cert.X509Certificate[] certificates = currentUser.getUserAccounts()[0].getCertificates();
    byte[] certBytes = certs[0].getEncoded();
    String encodedCert = someBase64Method(certBytes);
    Properties jcoProperties = new Properties();
    // Add your backend properties like hostname and so on...
    jcoProperties.setProperty("jco.client.user", "$X509CERT$");
    jcoProperties.setProperty("jco.client.passwd", x509Cert);
    JCO.Client jcoClient = JCO.createClient(jcoProperties);[/code]
    --> With Portal installed
    In general: Define your backend system in the Portal's system landscape instead of as JCo destination. Configure it's logonmethod for X.509 certificates. Either use UME's user mapping feature directly via com.sap.security.api.UMFactory.getUserMapping()... to add the certificate properties to the JCO properties, or use some intermediate API, some of which are available in the portal, some of which reside in the J2EE Engine (details if you request them).
    Best regards
    Heiko

  • Can I create enterprise aliases disabled by default?

    On another thread I asked How do I create and new enterprise alias?
    I was directed to the following SAP Note...
    http://service.sap.com/sap/support/notes/1804839
    I was able get things working and create enterprise aliases for all of my Windows AD users that don't already have one.  The reason I am doing this is so that when they get removed from the active directory group and subsequently BusinessObjects their corresponding inbox, personal folder and any schedules they may have created do not get removed.
    So my question is this.  Is there any way to create an enterprise alias disabled by default?  Here is the code snippet downloaded from the aforementioned note.
    I would like to add a line after user.setNewPassword (line #91) that says something like this...
    user.setEnabled(false);
    However, that isn't working.  The method setEnabled is not recogized.  I did check the documentation for IUser and cannot find any method to disable an enterprise user.  Does such a method exist?
    Thanks,
    Noel

    You can't do this directly on the IUser object - it has to be done on an IUserAlias object.  So, your code might look something like this:
    IUserAliases uAliases = user.getAliases();
    for (Object aobj : uAliases){
        IUserAlias alias = (IUserAlias) aobj;
        if (alias.getType() == IUserAlias.ENTERPRISE){
            alias.setDisabled(disable);
    -Dell

  • How to assign the role for created user  thru dynpro App

    Hi All
    How to assign the role for currently created user from Webdynpro App.
    when i enter into the portal after creating the user
    i am getting the following messgae in the portal
    "No portal roles are assigned for this user.If this problem persists, contact your system administrator."
    how to assign the user defined role for the created user from dynpro App
    Regards
    Dhina  Kar J
    Edited by: Dhinakaran Jeyachandran on Feb 1, 2008 12:19 PM
    Edited by: Dhinakaran Jeyachandran on Feb 1, 2008 12:35 PM

    In the User Administration section of your portal find your newly created user and below select "Assigned Roles" tab then press <Modify> button and look through available roles on portal then just simply add and save. But if you want to do it programmatically see below:
    IUserAcountFactory userFactory = UMFactory.getUserAccountFactory();
    // IUser - read only but with IUserAccount is possible to set up user data
    IUserAccountSearchFilter userFilter = userFactory.getUserAccountSearchFilter();
    userFilter.setLogonUid("superuser", ISearchAttribute.LIKE_OPERATOR, false);
    ISearchResult sr = userFactory.search(userFilter);
    for (final Iterator i = new PrincipalIterator(sr); i.hasNext();) {
      IUserAccount user = (IUserAccount) i.next();
    Execute the same search for IRole (or IGroup if needed) get the unique id of them and use newRole(...) and addUserToRole(...) methods from IRoleFactory.
    Of course you don't need search for this principals if you know uniqueness of them. Use appropriate factories to get'em all by this unique id.
    All the features see in  [javadocs|http://help.sap.com/javadocs/NW04S/current/se/index.html]

  • Create Collection  with a defined layout (thumbnail)- KM API

    Hi, I have developed a code that create a folder (collection) in KM using de the API. But I have the problem, that the folder have to be set with thumbnail layout. Have anyone any idea of how to do that?. Thanks

    Hi Martin,
        I wrote this code to set a layout set in a folder:
    configurarLayout receive as parameter a folder an a user. The idea is for this user and folder set a layout set profile "Managers_NewsBrowser_Profile".
    Don't forget to create this profile, for it you only need to configure from portal.
    private void configurarLayout(ICollection articulos, IUser user) throws WcmException {
            IUriMapperService pepe = null;
            ILayoutService layoutService;
            layoutService = (ILayoutService) ResourceFactory.getInstance().getServiceFactory().getRepositoryService(articulos, IWcmConst.LAYOUT_SERVICE);
            pepe = UriMapperServiceFactory.getInstance();
            String user1 = pepe.getConstantID(articulos.getRID());
            ILayoutContext context = layoutService.getContextForUser(user, user1);
            logger.errorT("UserID " + context.getCommonContext().getUserID());
            IProfileIterator iProfileIterator = layoutService.getProfiles().iterator();
            IProfile profilePosta = null;
            while (iProfileIterator.hasNext() && profilePosta == null) {
                IProfile element = iProfileIterator.next();
                if (element.getName().equalsIgnoreCase("Managers_NewsBrowser_Profile")) {
                    profilePosta = element;
            boolean resultado = false;
            resultado = layoutService.saveProfile(articulos, profilePosta, context.getCommonContext());
            if (resultado = false)
                logger.errorT("Grabacion erronea");
    Patricio.

  • Company Name in Create user

    HI
       We have the following 2 methods isCompanyUser(),getCompany() in IUser class. But I didn't see those input fields in Create user screen.
      Another question , Is it possible to add additional fields in Createuser screen. I suppose for this we have to create our own tables to store additional variables.
    Regards
    Ganesan S

    The companies will only appear if you have them setup in the UME properties. Check out ume.tpd.companies. You also need to activate ume.admin.selfreg.company if you want self registering users to be able to select a company.

  • How create the link in webdynpro java???

    Hi Experts,
    i want to create a webdynpro application where i need to create a link, on action that link it should call the another url.
      On action URL i will call the KM documents..
    Can anyone tell me how to achieve that ??
    Regards,
    Mahesh

                                In below code using display image from KM via WDJ      String path="";   IPrivateKmUploadCompView.IKM_uploadElement ele=null;  ele=wdContext.nodeKM_upload().createAndAddKM_uploadElement(); path="/documents/KMimage.jpg"; IUser sapUser = wdClientUser.getSAPUser(); com.sapportals.portal.security.usermanagement.IUser ep5User = WPUMFactory.getUserFactory().getEP5User(sapUser); //Getting the Resource......... IResourceContext resourseContext = new ResourceContext(ep5User); IResourceFactory resourseFactory = ResourceFactory.getInstance(); RID pathRIDimg = RID.getRID(path); com.sapportals.wcm.repository.IResource resourceimg = resourseFactory.getResource(pathRIDimg, resourseContext); //Reading the image file...... BufferedInputStream bufIn = new BufferedInputStream(resourceimg.getContent().getInputStream()); IWDCachedWebResource cachedWebResource = null;   cachedWebResource = WDWebResource.getWebResource(bufIn, WDWebResourceType.JPG_IMAGE);  cachedWebResource.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal()) ;                                                  //sent image to resource context    wdContext.currentContextElement().setDownload(cachedWebResource);

  • Unable to Open BEx file created using NWBC client

    Hi,
    I am working on EhP3 & NWBC Client.
    I tried to export an ALV report to "BEx Analyzer" using the option "Export -> BEx Analyzer".
    If I select the option "Open" in the subsequent pop-up, it just opens an Excel window and nothing appears after that. Not even a workbook gets created.
    If I select to save and then open the saved ".bex" file, an excel window opens up. But immediately I get the "Microsoft Visual Basic Error" stating "Run-Time error: '91': Object variable or With block variable not set".
    If I choose "debug" option, visual basic code window appears. I get to the following line there.
    Public Function LogOn(Optional iUser As String = "", Optional iSystemId As String = "", Optional iServer As String = "", Optional iSysNo As Long = 0, Optional iClient As String = "", Optional iLanguage As String = "", Optional iSNCName As String = "", Optional iSNCQuality As String = "", Optional iTicket As String = "") As Boolean
      LogOn = pAddin.ExcelInterface.LogOn(iUser:=iUser, iSystemId:=iSystemId, iServer:=iServer, iSysNo:=iSysNo, iLanguage:=iLanguage, iClient:=iClient, iSNCName:=iSNCName, iSNCQuality:=iSNCQuality, iTicket:=iTicket)
    End Function
    I believe "pAddin" object is not getting initialized and hence the error.
    Is anyone having any idea why this problem is happening?
    How do I fix this?
    Regards,
    Ram.

    Finally got the solution.
    I have put the following patches, it worked.
    Bi front end patch bi710_2-10004472.exe and bi710sp02p_201-10004472.exe.
    (I didnt try the latest patch - which is 10)
    And also install Microsoft Office Patch KB907417.
    The icon becomes clickable and you get proper menu options after that.
    Please refer to the following sdn post.
    SAPGUI 7.10 Bex Analyzer issue
    Regards,
    Ram.
    Edited by: Ram Bilas Yadav on Oct 20, 2009 9:41 PM
    Edited by: Ram Bilas Yadav on Oct 20, 2009 9:42 PM

  • Create Dynpro to change the UME password

    Hi experts,
    I need to create a webdynpro with the following steps:
    - View to login (two textinput with one button, the first textinput to put the username, the second textinput to put the pass, and the button to execute the login ). (This part it's clear)
    The problem is in this part:
    - The next view is to change the actual password, I will have three textinput ( first to put the actual password and the others to put the new password), the problem is I don't have idea how to do to it
    Any idea?
    Thanks in advance,
    Jose Manuel

    Hi,
    With your code I had a mutable exception, I've solve the problem with this code
    try{
    IUserFactory userfact = UMFactory.getUserFactory();
    //get user id of the user to change the password
    String userId = wdContext.currentLicenceUsersOutputVNElement().getUserid();
    //get user object
    IUser specifiedUser = userfact.getUserByLogonID(userId);
    //get user maintance object
    IUserMaint userMaint = userfact.getMutableUser(specifiedUser.getUniqueID());
    //get user account
    IUserAccount uacc = UMFactory.getUserAccountFactory().getUserAccountByLogonId(userId);
    //create mutable user account
    IUserAccount iuacc = UMFactory.getUserAccountFactory().getMutableUserAccount(uacc.getUniqueID());
    iuacc.setPassword(wdContext.currentContextElement().getNewPassword());
    iuacc.save();
    iuacc.commit();
    manager.reportSuccess("Password has been reset.");
    catch (Exception e)
    manager.reportException("error occured " + e , false);
    e.printStackTrace();
    thanks for you colaboration

Maybe you are looking for

  • How far does the visual code generation go.

    Hi, I am new to Dreamweaver. However I have got so far that I can set up a site, create connection to my remote webserver and MySQL database and made my page display a value fetched from the database in a textbox, all created visually. But - if I now

  • Help! How do I delete these unwanted photos?!

    I just updated my iPhone to the OS 5.1. When I connected my iPhone to my laptop, it automatically synced a bunch of photos to my iPhone that I didn't want on there. How do I delete them??? My phone wasn't backed up prior to the sync. I've tried every

  • Suggestions for JSF table with sortale columns and Pagination

    Hi, My JSF application needs a table with sortable columns and also pagination. Thank you.

  • Are Trackpads/Touchpads just a gimmick?

    I've been aware of touchpads/trackpads for several years and have restrained a desire to purchase one. Last month I succumbed when I saw the Logitech model selling for £24 (new) compared with Apple's for £59. My first impression was how great it was

  • Resource Kit for Windows 7

    Hi, I am looking for Windows Resource Kit for Windows 7 but what I have found on the internet is only for Windows 2003? Is there any tool for win7? Because I am looking for setprinter.exe and they say that this tool is only available on Resource Kit