SAP TEXT_SEQUENTIAL_SEARCH_1 Function Module for Sequential search with search term entry
TEXT_SEQUENTIAL_SEARCH_1 is a standard text sequential search 1 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Sequential search with search term entry 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 text sequential search 1 FM, simply by entering the name TEXT_SEQUENTIAL_SEARCH_1 into the relevant SAP transaction such as SE37 or SE38.
Function Group: SFSC
Program Name: SAPLSFSC
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TEXT_SEQUENTIAL_SEARCH_1 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 'TEXT_SEQUENTIAL_SEARCH_1'"Sequential search with search term entry.
EXPORTING
DYNPRO_INPUT = "Indicator for screen entry (='X')
FIRST_CALL = "Indicator for first call (='X')
* LANGUAGE = 'D' "Language indicator
OLD_COUNT = "Number of previous hits
IMPORTING
FIRST_CALL = "Indicator for first call (='X')
NEW_COUNT = "Number of hits
RESULT = "Result: 'X' = found, ' ' = not f
TABLES
SEARCHTAB = "Search term
TEXT = "Text to be scanned
EXCEPTIONS
CANCELLED = 1 INTERN_ERROR = 2 LOGIC_INVALID = 3 SEARCHTAB_EMPTY = 4 SEARCHTAB_TOO_LONG = 5 SEARCHTAB_UNCHECKED = 6 WORD_AND_LOGIC_INVALID = 7 WORD_INVALID = 8
IMPORTING Parameters details for TEXT_SEQUENTIAL_SEARCH_1
DYNPRO_INPUT - Indicator for screen entry (='X')
Data type: RSFIN-BOOLOptional: No
Call by Reference: No ( called with pass by value option)
FIRST_CALL - Indicator for first call (='X')
Data type: RSFIN-BOOLOptional: No
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language indicator
Data type: SY-LANGUDefault: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)
OLD_COUNT - Number of previous hits
Data type: FIST-HITSOptional: No
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TEXT_SEQUENTIAL_SEARCH_1
FIRST_CALL - Indicator for first call (='X')
Data type: RSFIN-BOOLOptional: No
Call by Reference: No ( called with pass by value option)
NEW_COUNT - Number of hits
Data type: FIST-HITSOptional: No
Call by Reference: No ( called with pass by value option)
RESULT - Result: 'X' = found, SPACE = not f
Data type: RSFIN-BOOLOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TEXT_SEQUENTIAL_SEARCH_1
SEARCHTAB - Search term
Data type: FISTOptional: No
Call by Reference: No ( called with pass by value option)
TEXT - Text to be scanned
Data type: TLINEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CANCELLED - Entry cancelled.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERN_ERROR - Internal error.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOGIC_INVALID - Incorrect logical link.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SEARCHTAB_EMPTY - Search term is empty.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SEARCHTAB_TOO_LONG - Search term is too complex.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SEARCHTAB_UNCHECKED - Search term not checked.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WORD_AND_LOGIC_INVALID - Invalid search term and logic erro
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WORD_INVALID - Invalid search term or operator.
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TEXT_SEQUENTIAL_SEARCH_1 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_cancelled | TYPE STRING, " | |||
| lt_searchtab | TYPE STANDARD TABLE OF FIST, " | |||
| lv_first_call | TYPE RSFIN-BOOL, " | |||
| lv_dynpro_input | TYPE RSFIN-BOOL, " | |||
| lt_text | TYPE STANDARD TABLE OF TLINE, " | |||
| lv_new_count | TYPE FIST-HITS, " | |||
| lv_first_call | TYPE RSFIN-BOOL, " | |||
| lv_intern_error | TYPE RSFIN, " | |||
| lv_result | TYPE RSFIN-BOOL, " | |||
| lv_language | TYPE SY-LANGU, " 'D' | |||
| lv_logic_invalid | TYPE SY, " | |||
| lv_old_count | TYPE FIST-HITS, " | |||
| lv_searchtab_empty | TYPE FIST, " | |||
| lv_searchtab_too_long | TYPE FIST, " | |||
| lv_searchtab_unchecked | TYPE FIST, " | |||
| lv_word_and_logic_invalid | TYPE FIST, " | |||
| lv_word_invalid | TYPE FIST. " |
|   CALL FUNCTION 'TEXT_SEQUENTIAL_SEARCH_1' "Sequential search with search term entry |
| EXPORTING | ||
| DYNPRO_INPUT | = lv_dynpro_input | |
| FIRST_CALL | = lv_first_call | |
| LANGUAGE | = lv_language | |
| OLD_COUNT | = lv_old_count | |
| IMPORTING | ||
| FIRST_CALL | = lv_first_call | |
| NEW_COUNT | = lv_new_count | |
| RESULT | = lv_result | |
| TABLES | ||
| SEARCHTAB | = lt_searchtab | |
| TEXT | = lt_text | |
| EXCEPTIONS | ||
| CANCELLED = 1 | ||
| INTERN_ERROR = 2 | ||
| LOGIC_INVALID = 3 | ||
| SEARCHTAB_EMPTY = 4 | ||
| SEARCHTAB_TOO_LONG = 5 | ||
| SEARCHTAB_UNCHECKED = 6 | ||
| WORD_AND_LOGIC_INVALID = 7 | ||
| WORD_INVALID = 8 | ||
| . " TEXT_SEQUENTIAL_SEARCH_1 | ||
ABAP code using 7.40 inline data declarations to call FM TEXT_SEQUENTIAL_SEARCH_1
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.| "SELECT single BOOL FROM RSFIN INTO @DATA(ld_first_call). | ||||
| "SELECT single BOOL FROM RSFIN INTO @DATA(ld_dynpro_input). | ||||
| "SELECT single HITS FROM FIST INTO @DATA(ld_new_count). | ||||
| "SELECT single BOOL FROM RSFIN INTO @DATA(ld_first_call). | ||||
| "SELECT single BOOL FROM RSFIN INTO @DATA(ld_result). | ||||
| "SELECT single LANGU FROM SY INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = 'D'. | |||
| "SELECT single HITS FROM FIST INTO @DATA(ld_old_count). | ||||
Search for further information about these or an SAP related objects