<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Querying the LDAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/querying-the-ldap/m-p/3010314#M711369</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi here is the sample we recently used for getting e-mails ID from LDAP distribution lists...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Y_ISA_LDAP_UPDATE.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(EMAIL) TYPE  AD_SMTPADR&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      ATTRIBUTES_IN STRUCTURE  LDAP_ATII&lt;/P&gt;&lt;P&gt;*"      VALUES_IN STRUCTURE  LDAP_VALI&lt;/P&gt;&lt;P&gt;*"      ET_MESSAGES STRUCTURE  CRMT_ISALES_RETURN&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Modification Log&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;0001 08/02/2004  MFoley   Created to update LDAP variables passed in&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                          through attributes_in and values_in&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                          structure based on email id.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: dns_out like ldap_dnii occurs 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        SERVERID LIKE LDAPSERVER-SERVERID,&lt;/P&gt;&lt;P&gt;        ws_tvarv like tvarv,&lt;/P&gt;&lt;P&gt;        ws_attribute_lines(4) type n,&lt;/P&gt;&lt;P&gt;        ws_attrs_io_lines(4) type n,&lt;/P&gt;&lt;P&gt;        ws_attribute_index(4) type n,&lt;/P&gt;&lt;P&gt;        ATTRS_IO like ldap_atii occurs 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        VALUES_IO like ldap_vali occurs 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        ws_attributes_delete like ldap_atii occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        search_term type c length 255,&lt;/P&gt;&lt;P&gt;        SEARCH_TERM_2 TYPE C LENGTH 255,&lt;/P&gt;&lt;P&gt;        FIELD_EXISTS TYPE C LENGTH 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;data: w_test type n.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; w_test = 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; while w_test = 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; endwhile.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*system bind----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;  SELECT SINGLE * FROM TVARV into corresponding fields of ws_tvarv&lt;/P&gt;&lt;P&gt;  WHERE NAME = 'Y_ISA_F_ADAM_SERVER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SERVERID = WS_TVARV-LOW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'LDAP_SYSTEMBIND'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      SERVERID     = SERVERID&lt;/P&gt;&lt;P&gt;      WRITEREAD    = 'W'&lt;/P&gt;&lt;P&gt;      WAIT_TIME    = 5&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      NO_AUTHORIZ  = 1&lt;/P&gt;&lt;P&gt;      CONFIG_ERROR = 2&lt;/P&gt;&lt;P&gt;      NOMORE_CONNS = 3&lt;/P&gt;&lt;P&gt;      LDAP_FAILURE = 4&lt;/P&gt;&lt;P&gt;      NOT_ALIVE    = 5&lt;/P&gt;&lt;P&gt;      OTHER_ERROR  = 6&lt;/P&gt;&lt;P&gt;      OTHERS       = 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*search for record----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;P&gt;  concatenate '(&amp;amp;(objectclass=&lt;STRONG&gt;)(cn=' email '&lt;/STRONG&gt;))' into search_term.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: dns_out, attrs_io, values_io.&lt;/P&gt;&lt;P&gt;  refresh: dns_out, attrs_io, values_io.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'LDAP_SEARCH'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     BASE         = 'ou=Members,o=ADI Internet'   "0001&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      BASE         = 'OU=WebAdam,DC=Analog,DC=com'          "0001&lt;/P&gt;&lt;P&gt;      SCOPE        = 2&lt;/P&gt;&lt;P&gt;      MODE         = 'C'&lt;/P&gt;&lt;P&gt;      CROP         = 'X'&lt;/P&gt;&lt;P&gt;      CROP_DN_ATTR = 'X'&lt;/P&gt;&lt;P&gt;      FILTER       = SEARCH_TERM&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DNS_OUT      = dns_out&lt;/P&gt;&lt;P&gt;      ATTRS_IO     = attrs_io&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      NO_AUTHORIZ  = 1&lt;/P&gt;&lt;P&gt;      CONN_OUTDATE = 2&lt;/P&gt;&lt;P&gt;      LDAP_FAILURE = 3&lt;/P&gt;&lt;P&gt;      NOT_ALIVE    = 4&lt;/P&gt;&lt;P&gt;      OTHER_ERROR  = 5&lt;/P&gt;&lt;P&gt;      OTHERS       = 6.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  describe table attrs_io lines ws_attrs_io_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if ws_attrs_io_lines = 0.&lt;/P&gt;&lt;P&gt;    ET_MESSAGES-NUMBER = '998'.&lt;/P&gt;&lt;P&gt;    ET_MESSAGES-ID = 'E'.&lt;/P&gt;&lt;P&gt;    ET_MESSAGES-MESSAGE = 'User does not exist in Active Directory'.&lt;/P&gt;&lt;P&gt;    ET_MESSAGES-LOG_NO = 'FE'.&lt;/P&gt;&lt;P&gt;    APPEND ET_MESSAGES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*unbind----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;    CALL FUNCTION 'LDAP_UNBIND'&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        CONN_OUTDATE = 1&lt;/P&gt;&lt;P&gt;        LDAP_FAILURE = 2&lt;/P&gt;&lt;P&gt;        NOT_ALIVE    = 3&lt;/P&gt;&lt;P&gt;        OTHER_ERROR  = 4&lt;/P&gt;&lt;P&gt;        OTHERS       = 5.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at attributes_in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ws_attribute_index = sy-tabix.&lt;/P&gt;&lt;P&gt;    read table values_in index ws_attribute_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;check to see if field already is on Active Directory&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    field_exists = 'N'.&lt;/P&gt;&lt;P&gt;    loop at attrs_io where text = attributes_in-text.&lt;/P&gt;&lt;P&gt;      field_exists = 'Y'.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if attribute is on active directory update it&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if field_exists = 'Y'.&lt;/P&gt;&lt;P&gt;      "If value exists, then update it - otherwise, delete&lt;/P&gt;&lt;P&gt;      if values_in-text &amp;lt;&amp;gt; ''.&lt;/P&gt;&lt;P&gt;        attributes_in-num1 = 2.&lt;/P&gt;&lt;P&gt;        attributes_in-num2 = 1.&lt;/P&gt;&lt;P&gt;        modify attributes_in.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        ws_attributes_delete-text = attributes_in-text.&lt;/P&gt;&lt;P&gt;        append ws_attributes_delete.&lt;/P&gt;&lt;P&gt;        delete attributes_in.&lt;/P&gt;&lt;P&gt;        delete values_in index ws_attribute_index.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If attribute isn't on active directory create it&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      if values_in-text &amp;lt;&amp;gt; ''.&lt;/P&gt;&lt;P&gt;        " if values exists, then create it - otherwise remove&lt;/P&gt;&lt;P&gt;        attributes_in-num1 = 0.&lt;/P&gt;&lt;P&gt;        attributes_in-num2 = 1.&lt;/P&gt;&lt;P&gt;        modify attributes_in.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        delete attributes_in.&lt;/P&gt;&lt;P&gt;        delete values_in index ws_attribute_index.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CONCATENATE 'CN=' ALIAS ',OU=MEMBERS,O=ADI INTERNET' INTO SEARCH_TERM_2&lt;/P&gt;&lt;P&gt;  LOOP AT DNS_OUT.&lt;/P&gt;&lt;P&gt;    SEARCH_TERM_2 = DNS_OUT-TEXT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;only execute modify if there's anything to be updated&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  describe table attributes_in lines ws_attribute_lines.&lt;/P&gt;&lt;P&gt;  if ws_attribute_lines &amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'LDAP_MODIFY'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        DN           = SEARCH_TERM_2&lt;/P&gt;&lt;P&gt;        MODE         = 'C'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        ATTRS_IN     = attributes_in&lt;/P&gt;&lt;P&gt;        VALUES_IN    = values_in&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        NO_AUTHORIZ  = 1&lt;/P&gt;&lt;P&gt;        CONN_OUTDATE = 2&lt;/P&gt;&lt;P&gt;        PARAM_ERROR  = 3&lt;/P&gt;&lt;P&gt;        LDAP_FAILURE = 4&lt;/P&gt;&lt;P&gt;        HEXVAL_ERROR = 5&lt;/P&gt;&lt;P&gt;        NOT_ALIVE    = 6&lt;/P&gt;&lt;P&gt;        OTHER_ERROR  = 7&lt;/P&gt;&lt;P&gt;        OTHERS       = 8.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If any attributes need to be deleted, loop through&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;them one by one to remove (getting syntax errors when&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I try to delete them all at one time).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at ws_attributes_delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear: attrs_io, values_io.&lt;/P&gt;&lt;P&gt;    refresh: attrs_io, values_io.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    attrs_io-text = ws_attributes_delete-text.&lt;/P&gt;&lt;P&gt;    attrs_io-num1 = 1.&lt;/P&gt;&lt;P&gt;    attrs_io-num2 = 1.&lt;/P&gt;&lt;P&gt;    append attrs_io.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'LDAP_MODIFY'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        DN           = SEARCH_TERM_2&lt;/P&gt;&lt;P&gt;        MODE         = 'C'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        ATTRS_IN     = attrs_io&lt;/P&gt;&lt;P&gt;        VALUES_IN    = values_io&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        NO_AUTHORIZ  = 1&lt;/P&gt;&lt;P&gt;        CONN_OUTDATE = 2&lt;/P&gt;&lt;P&gt;        PARAM_ERROR  = 3&lt;/P&gt;&lt;P&gt;        LDAP_FAILURE = 4&lt;/P&gt;&lt;P&gt;        HEXVAL_ERROR = 5&lt;/P&gt;&lt;P&gt;        NOT_ALIVE    = 6&lt;/P&gt;&lt;P&gt;        OTHER_ERROR  = 7&lt;/P&gt;&lt;P&gt;        OTHERS       = 8.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*unbind----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;  CALL FUNCTION 'LDAP_UNBIND'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      CONN_OUTDATE = 1&lt;/P&gt;&lt;P&gt;      LDAP_FAILURE = 2&lt;/P&gt;&lt;P&gt;      NOT_ALIVE    = 3&lt;/P&gt;&lt;P&gt;      OTHER_ERROR  = 4&lt;/P&gt;&lt;P&gt;      OTHERS       = 5.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Nov 2007 07:37:58 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-02T07:37:58Z</dc:date>
    <item>
      <title>Querying the LDAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/querying-the-ldap/m-p/3010312#M711367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;does somebody built up a connection between SAP and LDAP? Would be neice ti exchange expreince on querying the emailadress from LDAP with ABAP or any other SAP tools (ALE, RFC whatever).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 06:50:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/querying-the-ldap/m-p/3010312#M711367</guid>
      <dc:creator>rainer_hbenthal</dc:creator>
      <dc:date>2007-11-02T06:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Querying the LDAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/querying-the-ldap/m-p/3010313#M711368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can download novell e directory server (LDAP) from the following link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.sap.com/www.novell.com/products/edirectory/sap" target="test_blank"&gt;www.novell.com/products/edirectory/sap&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for more information please go throught this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/06/371640b7b6dd5fe10000000a155106/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/06/371640b7b6dd5fe10000000a155106/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and navigate to identity management-&amp;gt;UME-&amp;gt;UME Configuration-&amp;gt;UME Data Source&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Refer this link&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cc/cdd93f130f9115e10000000a155106/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cc/cdd93f130f9115e10000000a155106/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/4e/4d0d40c04af72ee10000000a1550b0/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/4e/4d0d40c04af72ee10000000a1550b0/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And some good SAP notes to have a look at are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;673824 - LDAP Issues for UME.&lt;/P&gt;&lt;P&gt;736471 - UME Configuration of multiple LDAP data sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls cjheck this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04s/helpdata/en/48/d1d13f7fb44c21e10000000a1550b0/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04s/helpdata/en/48/d1d13f7fb44c21e10000000a1550b0/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to configure LDAP in portal &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user management component of the Enterprise Portal leverages your existing landscape by using a corporate LDAP directory server as its central user data repository. It accesses any existing data schema by allowing you to map the attributes used in the schema.&lt;/P&gt;&lt;P&gt;In this step, you will connect to your LDAP server as an alternate user data source. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Log on to the Portal as Administrator&lt;/P&gt;&lt;P&gt;1.Navigate to System Administration ® System Configuration ®UMEConfiguration.&lt;/P&gt;&lt;P&gt;2.Choose the Modify Configuration button.&lt;/P&gt;&lt;P&gt;3.In Data Source, use the drop list to select the LDAP system of your landscape. &lt;/P&gt;&lt;P&gt;4.Choose the LDAP Server tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5.Enter the following values in the fields as follows&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Server Name :Host Name of the Directory Server for example Idap.sap.corp&lt;/P&gt;&lt;P&gt;Port:Port of the LDAP directory server. for example 389&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User:Distinguished name (DN) of user that is used to connect (bind) to the LDAP directory server. &lt;/P&gt;&lt;P&gt;cn=Directory Manager &lt;/P&gt;&lt;P&gt;For example: newuser@sap.corp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Password: Password of the user &lt;/P&gt;&lt;P&gt;User Path (Only required if you have a flat hierarchy)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Distinguished name of branch of directory where information about users is stored. &lt;/P&gt;&lt;P&gt;ou=CorporateUsers,c=us,o=mycompany&lt;/P&gt;&lt;P&gt;For example: DC=sap, DC=corp&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User Group:If you have a flat hierarchy, enter the distinguished name of the branch of your directory where information about the groups of portal users is stored. &lt;/P&gt;&lt;P&gt;If you have groups in a tree hierarchy, enter the distinguished name of the branch of your directory where information about portal users and groups is stored. &lt;/P&gt;&lt;P&gt;ou=CorporateGroups,c=us,o=mycompany&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6.Choose Save All Changes to save the entire configuration. Otherwise, choose Restore All Changes to undo all data you have entered only on this tab. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7.After changing settings using the configuration tool, you must restart the J2EE Engine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rewards if useful........&lt;/P&gt;&lt;P&gt;Minal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 06:54:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/querying-the-ldap/m-p/3010313#M711368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T06:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Querying the LDAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/querying-the-ldap/m-p/3010314#M711369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi here is the sample we recently used for getting e-mails ID from LDAP distribution lists...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION Y_ISA_LDAP_UPDATE.&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;"Local interface:&lt;/P&gt;&lt;P&gt;*"  IMPORTING&lt;/P&gt;&lt;P&gt;*"     VALUE(EMAIL) TYPE  AD_SMTPADR&lt;/P&gt;&lt;P&gt;*"  TABLES&lt;/P&gt;&lt;P&gt;*"      ATTRIBUTES_IN STRUCTURE  LDAP_ATII&lt;/P&gt;&lt;P&gt;*"      VALUES_IN STRUCTURE  LDAP_VALI&lt;/P&gt;&lt;P&gt;*"      ET_MESSAGES STRUCTURE  CRMT_ISALES_RETURN&lt;/P&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Modification Log&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;0001 08/02/2004  MFoley   Created to update LDAP variables passed in&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                          through attributes_in and values_in&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;                          structure based on email id.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*"----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  data: dns_out like ldap_dnii occurs 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        SERVERID LIKE LDAPSERVER-SERVERID,&lt;/P&gt;&lt;P&gt;        ws_tvarv like tvarv,&lt;/P&gt;&lt;P&gt;        ws_attribute_lines(4) type n,&lt;/P&gt;&lt;P&gt;        ws_attrs_io_lines(4) type n,&lt;/P&gt;&lt;P&gt;        ws_attribute_index(4) type n,&lt;/P&gt;&lt;P&gt;        ATTRS_IO like ldap_atii occurs 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        VALUES_IO like ldap_vali occurs 0 WITH HEADER LINE,&lt;/P&gt;&lt;P&gt;        ws_attributes_delete like ldap_atii occurs 0 with header line,&lt;/P&gt;&lt;P&gt;        search_term type c length 255,&lt;/P&gt;&lt;P&gt;        SEARCH_TERM_2 TYPE C LENGTH 255,&lt;/P&gt;&lt;P&gt;        FIELD_EXISTS TYPE C LENGTH 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;data: w_test type n.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; w_test = 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; while w_test = 1.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; endwhile.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*system bind----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;  SELECT SINGLE * FROM TVARV into corresponding fields of ws_tvarv&lt;/P&gt;&lt;P&gt;  WHERE NAME = 'Y_ISA_F_ADAM_SERVER'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SERVERID = WS_TVARV-LOW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'LDAP_SYSTEMBIND'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      SERVERID     = SERVERID&lt;/P&gt;&lt;P&gt;      WRITEREAD    = 'W'&lt;/P&gt;&lt;P&gt;      WAIT_TIME    = 5&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      NO_AUTHORIZ  = 1&lt;/P&gt;&lt;P&gt;      CONFIG_ERROR = 2&lt;/P&gt;&lt;P&gt;      NOMORE_CONNS = 3&lt;/P&gt;&lt;P&gt;      LDAP_FAILURE = 4&lt;/P&gt;&lt;P&gt;      NOT_ALIVE    = 5&lt;/P&gt;&lt;P&gt;      OTHER_ERROR  = 6&lt;/P&gt;&lt;P&gt;      OTHERS       = 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*search for record----&lt;/P&gt;&lt;HR originaltext="-------------------------------------------" /&gt;&lt;P&gt;  concatenate '(&amp;amp;(objectclass=&lt;STRONG&gt;)(cn=' email '&lt;/STRONG&gt;))' into search_term.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  clear: dns_out, attrs_io, values_io.&lt;/P&gt;&lt;P&gt;  refresh: dns_out, attrs_io, values_io.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'LDAP_SEARCH'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;     BASE         = 'ou=Members,o=ADI Internet'   "0001&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      BASE         = 'OU=WebAdam,DC=Analog,DC=com'          "0001&lt;/P&gt;&lt;P&gt;      SCOPE        = 2&lt;/P&gt;&lt;P&gt;      MODE         = 'C'&lt;/P&gt;&lt;P&gt;      CROP         = 'X'&lt;/P&gt;&lt;P&gt;      CROP_DN_ATTR = 'X'&lt;/P&gt;&lt;P&gt;      FILTER       = SEARCH_TERM&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DNS_OUT      = dns_out&lt;/P&gt;&lt;P&gt;      ATTRS_IO     = attrs_io&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      NO_AUTHORIZ  = 1&lt;/P&gt;&lt;P&gt;      CONN_OUTDATE = 2&lt;/P&gt;&lt;P&gt;      LDAP_FAILURE = 3&lt;/P&gt;&lt;P&gt;      NOT_ALIVE    = 4&lt;/P&gt;&lt;P&gt;      OTHER_ERROR  = 5&lt;/P&gt;&lt;P&gt;      OTHERS       = 6.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  describe table attrs_io lines ws_attrs_io_lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  if ws_attrs_io_lines = 0.&lt;/P&gt;&lt;P&gt;    ET_MESSAGES-NUMBER = '998'.&lt;/P&gt;&lt;P&gt;    ET_MESSAGES-ID = 'E'.&lt;/P&gt;&lt;P&gt;    ET_MESSAGES-MESSAGE = 'User does not exist in Active Directory'.&lt;/P&gt;&lt;P&gt;    ET_MESSAGES-LOG_NO = 'FE'.&lt;/P&gt;&lt;P&gt;    APPEND ET_MESSAGES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*unbind----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;    CALL FUNCTION 'LDAP_UNBIND'&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        CONN_OUTDATE = 1&lt;/P&gt;&lt;P&gt;        LDAP_FAILURE = 2&lt;/P&gt;&lt;P&gt;        NOT_ALIVE    = 3&lt;/P&gt;&lt;P&gt;        OTHER_ERROR  = 4&lt;/P&gt;&lt;P&gt;        OTHERS       = 5.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    EXIT.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loop at attributes_in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    ws_attribute_index = sy-tabix.&lt;/P&gt;&lt;P&gt;    read table values_in index ws_attribute_index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;check to see if field already is on Active Directory&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    field_exists = 'N'.&lt;/P&gt;&lt;P&gt;    loop at attrs_io where text = attributes_in-text.&lt;/P&gt;&lt;P&gt;      field_exists = 'Y'.&lt;/P&gt;&lt;P&gt;    endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;if attribute is on active directory update it&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    if field_exists = 'Y'.&lt;/P&gt;&lt;P&gt;      "If value exists, then update it - otherwise, delete&lt;/P&gt;&lt;P&gt;      if values_in-text &amp;lt;&amp;gt; ''.&lt;/P&gt;&lt;P&gt;        attributes_in-num1 = 2.&lt;/P&gt;&lt;P&gt;        attributes_in-num2 = 1.&lt;/P&gt;&lt;P&gt;        modify attributes_in.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        ws_attributes_delete-text = attributes_in-text.&lt;/P&gt;&lt;P&gt;        append ws_attributes_delete.&lt;/P&gt;&lt;P&gt;        delete attributes_in.&lt;/P&gt;&lt;P&gt;        delete values_in index ws_attribute_index.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If attribute isn't on active directory create it&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      if values_in-text &amp;lt;&amp;gt; ''.&lt;/P&gt;&lt;P&gt;        " if values exists, then create it - otherwise remove&lt;/P&gt;&lt;P&gt;        attributes_in-num1 = 0.&lt;/P&gt;&lt;P&gt;        attributes_in-num2 = 1.&lt;/P&gt;&lt;P&gt;        modify attributes_in.&lt;/P&gt;&lt;P&gt;      else.&lt;/P&gt;&lt;P&gt;        delete attributes_in.&lt;/P&gt;&lt;P&gt;        delete values_in index ws_attribute_index.&lt;/P&gt;&lt;P&gt;      endif.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*CONCATENATE 'CN=' ALIAS ',OU=MEMBERS,O=ADI INTERNET' INTO SEARCH_TERM_2&lt;/P&gt;&lt;P&gt;  LOOP AT DNS_OUT.&lt;/P&gt;&lt;P&gt;    SEARCH_TERM_2 = DNS_OUT-TEXT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;only execute modify if there's anything to be updated&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  describe table attributes_in lines ws_attribute_lines.&lt;/P&gt;&lt;P&gt;  if ws_attribute_lines &amp;gt; 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'LDAP_MODIFY'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        DN           = SEARCH_TERM_2&lt;/P&gt;&lt;P&gt;        MODE         = 'C'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        ATTRS_IN     = attributes_in&lt;/P&gt;&lt;P&gt;        VALUES_IN    = values_in&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        NO_AUTHORIZ  = 1&lt;/P&gt;&lt;P&gt;        CONN_OUTDATE = 2&lt;/P&gt;&lt;P&gt;        PARAM_ERROR  = 3&lt;/P&gt;&lt;P&gt;        LDAP_FAILURE = 4&lt;/P&gt;&lt;P&gt;        HEXVAL_ERROR = 5&lt;/P&gt;&lt;P&gt;        NOT_ALIVE    = 6&lt;/P&gt;&lt;P&gt;        OTHER_ERROR  = 7&lt;/P&gt;&lt;P&gt;        OTHERS       = 8.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;If any attributes need to be deleted, loop through&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;them one by one to remove (getting syntax errors when&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I try to delete them all at one time).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  loop at ws_attributes_delete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    clear: attrs_io, values_io.&lt;/P&gt;&lt;P&gt;    refresh: attrs_io, values_io.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    attrs_io-text = ws_attributes_delete-text.&lt;/P&gt;&lt;P&gt;    attrs_io-num1 = 1.&lt;/P&gt;&lt;P&gt;    attrs_io-num2 = 1.&lt;/P&gt;&lt;P&gt;    append attrs_io.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'LDAP_MODIFY'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        DN           = SEARCH_TERM_2&lt;/P&gt;&lt;P&gt;        MODE         = 'C'&lt;/P&gt;&lt;P&gt;      TABLES&lt;/P&gt;&lt;P&gt;        ATTRS_IN     = attrs_io&lt;/P&gt;&lt;P&gt;        VALUES_IN    = values_io&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        NO_AUTHORIZ  = 1&lt;/P&gt;&lt;P&gt;        CONN_OUTDATE = 2&lt;/P&gt;&lt;P&gt;        PARAM_ERROR  = 3&lt;/P&gt;&lt;P&gt;        LDAP_FAILURE = 4&lt;/P&gt;&lt;P&gt;        HEXVAL_ERROR = 5&lt;/P&gt;&lt;P&gt;        NOT_ALIVE    = 6&lt;/P&gt;&lt;P&gt;        OTHER_ERROR  = 7&lt;/P&gt;&lt;P&gt;        OTHERS       = 8.&lt;/P&gt;&lt;P&gt;    IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*unbind----&lt;/P&gt;&lt;HR originaltext="------------------------------------------" /&gt;&lt;P&gt;  CALL FUNCTION 'LDAP_UNBIND'&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      CONN_OUTDATE = 1&lt;/P&gt;&lt;P&gt;      LDAP_FAILURE = 2&lt;/P&gt;&lt;P&gt;      NOT_ALIVE    = 3&lt;/P&gt;&lt;P&gt;      OTHER_ERROR  = 4&lt;/P&gt;&lt;P&gt;      OTHERS       = 5.&lt;/P&gt;&lt;P&gt;  IF SY-SUBRC &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;P&gt;            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFUNCTION.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2007 07:37:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/querying-the-ldap/m-p/3010314#M711369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-02T07:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Querying the LDAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/querying-the-ldap/m-p/3010315#M711370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jyoti,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I using ECC6.0 and triny to exicute your set code ...but it is giving me error in LDAP_SERCH fm as LDAP_FAILURE...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz help me in that .....in your code your are givng &lt;/P&gt;&lt;P&gt;BASE = 'OU=WebAdam,DC=Analog,DC=com'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and i m giving 'CN=SAP_HR_LDAP,CN=Users,DC=DEL,DC=SITE,DC=COM' &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is that correct ...frm where i will get the Base information... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz help me in that...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnx&lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rohit Kumar on Aug 25, 2008 3:02 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Aug 2008 09:32:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/querying-the-ldap/m-p/3010315#M711370</guid>
      <dc:creator>RahulKeshav</dc:creator>
      <dc:date>2008-08-25T09:32:23Z</dc:date>
    </item>
  </channel>
</rss>

