SAP Function Modules

ISMA_SEARCH_QUERY SAP Function module - SDB: Receive a query and send to the search engine







ISMA_SEARCH_QUERY 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 ISMA_SEARCH_QUERY into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM ISMA_SEARCH_QUERY - ISMA SEARCH QUERY





CALL FUNCTION 'ISMA_SEARCH_QUERY' "SDB: Receive a query and send to the search engine
* EXPORTING
*   input_corpus = '2001'       " srtvcorpid
*   input_langu = SY-LANGU      " sy-langu
*   input_query =               " srtv_doc_text
*   input_show_criteria = 'X'   "
*   input_show_dialog = 'X'     "
*   input_release_only = 'X'    "
*   input_max_hits = 0          "
* TABLES
*   input_filter =              " disquery
*   result_symptom =            " ditssm
*   result_solution =           " ditssl
*   result_task =               " disltk
  EXCEPTIONS
    SEARCH_QUERY_FAIL = 1       "
    NO_HIT_FOUND = 2            "
    CANCEL_PRESSED = 3          "
    .  "  ISMA_SEARCH_QUERY

ABAP code example for Function Module ISMA_SEARCH_QUERY





The ABAP code below is a full code listing to execute function module ISMA_SEARCH_QUERY 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_input_filter  TYPE STANDARD TABLE OF DISQUERY,"TABLES PARAM
wa_input_filter  LIKE LINE OF it_input_filter ,
it_result_symptom  TYPE STANDARD TABLE OF DITSSM,"TABLES PARAM
wa_result_symptom  LIKE LINE OF it_result_symptom ,
it_result_solution  TYPE STANDARD TABLE OF DITSSL,"TABLES PARAM
wa_result_solution  LIKE LINE OF it_result_solution ,
it_result_task  TYPE STANDARD TABLE OF DISLTK,"TABLES PARAM
wa_result_task  LIKE LINE OF it_result_task .

DATA(ld_input_corpus) = 'Check type of data required'.
DATA(ld_input_langu) = 'Check type of data required'.
DATA(ld_input_query) = 'Check type of data required'.
DATA(ld_input_show_criteria) = 'some text here'.
DATA(ld_input_show_dialog) = 'some text here'.
DATA(ld_input_release_only) = 'some text here'.
DATA(ld_input_max_hits) = 'some text here'.

"populate fields of struture and append to itab
append wa_input_filter to it_input_filter.

"populate fields of struture and append to itab
append wa_result_symptom to it_result_symptom.

"populate fields of struture and append to itab
append wa_result_solution to it_result_solution.

"populate fields of struture and append to itab
append wa_result_task to it_result_task. . CALL FUNCTION 'ISMA_SEARCH_QUERY' * EXPORTING * input_corpus = ld_input_corpus * input_langu = ld_input_langu * input_query = ld_input_query * input_show_criteria = ld_input_show_criteria * input_show_dialog = ld_input_show_dialog * input_release_only = ld_input_release_only * input_max_hits = ld_input_max_hits * TABLES * input_filter = it_input_filter * result_symptom = it_result_symptom * result_solution = it_result_solution * result_task = it_result_task EXCEPTIONS SEARCH_QUERY_FAIL = 1 NO_HIT_FOUND = 2 CANCEL_PRESSED = 3 . " ISMA_SEARCH_QUERY
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 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_input_corpus  TYPE SRTVCORPID ,
it_input_filter  TYPE STANDARD TABLE OF DISQUERY ,
wa_input_filter  LIKE LINE OF it_input_filter,
ld_input_langu  TYPE SY-LANGU ,
it_result_symptom  TYPE STANDARD TABLE OF DITSSM ,
wa_result_symptom  LIKE LINE OF it_result_symptom,
ld_input_query  TYPE SRTV_DOC_TEXT ,
it_result_solution  TYPE STANDARD TABLE OF DITSSL ,
wa_result_solution  LIKE LINE OF it_result_solution,
ld_input_show_criteria  TYPE STRING ,
it_result_task  TYPE STANDARD TABLE OF DISLTK ,
wa_result_task  LIKE LINE OF it_result_task,
ld_input_show_dialog  TYPE STRING ,
ld_input_release_only  TYPE STRING ,
ld_input_max_hits  TYPE STRING .

ld_input_corpus = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_input_filter to it_input_filter.
ld_input_langu = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_result_symptom to it_result_symptom.
ld_input_query = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_result_solution to it_result_solution.
ld_input_show_criteria = 'some text here'.

"populate fields of struture and append to itab
append wa_result_task to it_result_task.
ld_input_show_dialog = 'some text here'.
ld_input_release_only = 'some text here'.
ld_input_max_hits = '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 ISMA_SEARCH_QUERY or its description.