SAP LDAP_DELAYED_AUTH_PREPARE Function Module for Delayed Authentication Step 1: Find in Directory









LDAP_DELAYED_AUTH_PREPARE is a standard ldap delayed auth prepare SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Delayed Authentication Step 1: Find in Directory processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for ldap delayed auth prepare FM, simply by entering the name LDAP_DELAYED_AUTH_PREPARE into the relevant SAP transaction such as SE37 or SE38.

Function Group: SLDAP_DELAYED_AUTH
Program Name: SAPLSLDAP_DELAYED_AUTH
Main Program: SAPLSLDAP_DELAYED_AUTH
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function LDAP_DELAYED_AUTH_PREPARE pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'LDAP_DELAYED_AUTH_PREPARE'"Delayed Authentication Step 1: Find in Directory
EXPORTING
* IV_USERID = "User Name in User Master Record
* IV_SERVERID = "Symbolic name of LDAP server
* IV_ALLOW_INSECURE_LDAP = ' ' "Use of insecure LDAP connection permitted

IMPORTING
EV_TOKEN = "Token for LDAP_DELAYED_AUTH_EXECUTE
EV_SERVERID = "Symbolic name of LDAP server
EV_USER_DN = "Distinguished name in directory

EXCEPTIONS
NOT_AVAILABLE_FOR_THIS_USER = 1 SYSTEM_ERROR_INSECURE_LDAP = 2 SYSTEM_ERROR = 3
.



IMPORTING Parameters details for LDAP_DELAYED_AUTH_PREPARE

IV_USERID - User Name in User Master Record

Data type: XUBNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_SERVERID - Symbolic name of LDAP server

Data type: LDAP_SERV
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_ALLOW_INSECURE_LDAP - Use of insecure LDAP connection permitted

Data type: BOOLE_D
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for LDAP_DELAYED_AUTH_PREPARE

EV_TOKEN - Token for LDAP_DELAYED_AUTH_EXECUTE

Data type: XSTRING
Optional: No
Call by Reference: No ( called with pass by value option)

EV_SERVERID - Symbolic name of LDAP server

Data type: LDAP_SERV
Optional: No
Call by Reference: No ( called with pass by value option)

EV_USER_DN - Distinguished name in directory

Data type: LDAP_DNS
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

NOT_AVAILABLE_FOR_THIS_USER - User is not suitable for delayed authentication

Data type:
Optional: No
Call by Reference: Yes

SYSTEM_ERROR_INSECURE_LDAP - Connection to directory service is not secure for password transmission

Data type:
Optional: No
Call by Reference: Yes

SYSTEM_ERROR - Other errors

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for LDAP_DELAYED_AUTH_PREPARE Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_ev_token  TYPE XSTRING, "   
lv_iv_userid  TYPE XUBNAME, "   
lv_not_available_for_this_user  TYPE XUBNAME, "   
lv_ev_serverid  TYPE LDAP_SERV, "   
lv_iv_serverid  TYPE LDAP_SERV, "   
lv_system_error_insecure_ldap  TYPE LDAP_SERV, "   
lv_ev_user_dn  TYPE LDAP_DNS, "   
lv_system_error  TYPE LDAP_DNS, "   
lv_iv_allow_insecure_ldap  TYPE BOOLE_D. "   ' '

  CALL FUNCTION 'LDAP_DELAYED_AUTH_PREPARE'  "Delayed Authentication Step 1: Find in Directory
    EXPORTING
         IV_USERID = lv_iv_userid
         IV_SERVERID = lv_iv_serverid
         IV_ALLOW_INSECURE_LDAP = lv_iv_allow_insecure_ldap
    IMPORTING
         EV_TOKEN = lv_ev_token
         EV_SERVERID = lv_ev_serverid
         EV_USER_DN = lv_ev_user_dn
    EXCEPTIONS
        NOT_AVAILABLE_FOR_THIS_USER = 1
        SYSTEM_ERROR_INSECURE_LDAP = 2
        SYSTEM_ERROR = 3
. " LDAP_DELAYED_AUTH_PREPARE




ABAP code using 7.40 inline data declarations to call FM LDAP_DELAYED_AUTH_PREPARE

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
 
 
DATA(ld_iv_allow_insecure_ldap) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!