Cfldap to get 2 level of subordinates list from active directory

<CFLDAP SERVER="ldap.com" PORT="333" START="O=COM,C=AN" SCOPE="SUBTREE"
NAME="qryLevel1" ACTION="QUERY" ATTRIBUTES="cn, uid, alias"
FILTER="(&(manager=cn=TestName,ou=employee,o=COM,c=an)(objectclass=olPerson))" MAXROWS="999999" TIMEOUT="90000">
By using the above code, I am able to get subordinates for User(TestName), But I need the list of subordinate of all the subordinates also without loop please as it is taking long time to execute.
please assist me on this??

Create a "global catalog" on the 2nd domain contoller, will fix this problem. 
To create a new global catalog:
On the domain controller where you want the new global catalog, start the Active Directory Sites and Services snap-in. To start the snap-in, click Start , point to Programs , point to Administrative Tools , and then click Active Directory Sites and Services .
In the console tree, double-click Sites , and then double-click <var>sitename</var> .
Double-click Servers , click your domain controller, right-click NTDS Settings , and then click Properties .
On the General tab, click to select the Global catalog check box to assign the role of global catalog to this server.
Restart the domain controller.

Similar Messages

  • Getting a user's primary group from Active Directory

    I'm coding a java web app that should authenticate a user to Active Directory and return his primary group.
    Using JNDI apis I realized the first part (authentication) and functions well but still having problems with the second part (getting the user's primary group).
    Is there somebody who knows/gets some codes for getting this info from Active Directory using java?
    Thanks a lot.
    Regards.
    John.

    I'm coding a java web app that should authenticate a user to Active Directory and return his primary group.
    Using JNDI apis I realized the first part (authentication) and functions well but still having problems with the second part (getting the user's primary group).
    Is there somebody who knows/gets some codes for getting this info from Active Directory using java?
    Thanks a lot.
    Regards.
    John.

  • Getting list of all users and their group memberships from Active Directory

    Hi,
    I want to retrieve a list of all the users and their group memberships through JNDI from Active Directory. I am using the following code to achieve this:
    ==================
    import javax.naming.*;
    import java.util.Hashtable;
    import javax.naming.directory.*;
    public class GetUsersGroups{
         public static void main(String[] args){
              String[] attributeNames = {"memberOf"};
              //create an initial directory context
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://172.19.1.32:389/");
              env.put(Context.SECURITY_AUTHENTICATION, "simple");
              env.put(Context.SECURITY_PRINCIPAL, "[email protected]");
              env.put(Context.SECURITY_CREDENTIALS, "p8admin");
              try {
                   // Create the initial directory context
                   DirContext ctx = new InitialDirContext(env);     
                   //get all the users list and their group memberships
                   NamingEnumeration contentsEnum = ctx.list("CN=Users,DC=filenetp8,DC=com");
                   while (contentsEnum.hasMore()){
                        NameClassPair ncp = (NameClassPair) contentsEnum.next();
                        String userName = ncp.getName();
                        System.out.println("User: "+userName);
                        try{
                             System.out.println("am here....1");
                             Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should be returned
                             System.out.println("am here....2");
                             Attribute groupsAttribute = attrs.get(attributeNames[0]); // memberOf
                             System.out.println("-----"+groupsAttribute.size());
                             if (groupsAttribute != null){
                                  // memberOf is a multi valued attribute
                                  for (int i=0; i<groupsAttribute.size(); i++){
                                  // print out each group that user belongs to
                                  System.out.println("MemberOf: "+groupsAttribute.get(i));
                        }catch(NamingException ne){
                        // ignore for now
                   System.err.println("Problem encountered....0000:" + ne);
                   //get all the groups list
              } catch (NamingException e) {
              System.err.println("Problem encountered 1111:" + e);
    =================
    The following exception gets thrown at every user entry:
    User: CN=Administrator
    am here....1
    Problem encountered....0000:javax.naming.NamingException: [LDAP: error code 1 -
    000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
    ]; remaining name 'CN=Administrator'
    I think it gets thrown at this line in the code:
    Attributes attrs = ctx.getAttributes(userName, attributeNames);
    Any idea how to overcome this and where am I wrong?
    Thanks in advance,
    Regards.

    In this sentence:
    Attributes attrs = ctx.getAttributes(userName, attributeNames); // only asked for one attribute so only one should
    It seems Ok when I add "CN=Users,DC=filenetp8,DC=com" after userName, just as
    userName + ",CN=Users,DC=filenetp8,DC=com"
    But I still have some problem with it.
    Hope it will be useful for you.

  • How do I get info from Active Directory and use it in my web-applications?

    I borrowed a nice piece of code for JNDI hits against Active Directory from this website: http://www.sbfsbo.com/mike/JndiTutorial/
    I have altered it and am trying to use it to retrieve info from our Active Directory Server.
    I altered it to point to my domain, and I want to retrieve a person's full name(CN), e-mail address and their work location.
    I've looked at lots of examples, I've tried lots of things, but I'm really missing something. I'm new to Java, new to JNDI, new to LDAP, new to AD and new to Tomcat. Any help would be so appreciated.
    Thanks,
    To show you the code, and the error message, I've changed the actual names I used for connection.
    What am I not coding right? I get an error message like this:
    javax.naming.NameNotFoundException[LDAP error code 32 - 0000208D: nameErr DSID:03101c9 problem 2001 (no Object), data 0,best match of DC=mycomp, DC=isd, remaining name dc=mycomp, dc=isd
    [code]
    import java.util.Hashtable;
    import java.util.Enumeration;
    import javax.naming.*;
    import javax.naming.directory.*;
    public class JNDISearch2 {
    // initial context implementation
    public static String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory";
    public static String MY_HOST = "ldap://99.999.9.9:389/dc=mycomp,dc=isd";
    public static String MGR_DN = "CN=connectionID,OU=CO,dc=mycomp,dc=isd";
    public static String MGR_PW = "connectionPassword";
    public static String MY_SEARCHBASE = "dc=mycomp,dc=isd";
    public static String MY_FILTER =
    "(&(objectClass=user)(sAMAccountName=usersignonname))";
    // Specify which attributes we are looking for
    public static String MY_ATTRS[] =
    { "cn", "telephoneNumber", "postalAddress", "mail" };
    public static void main(String args[]) {
    try { //----------------------------------------------------------        
    // Binding
    // Hashtable for environmental information
    Hashtable env = new Hashtable();
    // Specify which class to use for our JNDI Provider
    env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
    // Specify the host and port to use for directory service
    env.put(Context.PROVIDER_URL, MY_HOST);
    // Security Information
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, MGR_DN);
    env.put(Context.SECURITY_CREDENTIALS, MGR_PW);
    // Get a reference toa directory context
    DirContext ctx = new InitialDirContext(env);
    // Begin search
    // Specify the scope of the search
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    // Perform the actual search
    // We give it a searchbase, a filter and the constraints
    // containing the scope of the search
    NamingEnumeration results = ctx.search(MY_SEARCHBASE, MY_FILTER, constraints);
    // Now step through the search results
    while (results != null && results.hasMore()) {
    SearchResult sr = (SearchResult) results.next();
    String dn = sr.getName() + ", " + MY_SEARCHBASE;
    System.out.println("Distinguished Name is " + dn);
    // Code for displaying attribute list
    Attributes ar = ctx.getAttributes(dn, MY_ATTRS);
    if (ar == null)
    // Has no attributes
    System.out.println("Entry " + dn);
    System.out.println(" has none of the specified attributes\n");
    else // Has some attributes
    // Determine the attributes in this record.
    for (int i = 0; i < MY_ATTRS.length; i++) {
    Attribute attr = ar.get(MY_ATTRS);
    if (attr != null) {
    System.out.println(MY_ATTRS[i] + ":");
    // Gather all values for the specified attribute.
    for (Enumeration vals = attr.getAll(); vals.hasMoreElements();) {
    System.out.println("\t" + vals.nextElement());
    // System.out.println ("\n");
    // End search
    } // end try
    catch (Exception e) {
    e.printStackTrace();
    System.exit(1);
    My JNDIRealm in Tomcat which actually does the initial authentication looks like this:(again, for security purposes, I've changed the access names and passwords, etc.)
    <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
    connectionURL="ldap://99.999.9.9:389"
    connectionName="CN=connectionId,OU=CO,dc=mycomp,dc=isd"
    connectionPassword="connectionPassword"
    referrals="follow"
    userBase="dc=mycomp,dc=isd"
    userSearch="(&(sAMAccountName={0})(objectClass=user))"
    userSubtree="true"
    roleBase="dc=mycomp, dc=isd"
    roleSearch="(uniqueMember={0})"
    rolename="cn"
    />
    I'd be so grateful for any help.
    Any suggestions about using the data from Active directory in web-application.
    Thanks.
    R.Vaughn

    By this time you probably have already solved this, but I think the problem is that the Search Base is relative to the attachment point specified with the PROVIDER_URL. Since you already specified "DC=mycomp,DC=isd" in that location, you merely want to set the search base to "". The error message is trying to tell you that it could only find half of the "DC=mycomp, DC=isd, DC=mycomp, DC=isd" that you specified for the search base.
    Hope that helps someone.
    Ken Gartner
    Quadrasis, Inc (We Unify Security, www -dot- quadrasis -dot- com)

  • Help!  Example to list users Active Directory

    Hello, I�m totaly new to jndi. I need to obtain the list of users from Active Directory. Can anyone point me to an example or tutorial?
    Thanx
    Javier

    After alot of trial and error I think I got this example to work. I got the example somewhere in this forum but I don�t remember from who, so if you think it�s your code, thanks. I hope it is usefull for anyone else....
    <code>
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.naming.directory.*;
    import javax.naming.ldap.*;
    import javax.naming.*;
    import java.util.Hashtable;
    import java.util.Enumeration;
    public class JndiTest
         public static void main(String[] args)
              System.out.println("Starting...");
              Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
              env.put(Context.PROVIDER_URL, "ldap://10.20.223.129:389/");
              env.put(Context.SECURITY_AUTHENTICATION, "simple");
              env.put(Context.SECURITY_PRINCIPAL, "[email protected]");
              env.put(Context.SECURITY_CREDENTIALS, "digitel412");
              try
                   DirContext ctx = new InitialDirContext(env);
                   SearchControls ctls = new SearchControls();
                   ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   String[] attrs = { "cn", "telephoneNumber", "sn", "userPrincipalName","memberOf","name" };
                   ctls.setReturningAttributes(attrs);
                   String filter = "(objectClass=organizationalPerson)";
                   NamingEnumeration answer = ctx.search("CN=Users,DC=digiteltest,DC=com,DC=xx", filter, ctls);
                   while (answer.hasMoreElements())
                        //NameClassPair nc = (NameClassPair)answer.next();
                        //System.out.println(nc);
                        SearchResult si = (SearchResult) answer.next();
                        Attributes attribs = si.getAttributes();
                        if (attribs == null)
                             System.out.println("No attributes");
                        else
                             for (NamingEnumeration ae = attribs.getAll(); ae.hasMoreElements();)
                                  Attribute attr = (Attribute) ae.next();
                                  String attrId = attr.getID();
                                  for (Enumeration vals = attr.getAll(); vals.hasMoreElements(); System.out.println(attrId + ": " + vals.nextElement()));
                        System.out.println("======================================================================================");
                   ctx.close();
              catch (Exception e)
                   e.printStackTrace();
              System.out.println("Finished.");
    </code>

  • Unable to find user list in Active Directory Authenticator

    Hi all,
    I am using weblogic 10.3 and want to configure ActiveDirectory Authenticator for my weblogic application. We have one managed srever under admin server . I have configured a Active Directory Authenticator named "ADAuthenticator" and made following changes as per the below values:
    I set the control flag to "OPTIONAL" .
    Security Realms-->myrealm-->Providers-->ADAuthenticator-->Provider Specific
    UserName Attribute : ServiceBEA
    Principal : ServiceBEA
    Host : xxxxxx
    User Search Scope : subtree
    Group From Name Filter : (&(ServiceBEA=%g)(objectclass=group))
    Credential : xxxxxx
    Confirm Credential : xxxxxx
    User From Name Filter : (&(ServiceBEA=%u)(objectclass=user))
    Static Group Name Attribute : ServiceBEA
    User Base DN : values provided as per requirement
    Port : 389
    User Object Class : user
    Use Retrieved User Name as Principal : checked
    Group Base DN : same values as per User Base DN
    Static Group Object Class : group
    Group Membership Searching : unlimited
    Max Group Membership Search Level : 0
    These are my AD settings. After doing this i click on save and then activate changes and then restarted the admin server.
    But the problem is when i login to weblogic console to check the user list under "User and Group" i am unble to find any Active Directory users.
    I don't know where i made the mistake. Can some make me out of this trouble.
    Any help is highly appreciated.
    Thanks in advance !

    Hi Sean,
    Actually we have already a Active Directory with username "ServiceBEA" in our windows server. So i used this "ServiceBEA" as UserName Attribute in weblogic console while creating a Active Directory Authenticator.
    You mean to say that we should go for "sAMAccountName" or what? If that is the case then i have also tested with following values, but still no luck.
    UserName Attribute : sAMAccountName
    Principal : ServiceBEA
    Host : xxxxxx
    User Search Scope : subtree
    Group From Name Filter : (&(sAMAccountName=%g)(objectclass=group))
    Credential : xxxxxx
    Confirm Credential : xxxxxx
    User From Name Filter : (&(sAMAccountName=%u)(objectclass=user))
    Static Group Name Attribute : sAMAccountName
    User Base DN : values provided as per requirement
    Port : 389
    User Object Class : user
    Use Retrieved User Name as Principal : checked
    Group Base DN : same values as per User Base DN
    Static Group Object Class : group
    Group Membership Searching : unlimited
    Max Group Membership Search Level : 0
    Please advise what to be place in case of User Name Attribute.
    Any help is highly appreciated.
    Thanks in advance !

  • How to get Primary Group details of a user from Active Directory

    Hi ,
    This is Viswanath. I want to know how can we retrieve the primary group of a user (Active Directory). I have searhed the entire forum but could not get the required information.
    The reference link is which i have searched is : http://forum.java.sun.com/thread.jspa?threadID=581444
    I got a sample .NET project where we can retrieve the primary group information :
    refer to the link : http://dunnry.com/blog/DeterminingYourPrimaryGroupInActiveDirectoryUsingNET.aspx
    you can download the sample project and build that in VS.NET 2003 and see the result. Please let me know if this kind of implementation is possible in java.
    Kindly help me as i have to provide a solution to my client.
    Regards,
    Viswanath.
    Edited by: sriganesh on Jun 22, 2008 10:36 AM
    can anybody please share their thoughts on the above

    To connect to the Active Directory you can do something like this:
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import javax.naming.directory.DirContext;
    import javax.naming.directory.InitialDirContext;
    public class AD
    public static void main(String[] args)
    Hashtable environment = new Hashtable();
    //Just change your user here
    String myUser = "myUser";
    //Just change your user password here
    String myPassword = "myUser";
    //Just change your domain name here
    String myDomain = "myDomain";
    //Host name or IP
    String myActiveDirectoryServer = "192.168.0.20";
    environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    environment.put(Context.PROVIDER_URL, "ldap://" + myActiveDirectoryServer + ":389");
    environment.put(Context.SECURITY_AUTHENTICATION, "simple");
    environment.put(Context.SECURITY_PRINCIPAL, "CN=" + myUser + ",CN=Users,DC=" + myDomain + ",DC=COM");
    environment.put(Context.SECURITY_CREDENTIALS, myPassword);
    try
    DirContext context = new InitialDirContext(environment);
    System.out.println("Exit!!");
    catch (NamingException e)
    e.printStackTrace();
    Reddy Pathepuram
    Inteligic Inc

  • Which domain and forest functional level is supportted for the "Active Directory Resource Pool Synchronization"?

    Hi all,
    I'd like to confirm which Domain/Forest functional levels of Active Directory is supported for "Active Directory Resource Pool Synchronization" in Project Server 2013.
    I guess that 2003 or later is supported, but my customer required reliable sources.
    I googled and searched article at TechNet, but I couldn't find.
    Could anyone inform me the article about that?
    Thank you in advance.
    Kaori.

    Hi Michael and all,
    Anyway I solved this issue.
    I couldn't find article that I desired, so I asked advice to my colleagues and they told that the functional level 2003 or later are supported in their experience.
    In addition, I found these articles about SharePoint sync limitations.
    Members of the domain local group cannot view a Microsoft Office SharePoint Server 2007 Web site
    http://support.microsoft.com/kb/932378/en-us
    SharePoint supportability of Read only Domain controllers
    http://support.microsoft.com/kb/970612

  • How can i get safari to sync reading list from my home mac and my work pc?

    im using windows 7 on my pc at work and snow leopard on my mac pro at home. can i do this?

    nevermind. silly me.

  • Get all users from Active Directory

    Dear All,
    I would like to retreive all USERS from the AD.
    I finaly could connect to an AD server but I couldn't perform the search.
    I got a javax.naming.NamingException: [LDAP: error code 1 - 000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
    --> Does it mean that my query is incorect.
    I think I am missing something obvious. but what?
    Can somebody please help me or point me to some working code sample.
    Thanks in advance.
    Karim.
    //======== Test Code =============
            String THIS_INIT_CONT_FAC="com.sun.jndi.ldap.LdapCtxFactory";
            String THIS_PROV_URL=url;
            String THIS_SEC_AUTH="simple";
            String THIS_SEARCHBASE="CN=Users, CN=domain, CN=com";
            String THIS_ATTRS[] = {"mail"};
    try {
    String THIS_FILTER="(objectClass=user)";
    System.out.println("Testing LDAP Program");
    System.out.println("************************************************************");
    String THIS_SEC_PRIN="";
    String THIS_SEC_CRED="";
    System.out.println("Cont Fac : " + THIS_INIT_CONT_FAC);
    System.out.println("LDAP Server : " + THIS_PROV_URL);
    System.out.println("Auth Method : " + THIS_SEC_AUTH);
    System.out.println("Search Base : " + THIS_SEARCHBASE);
    System.out.println("Filter : " + THIS_FILTER);
    System.out.println("Login : " + THIS_SEC_PRIN);
    System.out.println("Credentials : " + THIS_SEC_CRED);
    System.out.println("************************************************************");
    Hashtable env=new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, THIS_INIT_CONT_FAC);
    env.put(Context.PROVIDER_URL, THIS_PROV_URL);
    env.put(Context.SECURITY_AUTHENTICATION, THIS_SEC_AUTH);
    env.put(Context.SECURITY_PRINCIPAL, THIS_SEC_PRIN);
    env.put(Context.SECURITY_CREDENTIALS, THIS_SEC_CRED);
    DirContext ctx = new InitialDirContext(env);
    System.out.println("LDAP TEST Login Successful!");
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    NamingEnumeration results = ctx.search(THIS_SEARCHBASE,THIS_FILTER, constraints);
    int namecount=0;
    System.out.println("LDAP TEST Results : " + results);
    System.out.println("LDAP TEST Pre-Hit ! ");
    } catch(AuthenticationException ae) {
    ae.printStackTrace();
    System.out.println("Incorrect Password or UserName");
    return false;
    } catch(Exception e) {
    e.printStackTrace();
    System.out.println("Error accessing LDAP");
    return false;
    // ============ OUTPUT =====================
    Testing LDAP Program
    Cont Fac : com.sun.jndi.ldap.LdapCtxFactory
    LDAP Server : ldap://192.168.2.3:389/
    Auth Method : simple
    Search Base : CN=Users, CN=domain, CN=com
    Filter : (objectClass=user)
    Login :
    Credentials :
    LDAP TEST Login Successful!
    javax.naming.NamingException: [LDAP: error code 1 - 000020D6: SvcErr: DSID-03100690, problem 5012 (DIR_ERROR), data 0
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    If you want to list all the users then you don't need to perform a search. Just list them.
       private void list(String contextName)
          try
             // get enumeration of NameValuePairs
                NamingEnumeration contentsEnum = ctx.list(contextName);
             while (contentsEnum.hasMore())
                System.out.println(contentsEnum.next());
          catch (NamingException e)
             System.err.println("Problem listing context contents: " + e);
       }You will want to call this using something like this:
    list("CN=Users, CN=domain, CN=com");One caveat, there is a restriction on the number of results returned so this will still throw an LDAP exception if you have a lot of users.
    Not sure how to get around that. Never needed to look. Don't expect it is hard though.

  • SIMPLE : Making a list from a directory

    Hello, I can't find this on my computer. I have a script that shows all files of the front directory. I need this script but also need the list in text editor
    It(the script) should also watch inside the folder for all files in all subfolders. So I get a list in text editor that i can print. Someone who can help me with this?
    Now i get a menu but I just need to print the list of all files.
    Thanks in advance.
    tell application "Finder"
    set allFiles to the name of every file in the front window
    end tell
    choose from list allFiles

    Hello
    You may try something like the code below.
    It will let you choose the source folder and write list to a file named 'files.txt' in your current destkop.
    --SCRIPT
    set srcdir to POSIX path of (choose folder)
    set outfile to POSIX path of (path to desktop from user domain) & "files.txt"
    set sh to "ls -R " & quoted form of srcdir & " > " & quoted form of outfile
    do shell script sh
    --END OF SCRIPT
    cf.
    http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/ls.1.htm l
    Hope this may help,
    H
    Message was edited by: Hiroto (fixed code)

  • Cannot get Unity 8.0 to syncronize with Active Directory

    Hi All,
       any help/advice will be greatly appreciated here.  Pulling my hair out on this one.  So we installed our CUC 8.0.2 a few years ago.  At the time, CUC was setup to sync with LDAP, our windows AD.  Filters were defined, etc.  All has been fine until recently.  Unfortunately I cannot define recent - not sure when this started.  I normally don't deal with CUC, but I am now.  Basically we either modify or add users in AD and they are not showing up in CUC->users.  I actually have 1 user where this person took over for another and in CUC/users half their info is the last user and half is the new user.  Weird stuff.
    I don't know what the issue is.  To my knowledge nothing has changed either in CUC or AD.  I attempted a wireshark sniff only to find out that infact LDAP queries were successful from my unity server to domain controller. 
    I then turned on dirsync on one of the unity servers, looked at the logs using the RTMT and specifically dealing with the user above, I see that unity successfully queries AD and AD cleary responds with the user attributes.  But even in the log it states that nothing has changed with the user.  I went a head and changed some of the attributes on the user that are mandatory in our CUC setup, performed another sync, and still no change. 
    I have 3 domain controllers, 2 unity servers (sub and pri).  No matter which unity server I attempt the sync from or which domain controller I list as #1 on the list in the CUC setup, no changes are made.  This is really frustrating.  I have 1 windows 2008 R2 DC and 2 windows 2003 DC's (at present time) each is also a GC.
    I rebooted both unity servers (utils system restart) waited a while after the first server rebooted came back online before I did the second.  Still no change.
    Can anyone suggest where I can look to find the answer as to what is going on?
    thank you in advance for any ideas.

    Renaming a Cisco Unity 8.x Server or  Moving a Cisco Unity 8.x Server to Another Domain
    http://www.cisco.com/en/US/docs/voice_ip_comm/unity/8x/upgrade/guide/8xcurug080.html
    HTH
    java
    if this helps, please rate
    www.cisco.com/go/pdihelpdesk

  • Multi level where used list (cs_where_use_mat)

    How to get Multi level where use list of a component?
    CS_WHERE_USE_MAT has details of a material. but i need to dig where use list for all materials of that component.  CS15 does not give compleate details(only few fields are there)

    Check the below program :
    REPORT ZPPR_BOM_INFOL_REPORT no standard page heading
                     line-size 160
                     line-count 60.
    ======================================================================
    Program Name : ZPPR_BOM_INFOL_REPORT
    Table definition                                                    *
    TABLES: mast,
            stko,
            stpo,
            T418,
            makt.
    TYPE - POOLS
    TYPE-POOLS: slis.
    Constants
    constants : c_tcode(4) type c value 'CS03',
                gc_formname_top_of_page TYPE slis_formname
                VALUE 'TOP_OF_PAGE'.
    Variables
    data : v_maktx like makt-maktx,
           wa_stko like stko.
    DATA:
    Objekttyp 'Material'
       otyp_mat(1) TYPE c VALUE '1',
       ootyp_mat(1) TYPE c VALUE 'M',
    Objekttyp 'kein Objekt'
       otyp_noo(1) TYPE c VALUE '2',
    Objekttyp 'Dokument'
       otyp_doc(1) TYPE c VALUE '3',
    Objekttyp 'Klasse'
       otyp_kla(1) TYPE c VALUE '4',
    Objekttyp 'Intramaterial'
       otyp_ntm(1) TYPE c VALUE '5'.
    maximal anzeigbare Menge
    data:   max_num(7)  TYPE p DECIMALS 3 VALUE '9999999999.999',
            ueberl_kz(1) TYPE c VALUE '*',
            min_num(7)  TYPE p DECIMALS 3 VALUE '9999999999.999-',
            b_flag(1) TYPE c VALUE 'X',
            ecfld(250) TYPE c,
            v_flag type c.
    ALV Variables
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
          gs_layout   TYPE slis_layout_alv,
          gs_keyinfo  TYPE slis_keyinfo_alv,
          gt_sp_group TYPE slis_t_sp_group_alv,
          gt_events   TYPE slis_t_event.
    DATA: g_repid LIKE sy-repid.
    DATA: gt_list_top_of_page TYPE slis_t_listheader,
                g_tabname_header TYPE slis_tabname,
                g_tabname_item   TYPE slis_tabname,
                g_save(1) TYPE c,
                gx_variant LIKE disvariant,
                g_variant LIKE disvariant,
                g_default(1) TYPE c,
                g_exit(1) TYPE c.
    Includes                                                             *
    INCLUDE .
    Internal Table Declaration                                           *
    DATA: t_mast LIKE STANDARD TABLE OF mast WITH HEADER LINE.
    *DATA: t_makt LIKE STANDARD TABLE OF makt WITH HEADER LINE.
    BOM Function module Related
    DATA: t_matcat  LIKE cscmat OCCURS 0 WITH HEADER LINE.
    Internal Table for Level by Level Function module
    DATA: t_stb  LIKE stpox OCCURS 0 WITH HEADER LINE.
    Get the Relevant data from FM
    DATA: BEGIN OF hd_tab OCCURS 0,
             stufe LIKE stpox-stufe,
             vwegx LIKE stpox-vwegx,
          END OF hd_tab.
    Final Output
    DATA: BEGIN OF alv_stb OCCURS 0.
            INCLUDE STRUCTURE stpox_alv.
    DATA:   info(3)   TYPE c,
          END OF alv_stb.
    DATA: BEGIN OF stb_orig.
            INCLUDE STRUCTURE stpox.
    DATA: END OF stb_orig.
    DATA: BEGIN OF stb_add.
            INCLUDE STRUCTURE stpol_add.
    DATA: END OF stb_add.
    Internal Table for STPO
    *-- BOM Line item
    TYPES: BEGIN OF ty_stpo,
           stlty TYPE stpo-stlty,
           stlnr TYPE stpo-stlnr,
           stlkn TYPE stpo-stlkn,
           stpoz TYPE stpo-stpoz,
           idnrk TYPE stpo-idnrk,
           meins TYPE stpo-meins,
           menge TYPE stpo-menge, "Component Qty
           END OF ty_stpo.
    DATA: t_stpo TYPE STANDARD TABLE OF ty_stpo WITH HEADER LINE.
    *-- BOM Header
    TYPES: BEGIN OF ty_stko,
           stlty TYPE stko-stlty,
           stlnr TYPE stko-stlnr,
           stlal TYPE stko-stlal,
           stkoz TYPE stko-stkoz,
           bmein TYPE stko-bmein,
           bmeng TYPE stko-bmeng,
           END OF ty_stko.
    DATA: t_stko TYPE STANDARD TABLE OF ty_stko WITH HEADER LINE .
    data : t_makt like makt occurs 0 with header line.
    DATA: BEGIN OF cl_clstab OCCURS 0,                          "YHG079407
             class LIKE klah-class,                             "YHG079407
             klart LIKE klah-klart,                             "YHG079407
             chked LIKE csdata-xfeld,                           "YHG079407
             noobj LIKE csdata-xfeld,                           "YHG079407
             dsply LIKE csdata-xfeld,                           "YHG079407
          END OF cl_clstab.
    *-- Header table
    TYPES: BEGIN OF ty_main_material,
           matnr TYPE mast-matnr, "Material
           werks TYPE mast-werks, "Plant
           maktx TYPE makt-maktx, "Description
           stlal TYPE mast-stlal, "Alternative BOM
           stlnr TYPE stko-stlnr, "BOM Number
           bmein TYPE stko-bmein, "UOM
           bmeng TYPE stko-bmeng, "Base Qty
           expand(1) TYPE c,      "Expanding Field
           END OF ty_main_material.
    DATA: t_main_material TYPE STANDARD TABLE OF ty_main_material WITH
          HEADER LINE.
    *-- Item (Component) Table
    TYPES: BEGIN OF ty_item_material,
           matnr TYPE mast-matnr, "Material
           werks TYPE mast-werks, "Plant
           idnrk TYPE stpo-idnrk, "Component (Material)
           maktx TYPE makt-maktx, "Description
           stlal TYPE mast-stlal, "Alternative BOM
           stlnr TYPE stpo-stlnr, "BOM Number
           meins TYPE stpo-meins, "UOM
           menge TYPE stpo-menge, "Base Qty
           END OF ty_item_material.
    DATA: t_item_material TYPE STANDARD TABLE OF ty_item_material WITH
          HEADER LINE.
    Selection Screen                                                     *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_werks LIKE marc-werks DEFAULT '1000' OBLIGATORY.
    SELECT-OPTIONS s_stlal FOR mast-stlal .
    SELECT-OPTIONS s_stlan FOR mast-stlan DEFAULT '1'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_bomlst RADIOBUTTON GROUP g1 DEFAULT 'X'.
    SELECT-OPTIONS s_matnr FOR mast-matnr.
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_compon RADIOBUTTON GROUP g1.
    SELECT-OPTIONS: s_idnrk FOR stpo-idnrk.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF BLOCK b1.
    selection-screen begin of block b03 with frame title text-b03.
    selection-screen begin of line.
    selection-screen comment 1(40) text-005.
    parameters: p_all radiobutton group r1 default 'X'.
    selection-screen end of line.
    selection-screen begin of line.
    selection-screen comment 1(40) text-006.
    parameters: p_one radiobutton group r1 .
    selection-screen end of line.
    selection-screen end of block b03.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS: p_vari LIKE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK b3.
    At slection screen events                                            *
    *-- Process on value request
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_vari.
      PERFORM f4_for_variant.
    Intitialisation
    INITIALIZATION.
      g_repid = sy-repid.
      g_tabname_header = 'T_MAIN_MATERIAL'.
      g_tabname_item   = 'T_ITEM_MATERIAL'.
    *-- define keyinformation
      CLEAR gs_keyinfo.
      gs_keyinfo-header01 = 'MATNR'.
      gs_keyinfo-item01   = 'MATNR'.
      PERFORM e03_eventtab_build USING gt_events[].
      PERFORM e04_comment_build  USING gt_list_top_of_page[].
      PERFORM e07_sp_group_build USING gt_sp_group[].
      PERFORM e08_layout_build   USING gs_layout.
    Set Options: save variants userspecific or general
      g_save = 'A'.
      PERFORM variant_init.
    Get default variant
      gx_variant = g_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save     = g_save
           CHANGING
                cs_variant = gx_variant
           EXCEPTIONS
                not_found  = 2.
      IF sy-subrc = 0.
        p_vari = gx_variant-variant.
      ENDIF.
    S T A R T - O F - S E L E C T I O N *******************
    start-of-selection.
      if p_all = 'X'.
    Get the data from MAST and MAKT Table
        if p_bomlst = 'X'.
      Get the data Based On Material #
          perform get_data.
        else.
      Get the data Based On Component
          perform get_data_component.
        endif.
      else.
    Get the Single Level Report
    *-- Moved the fiedl catalog here inorder to change the layout based on
    *-- Selection
        PERFORM e01_fieldcat_init  USING gt_fieldcat[].
        PERFORM select_data.
      endif.
    E N D - O F - S  E  L  E  C  T  I  O  N *******************
    end-of-selection.
      if p_one = 'X'.
        perform alv.
      endif.
    User Command
    at line-selection.
    Interactive to CS03 Transaction
      case sy-ucomm.
        when 'PICK' or 'F2'.
          if not alv_stb-idnrk is initial .
            if not alv_stb-werks is initial.
              if not alv_stb-objty is initial.
                SET PARAMETER ID 'MAT' FIELD alv_stb-idnrk.
                SET PARAMETER ID 'WRK' FIELD alv_stb-werks.
                SET PARAMETER ID 'CSV' FIELD alv_stb-OBJTY.
                call transaction c_tcode and skip first screen.
              endif.
            endif.
          endif.
          clear alv_stb.
      endcase.
    *&      Form  get_data
          Get data from MAST and MAKT Table
    FORM get_data.
      data : wa_lines type sy-index.
      REFRESH : T_MAST,
                t_STB,
                t_MATCAT,
                alv_STB.
      CLEAR : T_MAST,
                t_STB,
                t_MATCAT,
                alv_STB.
    Get the data from MAST Table
    Get all the information from MAST - BOM Table
      SELECT * FROM mast INTO TABLE t_mast WHERE matnr IN s_matnr AND
                                                 werks = p_werks  AND
                                                 stlan IN s_stlan AND
                                                 stlal IN s_stlal.
      describe table t_mast lines  wa_lines.
      if wa_lines is initial.
        Write:/2 'List contains no data'.
        stop.
      endif.
      loop at t_mast.
        clear : v_maktx.
    Start of change  Seshu
    Reason - Remove the new page option
        if sy-tabix ne 1.
          skip 1.
        endif.
    End of Change  Seshu
    Get the material Description
        select single maktx from makt into  v_maktx
                                 where matnr = t_mast-matnr
                                 and   spras = 'E'.
    Get the material details from STKO Table
        select single * from stko into wa_stko
                        where STLTY = 'M'
                        and   STLNR = t_mast-stlnr
                        and   STLAL = t_mast-stlal.
    Main Header for Each Material
        format color 5 on.
        write:/2 'Material',20 'Material Description',65 'Alternative BOM',
             90 'Base Qty', 115 'Base Unit'.
        format color 5 off.
        format color 1 on.
        write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
               115 wa_stko-BMEIN.
        format color 1 off.
    Use the Function Module and get the format level by level
        perform get_level_level.
      endloop.
    ENDFORM.                    " get_data
    Top of page                                                  *
    top-of-page.
      perform report_header .
    *&      Form  report_header
          text
    -->  p1        text
    <--  p2        text
    FORM report_header.
      new-page line-size 160 .
      format color col_heading intensified on.
      write:/ sy-uline(160) .
    *--- Write Company Name.
      perform calc_col_and_write using    text-h00
                                          sy-linsz.
    *--- Write Report Title.
      perform calc_col_and_write using    sy-title
                                          sy-linsz.
    *--- Write User Id, Date / Time, Program Id, Page etc.
      perform write_other_hdr_details.
      write:/ sy-uline(160) .
    ENDFORM.                    " report_header
    *&      Form  calc_col_and_write
          text
         -->P_TEXT_H00  text
         -->P_SY_LINSZ  text
    FORM calc_col_and_write USING    P_TEXT
                                     P_LINSZ.
      data: col1 type i,
             col2 type i,
              len  type i,
              str  type i.
      str  = strlen( p_text ).
      col1 = ( p_linsz / 2 ) - ( str / 2 ) .
      len  = p_linsz - col1 - 2.
      write: at  /1  '|'.
      write: at  col1 p_text,
             at  sy-colno(len) space.
      write  at  160 '|'.
    ENDFORM.                    " calc_col_and_write
    *&      Form  write_other_hdr_details
          text
    -->  p1        text
    <--  p2        text
    FORM write_other_hdr_details.
      data: col1 type i,
              col2 type i,
              len  type i.
      col1 = 3.
      write:/1 '|'.
      write: at  col1 'UserId  : ',
                      sy-uname.
      len = sy-linsz - 1.
      write at sy-colno(len) space.
      col2 = sy-linsz - 18.
      write: at col2 'Date: ',
                     sy-datum mm/dd/yyyy.
      write: at sy-linsz '|'.
      write:/1 '|'.
      write: at  col1 'ReportId: ',
                      sy-repid.
      write at sy-colno(len) space.
      col2 = sy-linsz - 18.
      write: at col2 'Page: ',
                      sy-pagno.
      write: at sy-linsz '|'.
    ENDFORM.                    " write_other_hdr_details
    *&      Form  get_data_component
          Get the data based on Component level
    FORM get_data_component.
      data wa_lines type i.
    *-- Get the BOM item details
      SELECT  stlty stlnr stlkn stpoz idnrk meins menge
              FROM stpo
              INTO TABLE t_stpo
      WHERE   idnrk IN s_idnrk.
      IF sy-subrc = 0.
        CLEAR wa_lines.
        DESCRIBE TABLE t_stpo LINES wa_lines.
        IF wa_lines > 0.
          SELECT  stlty stlnr stlal stkoz bmein bmeng
                  FROM stko
                  INTO TABLE t_stko
                  FOR ALL ENTRIES IN t_stpo
          WHERE stlnr = t_stpo-stlnr.
          CLEAR wa_lines.
          DELETE ADJACENT DUPLICATES FROM t_stko COMPARING ALL FIELDS.
          DESCRIBE TABLE t_stko LINES wa_lines.
          IF wa_lines > 0.
    *-- Get the BOM item details
            SELECT * FROM mast INTO TABLE t_mast FOR ALL ENTRIES IN t_stko
                                                WHERE werks = p_werks  AND
                                                  stlnr = t_stko-stlnr
                                                  and stlal in s_stlal.
          ENDIF.
        ENDIF.
      else.
        Write:/2 'List contains no data'.
        stop.
      endif.
      loop at t_mast.
        clear : v_maktx.
    Start of change  Seshu
    Reason - Remove the new page option
        if sy-tabix ne 1.
          skip 1.
        endif.
    End of change    Seshu
    Get the material Description
        select single maktx from makt into  v_maktx
                                 where matnr = t_mast-matnr
                                 and   spras = 'E'.
    Get the material details from STKO Table
        select single * from stko into wa_stko
                        where STLTY = 'M'
                        and   STLNR = t_mast-stlnr
                        and   STLAL = t_mast-stlal.
    Main Header for Each Material
        format color 5 on.
        write:/2 'Material',20 'Material Description',65 'Alternative BOM',
             90 'Base Qty', 115 'Base Unit'.
        format color 5 off.
        format color 1 on.
        write:/2 t_mast-matnr,20 v_maktx,65 wa_stko-STLAL, 85 wa_stko-BMENG,
               115 wa_stko-BMEIN.
        format color 1 off.
    Use the Function Module and get the format level by level
        perform get_level_level.
        clear : t_mast.
      endloop.
    ENDFORM.                    " get_data_component
    *&      Form  obj_ident
          text
    FORM obj_ident.
    weder Mat noch Doc
      CHECK: T_stb-objty NE otyp_mat,
             T_stb-objty NE ootyp_mat,
             T_stb-objty NE otyp_doc,
             T_stb-objty NE otyp_ntm.
    ?T418-WA schon ok
    nein
      IF T_stb-postp NE t418-postp.
        T418 einlesen
        PERFORM t418_lesen USING T_stb-postp.
      ENDIF.
      PERFORM cl_clstab_maint.
    ?MatNr-Eingabe bei diesem PosTyp moeglich
      und keine Textposition
    trifft zu
      IF     t418-matin NE '-'
         AND t418-txpos IS INITIAL.
        aktuelles Objekt ist Material NLAG
        T_stb-objty = '1'.
        PosKurztext in ObjKurztext uebernehmen.
        T_stb-ojtxp = T_stb-potx1.
        MODIFY T_stb.
      ELSE.
        IF T_stb-objty IS INITIAL.
          T_stb-objty = '2'.
          MODIFY T_stb.
        ENDIF.
      ENDIF.
    ENDFORM.                    " obj_ident
    *&      Form  t418_lesen
          text
         -->P_T_STB_POSTP  text
    FORM t418_lesen USING   lkl_postp LIKE stpo-postp.
    T418-WA initialisieren
      CLEAR:
         t418.
    Key angeben
      t418-postp = lkl_postp.
    PosTypDefinition lesen
      READ TABLE t418.
    ENDFORM.                    " t418_lesen
    *&      Form  cl_clstab_maint
          text
    FORM cl_clstab_maint.
    nur fuer Klassenpositionen
      CHECK t_STB-OBJTY EQ OTYP_KLA.
    Teilkey der Klassenpositionentabelle
      CL_CLSTAB-CLASS = t_STB-CLASS.
      CL_CLSTAB-KLART = t_STB-KLART.
    Klassenpositionentabelle lesen
      READ TABLE CL_CLSTAB
         WITH KEY CL_CLSTAB(21)
         BINARY SEARCH.
    aktuelle Klassenposition bereits in Klassenpositionentabelle
    nein
      IF SY-SUBRC <> 0.
        Klassenposition in Klassenpositionentabelle hinzufuegen
        INSERT CL_CLSTAB INDEX SY-TABIX.
      ENDIF.
    ENDFORM.                    " cl_clstab_maint
    *&      Form  alv_stb_prep
          Printing the data as LEVEL BY LEVEL
    FORM alv_stb_prep.
      CLEAR:
          alv_stb,
          stb_orig,
          stb_add.
      IF t_stb-hdnfo IS INITIAL.
        stb_orig = t_stb.
        IF t_stb-mngko >= max_num.
          stb_add-ovfls = ueberl_kz.
        ELSE.
          IF t_stb-mngko <= min_num.
            stb_add-ovfls = ueberl_kz.
          ELSE.
            CLEAR: stb_add-ovfls.
          ENDIF.
        ENDIF.
        IF NOT t_stb-xtlnr IS INITIAL.
          stb_add-bomfl = b_flag.
        ENDIF.
        IF    NOT t_stb-knobj IS INITIAL
           OR NOT t_stb-class IS INITIAL
           OR NOT t_stb-kzclb IS INITIAL.
          stb_add-knofl = 'X'.
        ENDIF.
      ELSE.
        CHECK t_stb-stufe > 1.
        alv_stb-info = 'C30'.
        IF t_stb-ttidx <> t_matcat-index.
          READ TABLE t_matcat INDEX t_stb-ttidx.
        ENDIF.
        stb_orig-hdnfo = t_stb-hdnfo.
        stb_orig-stufe = t_stb-stufe - 1 .
        stb_orig-ojtxp = t_stb-ojtxb.
        IF NOT t_stb-altst IS INITIAL.
          stb_orig-stlal = t_stb-stlal.
          IF stb_orig-stlal(1) EQ '0'.
            stb_orig-stlal(1) = ' '.
          ENDIF.
        ENDIF.
        stb_orig-idnrk = t_matcat-matnr.
      ENDIF.
      CLEAR:
        stb_add-dobjt,
        stb_add-objic.
      CASE t_stb-objty.
        WHEN otyp_mat.
          WRITE: stb_orig-idnrk TO ecfld.
          stb_add-objic = '@A6@'.
        WHEN 'M'.
          WRITE: stb_orig-idnrk TO ecfld.
          stb_add-objic = '@A6@'.
        WHEN otyp_noo.
          WRITE: stb_orig-potx1 TO ecfld.
          stb_add-objic = '@0Q@'.
        WHEN otyp_doc.
          write stb_orig-doknr to ecfld.                        "note 489354
          IF ecfld CP '*# '. ENDIF.                             "note 489354
          sy-fdpos = sy-fdpos + 1.                              "note 489354
          CONCATENATE
    *d      stb_orig-doknr                                      "note 489354
            stb_orig-dokar
            stb_orig-doktl
            stb_orig-dokvr
    *d      INTO ecfld                                          "note 489354
            INTO ecfld+sy-fdpos                                 "note 489354
            SEPARATED BY space.
          stb_add-objic = '@AR@'.
        WHEN otyp_kla.
          CONCATENATE
            stb_orig-class
            stb_orig-klart
            INTO ecfld
            SEPARATED BY space.
          stb_add-objic = '@7C@'.
        WHEN otyp_ntm.
          WRITE: stb_orig-intrm TO ecfld.
        WHEN OTHERS.
      ENDCASE.
    *d CONDENSE ecfld.                                          "note 515408
      stb_add-dobjt = ecfld(40).
      CLEAR: ecfld.
      WRITE stb_orig-stufe TO stb_add-dstuf NO-SIGN.
    *d  MOVE-CORRESPONDING stb_orig TO alv_stb.                 "note 331962
      MOVE-CORRESPONDING stb_add TO alv_stb.
      MOVE-CORRESPONDING stb_orig TO alv_stb.                   "note 331962
      APPEND alv_stb.
    ENDFORM.                    " alv_stb_prep
    *&      Form  get_level_level
          text
    FORM get_level_level.
      REFRESH : T_STB,
                T_MATCAT,
                ALV_STB.
      CLEAR : T_STB,
              T_MATCAT,
              ALV_STB.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
           EXPORTING
                capid                 = 'PP01'
                datuv                 = sy-datum
                mktls                 = 'X'
                mehrs                 = 'X'
                mtnrv                 = t_mast-matnr
                stlal                 = '01'
                stlan                 = '1'
                stpst                 = 0
                svwvo                 = 'X'
                werks                 = p_werks
                vrsvo                 = 'X'
           TABLES
                stb                   = t_stb
                matcat                = t_matcat
           EXCEPTIONS
                alt_not_found         = 1
                call_invalid          = 2
                material_not_found    = 3
                missing_authorization = 4
                no_bom_found          = 5
                no_plant_data         = 6
                no_suitable_bom_found = 7
                conversion_error      = 8
                OTHERS                = 9.
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CLEAR: hd_tab.
            Entry der KlassenstatusTab. initialisieren
             cl_clstab,
            Entry 'Objekte von Klassen' initialisieren
             cl_objmemo.
      REFRESH: hd_tab.
      SORT t_matcat BY index ASCENDING.
    Get the All levels
      loop at t_stb.
        IF NOT t_stb-hdnfo IS INITIAL.
          EXIT.
        ENDIF.
    Object Identification
        PERFORM obj_ident.
        READ TABLE hd_tab
            WITH KEY stufe = t_stb-stufe
                     vwegx = t_stb-vwegx
            BINARY SEARCH
            TRANSPORTING NO FIELDS.
        ?gibt es diesen Satz schon
        nein
        IF sy-subrc <> 0.
           dann in SFP-Infosatzverweistab. aufnehmen
    *d       APPEND HD_TAB.                                       "HGH054648
          hd_tab-stufe = t_stb-stufe.
                                                                "HGH054648
          hd_tab-vwegx = t_stb-vwegx.
                                                                "HGH054648
          INSERT hd_tab                                         "HGH054648
            INTO hd_tab                                         "HGH054648
            INDEX sy-tabix.                                     "HGH054648
           PosNr initialisieren
          CLEAR: t_stb-posnr.
           SFP-InfosatzKz setzen
          t_stb-hdnfo = 'X'.
            stb-objty = otyp_mat.
                                                                "HGE246532
           als SFP-Infosatz in die STB aufnehmen
          append t_stb.
        ENDIF.
    *del  ENDIF.
        clear t_stb.
      endloop.
      SORT t_stb ASCENDING BY stufe
                  index ASCENDING
    *del        POSNR ASCENDING.                                  "HGC062735
                  posnr ASCENDING                               "HGC062735
                  hdnfo DESCENDING.
      LOOP AT t_stb.
        T_stb-index = sy-tabix.
        MODIFY T_stb.
        PERFORM alv_stb_prep.
      ENDLOOP.
    Displays the Value as Level by Level
      loop at ALV_stb.
        if sy-tabix = 1.
          format color 3 on.
          write:/2 'Level',12 'Item',22 'Component',
          42 'Material Description',82 'Base Qty',
          107 'Base Unit',120 'Assembly Indicator'.
          format color 3 on.
        endif.
        if alv_stb-MEINs is initial.
          v_flag = 'X'.
        endif.
        if v_flag = 'X'.
          format color 5 on.
          write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                 42 alv_stb-OJTXP.
          format color 1 off.
        else.
          if alv_stb-STUFE = '1'.
            format color 1 on.
            write:/2 ALV_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs, 120 alv_stb-bomfl .
            format color 1 off.
          elseif alv_stb-STUFE = '2'.
            format color 2 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl.
            format color 2 off.
          elseif alv_stb-STUFE = '3'.
            format color 3 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 3 off.
          elseif alv_stb-STUFE = '4'.
            format color 4 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 4 off.
          elseif alv_stb-STUFE = '5'.
            format color 5 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color 5 off.
          elseif alv_stb-STUFE = '6'.
            format color 7 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl.
            format color 6 off.
          elseif alv_stb-STUFE = '7'.
            format color 7 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                   42 alv_stb-OJTXP,72 alv_stb-mngko,
                   107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color  7 off.
          else.
            format color 1 on.
            write:/2 alv_stb-STUFE,12 alv_stb-posnr,22 alv_stb-idnrk,
                    42 alv_stb-OJTXP,72 alv_stb-mngko,
                    107 alv_stb-MEINs,120 alv_stb-bomfl .
            format color  1 off.
          endif.
        endif.
        hide: alv_stb.
        clear : alv_stb.
        clear v_flag.
      endloop.
    ENDFORM.                    " get_level_level
    *&      Form  f4_for_variant
          text
    FORM f4_for_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
             EXPORTING
                  is_variant          = g_variant
                  i_save              = g_save
                  i_tabname_header    = g_tabname_header
                  i_tabname_item      = g_tabname_item
              it_default_fieldcat =
             IMPORTING
                  e_exit              = g_exit
                  es_variant          = gx_variant
             EXCEPTIONS
                  not_found = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S'      NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF g_exit = space.
          p_vari = gx_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f4_for_variant
          FORM E03_EVENTTAB_BUILD                                       *
    -->  E03_LT_EVENTS                                                 *
    FORM e03_eventtab_build USING e03_lt_events TYPE slis_t_event.
      DATA: ls_event TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                i_list_type = 0
           IMPORTING
                et_events   = e03_lt_events.
      READ TABLE e03_lt_events WITH KEY name = slis_ev_top_of_page
                               INTO ls_event.
      IF sy-subrc = 0.
        MOVE gc_formname_top_of_page TO ls_event-form.
        APPEND ls_event TO e03_lt_events.
      ENDIF.
    ENDFORM.
          FORM E04_COMMENT_BUILD                                        *
    -->  E04_LT_TOP_OF_PAGE                                            *
    FORM e04_comment_build USING e04_lt_top_of_page TYPE slis_t_listheader.
      DATA: ls_line TYPE slis_listheader.
    Listenüberschrift: Typ H
      CLEAR ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  not used for this type
      ls_line-info = text-001.
      APPEND ls_line TO e04_lt_top_of_page.
    Kopfinfo: Typ S
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = text-050.
      ls_line-info = text-010.
      APPEND ls_line TO e04_lt_top_of_page.
      ls_line-key  = text-051.
      APPEND ls_line TO e04_lt_top_of_page.
    Aktionsinfo: Typ A
      CLEAR ls_line.
      ls_line-typ  = 'A'.
    LS_LINE-KEY:  not used for this type
      ls_line-info = text-002.
      APPEND ls_line TO  e04_lt_top_of_page.
    ENDFORM.
          FORM E07_SP_GROUP_BUILD                                       *
    -->  E07_LT_SP_GROUP                                               *
    FORM e07_sp_group_build USING e07_lt_sp_group TYPE slis_t_sp_group_alv.
      DATA: ls_sp_group TYPE slis_sp_group_alv.
      CLEAR  ls_sp_group.
      ls_sp_group-sp_group = 'A'.
      ls_sp_group-text     = text-005.
      APPEND ls_sp_group TO e07_lt_sp_group.
    ENDF

  • How to populate a sharepoint 2010 list from the active directory. How to populate a sharepoint 2010 list with all sharepoint user profiles

    How to populate a sharepoint 2010 from the active directory.
    I want a list of all the computers in the active directory,
    another one with all users.
    I want also to populate a sharepoint 2010 list from the sharepoint user profiles.
    Thanks
    sz

    While
    the contacts list is usually filled out for contacts that are outside the company, there are times when you would use a contacts list to store internal and external resources.  Wouldn’t it be nice if you didn’t have to re-type your internal contacts’
    information that are already in the system?  Now you can with a little InfoPath customization on the contacts list. 
    Here’s our plan:
    Create the contacts list, and open in InfoPath
    Create a data connection to the User Profile web service
    Customize the form adding some text, a people picker and a button
    Create InfoPath rules that will populate the contact fields from the user fields in the User Profile store
    Let’s get going!  Before we begin, make sure you have InfoPath 2010 installed locally on your computer.  I also want to give credit Laura
    Rogers and Darvish Shadravan’s book Using
    Microsoft InfoPath 2010 with Microsoft SharePoint 2010 Step by Step.  I know it looks like a lot of steps, but it’s easy once you get the hang of it.
    So obviously we need a contacts list.  If you don’t already have one, go to the SharePoint site where it will live, and create a contacts list.
    From the list, click the List tab on the ribbon, then click Customize form:
    So now we have our form open in InfoPath 2010.  Let’s add our elements to the form. 
    Above all the fields, let’s add some text instructing users what to do with the the field we’re about to add (.e.g To enter an existing user’s information, choose the user below).
    Insert a people picker control by clicking the Person/Group Picker control in the Controls section of the ribbon.  This will add a column to the contacts list called group.
    Below the people picker, insert a button control from the same section of the ribbon as above.  With the button still highlighted, click the Control Tools|Properties tab on the ribbon. 
    Then in the Label box, change the text to something more appropriate to our task (e.g. Click here to load user data!).
    You can drag the button control a little larger to account for the text.
    We should end up with something like this:
    Before we can populate the fields with user data, we need to create a connection to the User Profile Service.
    Add a data connection to the User Profile Service
    Click the Data tab on the ribbon, and click the option From Web Service, and From SOAP Web Service.
    For the location, enter the URL of your SharePoint site in the following format – http://<site url>/_vti_bin/UserProfileService.asmx?WSDL.  Click Next.
    Note - for the URL, it can be any SharePoint site URL, not just to the site where your list is.
    For the operation, choose GetUserProfileByName.  Click Next.
    Click Next on the next two screens.
    On the final screen, uncheck the box for “Automatically retrieve data when form is opened”. This is because we are going to retrieve the data when the button is clicked, also for performance reasons.
    Now we need to wire up the actions on our button to populate the fields with the information for the user in the people picker control.
    Tell the form to read the user from the people picker control
    Click the Home tab on the ribbon.
    Click the button control we created, and under the Rules section of the ribbon, click Manage Rules. Notice the pane appear on the far right.
    In the Rules pane, click New –> Action. Change the name to something like “Query and load user data”.
    Leave the condition to default (none – rule runs when button is clicked).
    Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
    For Field, click the button on the right to load the select a field dialog.  Click the Show advanced view on the bottom.  At the top, click the drop down and choose the GetUserProfileByName
    (Secondary) option.  Expand myFields and queryFields to the last option and highlightAccountName.  Click ok. 
    For Value, click the formula icon. On the formula screen, click the Insert Field or Group button. Again click the show advanced view link, but this time leave the data
    connection as Main. Expand dataFields, then mySharePointListItem_RW.  At the bottom you should see a folder called group (the people picker control we just added to the form).  Expand this, then pc:Person,
    and highlightAccountId.  Click Ok twice to get back to the Rules pane.
    If we didn’t do this and just queried the user profile service, it would load the data of the currently logged in user.  So we need to tell the form what user to load the data for.  We take the AccountID field from the people
    picker control and inject into the AccountName query field of the User Profile Service data connection. 
    Load the user profile service information for the chosen user
    Click the Add button next to “Run these actions:”, and choose Query for data.
    In the popup, for Data connection, click the one we created earlier – GetUserProfileByName and clickOk.
    We’re closing in on our goal.  Let’s see our progress.  We should see something like this:
    Now that we have the user’s data read into the form, we can populate the fields in the contact form.  The number of steps to complete will depend on how many fields you want to populate.  We need to add an action step for
    each field.  I’ll show you one example and then you will just repeat the steps for the other fields.  Let’s update the Job Title field.
    Populate the contact form fields with existing user’s data
    Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
    For Field, click the button on the right to load the select a field dialog.  Highlight the field Job Title.
    For Value, click the formula icon. On the formula screen, click the Insert Field or Group button.  Click the Show advanced view on the bottom. At the top, click the
    drop down and choose theGetUserProfileByName (Secondary) option.  Expand the fields all the way down until you see the Value field.  Highlight it but don’t click ok, but click the Filter
    Data button, then Add. 
    For the first dropdown that says Value, choose Select a field or group.   The value field will be highlighted, but click the field Name field
    under PropertyData.  Click Ok. 
    In the blank field after “is equal to”, click in the box and choose Type text.  Then type the text Title. 
    Click ok until you get back to the Manage Rules pane.  The last previous screen will look like this.
    We’re going to update common fields that are in the user’s profile, and likely from Active Directory.  You can update fields like first and last name, company, mobile and work phone number, etc.  For the other fields, the
    steps are the same except the Field you choose to update from the form, and the very last step where you enter the text will change.  Here’s what the rules look like when we’re done:
    We’re all done, good work!  You can preview the form and try it now.  Click Ctrl+Shift+B to preview the form.  Once you’re satisfied, you can publish the form back to the library.  Click File –> Quick
    Publish.  Once it’s done, you will get confirmation:
    Now open your form in SharePoint.  From the contact list, click Add new item.  Type in a name, and click the button and watch the magic happen!

  • Active Directory error message "the following object is not from a domain listed in the Select location forestB\username

    Hello Community
        "forestA" is my forest it is a Windows 2008 Server Enterprise Edition
    domain controller using Active Directory and the UI.
        In my forest ("forestA") trust relationship I created a "One-Way, Out-going"
    forest trust with Forest-Wide authentication so that a different forest user(s) or
    group(s) with a different admin in a forest named “forestB” can access the resources in my “forestA”
        But also forestB needs to create a "One-way, Incoming" forest trust so that
    I can either add the user(s) or group(s) from “forestB” into to a "Global Security - Group"
    in my "forestA" or I can
     add user(s)  as  "domain user(s)" from “forestB” into my "forestA".
        The problem is that when I right click  the global group in my forestA  and then
    properties, when I click "Members" and then the "Add" button when I type
    "forestB\username" I get an error message from Active Directory stating:
        "the following object is not from a domain listed in the Select location
    dialog box, and is therefore not valid: forestB\username".
        Am I doing something wrong when creating the one-way trust in my
    “forestA” or is the one-way trust being created wrong by the other domain admin in the other “forestB”?
        Or could I possibly need to select "Change Domain" or "Change Domain Controller"
    before adding the users or Groups to my forestA from forestB?
        That is why I am asking
     how do you add an Active Directory user from one forest into another forest?
        Thank you
        Shabeaut

    Hello Denis Cooper
        That is the end result.
        What I was trying  to do was that I was trying to
     bring in the user(s) and group(s) from “forestB”  into
    my “forestA”  Global group.
        Later on I was going to add the user(s) or Global groups(s) that I brought into my dc in my forestA
     into the domain local groups  on my member servers in my forestA.
        So since the error message is:
    "the following object is not from a domain listed in the Select location dialog box, and is therefore not valid: forestB\username".
    Does your response
     mean only Global group(s) from forestB not domain user(s) from forestB have
     to been added to domain local groups in forestA?
    Or is it also possible to add Global group(s) from “forestB” to Global group(s) in my “forestA” and if so
    how without getting the above error message?
    Thank you
        Shabeaut

Maybe you are looking for

  • Getting back the "this file cannot be played on an iPod" error message

    Apparently, my iTunes library contains some song files that are out-of-spec and unplayable on an iPod. When I first plugged in my iPod, I remember getting a message to the effect of "The file 'FOO' was not copied to the iPod 'BAR' because this file c

  • Process Route-Digital Signature

    Hi, For the process route functionality for SAP DMS in PLM7.01 are digital signatures possible? If not , is it possible to build in this functionality using customization? Also if an approver in a route rejects approval how does the system handle thi

  • Recovery very very slow on the physical standby recently

    The standby was running fine for over a year. But recently the recovery became very slow. It took over an hour to apply one archivelog causing the standby falling behind. What could be the cause and solution? Thanks!

  • GRC AC 5.3 - RAR executing a simulation

    Hi All, In the risk analysis simulation , what is the meaning of field "Exclude Values:" Thanks Yudit

  • Time scale on 3D graph

    Hi, I'm having major problems converting the axis on my 3D curve from seconds into proper time. I've tried everything but nothing seems to work. I've attached a very shortened version of my code. Attachments: 3D_graph_for_NI.vi ‏29 KB