SAP ADDR_FUZZY_SEARCH Function Module for









ADDR_FUZZY_SEARCH is a standard addr fuzzy search SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 addr fuzzy search FM, simply by entering the name ADDR_FUZZY_SEARCH into the relevant SAP transaction such as SE37 or SE38.

Function Group: SZAS
Program Name: SAPLSZAS
Main Program: SAPLSZAS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function ADDR_FUZZY_SEARCH 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 'ADDR_FUZZY_SEARCH'"
EXPORTING
* DIALOG_ALLOWED = 'X' "Flag: Dialog allowed
* SEARCH_IN_ADDRESS_TYPE_1 = ' ' "Flag: Search in type1 addresses
* SEARCH_IN_ADDRESS_TYPE_2 = ' ' "Flag: Search in type2 addresses
* SEARCH_IN_ADDRESS_TYPE_3 = ' ' "Flag: Search in type3 addresses
* SEARCH_IN_ALL_OBJECT_TYPES = ' ' "Flag: Search in all object types
T_SEARCH_FIELDS = "Search Criteria
T_OBJECT_TYPES_FOR_SEARCH = "Object types to be searched

IMPORTING
T_SEARCH_RESULT = "Search Result
NUMBER_OF_HITS = "Number of Hits
SELECTED_ADDRESS_KEY = "
SELECTED_ADDRESS_TYPE = "
INDEX_INCOMPLETE = "Flag: Search index incomplete
SEARCH_STATUS = "
T_OBJECT_TYPES = "
T_REFERENCE_TABLE = "

EXCEPTIONS
COMMUNICATION_ERROR = 1 INTERNAL_ERROR = 2 SEARCH_INCOMPLETE = 3 PARAMETER_ERROR = 4
.



IMPORTING Parameters details for ADDR_FUZZY_SEARCH

DIALOG_ALLOWED - Flag: Dialog allowed

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

SEARCH_IN_ADDRESS_TYPE_1 - Flag: Search in type1 addresses

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

SEARCH_IN_ADDRESS_TYPE_2 - Flag: Search in type2 addresses

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

SEARCH_IN_ADDRESS_TYPE_3 - Flag: Search in type3 addresses

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

SEARCH_IN_ALL_OBJECT_TYPES - Flag: Search in all object types

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

T_SEARCH_FIELDS - Search Criteria

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

T_OBJECT_TYPES_FOR_SEARCH - Object types to be searched

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

EXPORTING Parameters details for ADDR_FUZZY_SEARCH

T_SEARCH_RESULT - Search Result

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

NUMBER_OF_HITS - Number of Hits

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

SELECTED_ADDRESS_KEY -

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

SELECTED_ADDRESS_TYPE -

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

INDEX_INCOMPLETE - Flag: Search index incomplete

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

SEARCH_STATUS -

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

T_OBJECT_TYPES -

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

T_REFERENCE_TABLE -

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

EXCEPTIONS details

COMMUNICATION_ERROR - Communication error, external index search not possible

Data type:
Optional: No
Call by Reference: Yes

INTERNAL_ERROR - Internal error, external index search not possible

Data type:
Optional: No
Call by Reference: Yes

SEARCH_INCOMPLETE - No search result, e.g. because of inaccurate search criteria

Data type:
Optional: No
Call by Reference: Yes

PARAMETER_ERROR -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for ADDR_FUZZY_SEARCH 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_dialog_allowed  TYPE T_BOOLE, "   'X'
lv_t_search_result  TYPE ADKEY_INDX_TAB, "   
lv_communication_error  TYPE ADKEY_INDX_TAB, "   
lv_internal_error  TYPE ADKEY_INDX_TAB, "   
lv_number_of_hits  TYPE I, "   
lv_search_in_address_type_1  TYPE T_BOOLE, "   SPACE
lv_search_incomplete  TYPE T_BOOLE, "   
lv_selected_address_key  TYPE ADKEY_INDX, "   
lv_search_in_address_type_2  TYPE T_BOOLE, "   SPACE
lv_parameter_error  TYPE T_BOOLE, "   
lv_selected_address_type  TYPE AD_ADRTYPE, "   
lv_search_in_address_type_3  TYPE T_BOOLE, "   SPACE
lv_index_incomplete  TYPE T_BOOLE, "   
lv_search_in_all_object_types  TYPE T_BOOLE, "   SPACE
lv_search_status  TYPE AD_DUPSTAT, "   
lv_t_search_fields  TYPE ADSRCHLIST, "   
lv_t_object_types  TYPE ADOBJLIST, "   
lv_t_object_types_for_search  TYPE ADREF_INDX_TAB, "   
lv_t_reference_table  TYPE SZADR_ADDR_REF_READ_TAB. "   

  CALL FUNCTION 'ADDR_FUZZY_SEARCH'  "
    EXPORTING
         DIALOG_ALLOWED = lv_dialog_allowed
         SEARCH_IN_ADDRESS_TYPE_1 = lv_search_in_address_type_1
         SEARCH_IN_ADDRESS_TYPE_2 = lv_search_in_address_type_2
         SEARCH_IN_ADDRESS_TYPE_3 = lv_search_in_address_type_3
         SEARCH_IN_ALL_OBJECT_TYPES = lv_search_in_all_object_types
         T_SEARCH_FIELDS = lv_t_search_fields
         T_OBJECT_TYPES_FOR_SEARCH = lv_t_object_types_for_search
    IMPORTING
         T_SEARCH_RESULT = lv_t_search_result
         NUMBER_OF_HITS = lv_number_of_hits
         SELECTED_ADDRESS_KEY = lv_selected_address_key
         SELECTED_ADDRESS_TYPE = lv_selected_address_type
         INDEX_INCOMPLETE = lv_index_incomplete
         SEARCH_STATUS = lv_search_status
         T_OBJECT_TYPES = lv_t_object_types
         T_REFERENCE_TABLE = lv_t_reference_table
    EXCEPTIONS
        COMMUNICATION_ERROR = 1
        INTERNAL_ERROR = 2
        SEARCH_INCOMPLETE = 3
        PARAMETER_ERROR = 4
. " ADDR_FUZZY_SEARCH




ABAP code using 7.40 inline data declarations to call FM ADDR_FUZZY_SEARCH

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_dialog_allowed) = 'X'.
 
 
 
 
 
DATA(ld_search_in_address_type_1) = ' '.
 
 
 
DATA(ld_search_in_address_type_2) = ' '.
 
 
 
DATA(ld_search_in_address_type_3) = ' '.
 
 
DATA(ld_search_in_all_object_types) = ' '.
 
 
 
 
 
 


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!