SAP Function Modules

LDAP_INTERACTIVE_SELECT SAP Function module







LDAP_INTERACTIVE_SELECT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name LDAP_INTERACTIVE_SELECT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SLDAP
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM LDAP_INTERACTIVE_SELECT - LDAP INTERACTIVE SELECT





CALL FUNCTION 'LDAP_INTERACTIVE_SELECT' "
* EXPORTING
*   serverid =                  " ldapdefs-serv  LDAP Server: Symbolic Name
*   precond =                   " ldapdefs-filt
*   varcond1 =                  " ldapdefs-filt
*   varcond2 =                  " ldapdefs-filt
*   varcond3 =                  " ldapdefs-filt
*   retry = 'X'                 " ldapdefs-flag
*   maxhits = 200               " ldapdefs-numb
*   takeone = ' '               " ldapdefs-flag
  TABLES
    attributes =                " ldap_atii
    selection =                 " ldapdnatva
  EXCEPTIONS
    PARAMETER_ERROR = 1         "               Parameter Error
    LDAP_FAILURE = 2            "
    NOTHING_FOUND = 3           "               Nothing Found
    TOOMANY_HITS = 4            "
    USER_CANCELLED = 5          "               Cancellation by user
    INTERNAL_ERROR = 6          "               Internal Error
    .  "  LDAP_INTERACTIVE_SELECT

ABAP code example for Function Module LDAP_INTERACTIVE_SELECT





The ABAP code below is a full code listing to execute function module LDAP_INTERACTIVE_SELECT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_attributes  TYPE STANDARD TABLE OF LDAP_ATII,"TABLES PARAM
wa_attributes  LIKE LINE OF it_attributes ,
it_selection  TYPE STANDARD TABLE OF LDAPDNATVA,"TABLES PARAM
wa_selection  LIKE LINE OF it_selection .


DATA(ld_serverid) = some text here

DATA(ld_precond) = some text here

DATA(ld_varcond1) = some text here

DATA(ld_varcond2) = some text here

DATA(ld_varcond3) = some text here

DATA(ld_retry) = some text here

DATA(ld_maxhits) = 123

DATA(ld_takeone) = some text here

"populate fields of struture and append to itab
append wa_attributes to it_attributes.

"populate fields of struture and append to itab
append wa_selection to it_selection. . CALL FUNCTION 'LDAP_INTERACTIVE_SELECT' * EXPORTING * serverid = ld_serverid * precond = ld_precond * varcond1 = ld_varcond1 * varcond2 = ld_varcond2 * varcond3 = ld_varcond3 * retry = ld_retry * maxhits = ld_maxhits * takeone = ld_takeone TABLES attributes = it_attributes selection = it_selection EXCEPTIONS PARAMETER_ERROR = 1 LDAP_FAILURE = 2 NOTHING_FOUND = 3 TOOMANY_HITS = 4 USER_CANCELLED = 5 INTERNAL_ERROR = 6 . " LDAP_INTERACTIVE_SELECT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_serverid  TYPE LDAPDEFS-SERV ,
it_attributes  TYPE STANDARD TABLE OF LDAP_ATII ,
wa_attributes  LIKE LINE OF it_attributes,
ld_precond  TYPE LDAPDEFS-FILT ,
it_selection  TYPE STANDARD TABLE OF LDAPDNATVA ,
wa_selection  LIKE LINE OF it_selection,
ld_varcond1  TYPE LDAPDEFS-FILT ,
ld_varcond2  TYPE LDAPDEFS-FILT ,
ld_varcond3  TYPE LDAPDEFS-FILT ,
ld_retry  TYPE LDAPDEFS-FLAG ,
ld_maxhits  TYPE LDAPDEFS-NUMB ,
ld_takeone  TYPE LDAPDEFS-FLAG .


ld_serverid = some text here

"populate fields of struture and append to itab
append wa_attributes to it_attributes.

ld_precond = some text here

"populate fields of struture and append to itab
append wa_selection to it_selection.

ld_varcond1 = some text here

ld_varcond2 = some text here

ld_varcond3 = some text here

ld_retry = some text here

ld_maxhits = 123

ld_takeone = some text here

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name LDAP_INTERACTIVE_SELECT or its description.