Search code examples
active-directoryldapabapsap-basisfunction-module

LDAPMAP - Mapping SAP data to LDAP via RSLDAPSYNC_USER function


We are looking at syncing some of our LDAP (Active Directory) data with what is stored in SAP. SAP provides several function modules that allow you to write a custom program to handle mapping the data, but we are looking to use the provided solution that makes use of RSLDAPSYNC_USER.

The issue I'm having is understanding how the mapping of fields is performed in LDAPMAP. In particular, when performing the Mapping Overview, where are the structures as shown below defined?

enter image description here

Also, we have a function module that is currently available for grabbing all of the fields we would like to send to LDAP, but can the screen shown below be used to call a custom function module to grab the data I require? If so, then please give an example.

enter image description here

Thanks, Mike


Solution

  • I am not sure if that is what you ask. As an answer to your second question:

    You can give attributes that you want to get. The LDAP_READ function will return the results in entries parameter.

        CALL FUNCTION 'LDAP_READ'
          EXPORTING
            base         = base
    *       scope        = 2
            filter       = filter
    *       attributes   = attributes_ldap
            timeout      = s_timeout
            attributes   = t_attributes_ldap
          IMPORTING
            entries      = t_entries_ldap              "<< entries will come
          EXCEPTIONS
            no_authoriz  = 1
            conn_outdate = 2
            ldap_failure = 3
            not_alive    = 4
            other_error  = 5
            OTHERS       = 6.
    

    Entries parameter looks like: enter image description here

    Attributes parameter looks like:

    Attributes parameter looks like