SAP SOTR_GET_TEXT_KEY Function Module for
SOTR_GET_TEXT_KEY is a standard sotr get text key 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 sotr get text key FM, simply by entering the name SOTR_GET_TEXT_KEY into the relevant SAP transaction such as SE37 or SE38.
Function Group: SOTR_DB_READ
Program Name: SAPLSOTR_DB_READ
Main Program: SAPLSOTR_DB_READ
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function SOTR_GET_TEXT_KEY 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 'SOTR_GET_TEXT_KEY'".
EXPORTING
* CONCEPT = "
* ALIAS = "
* LFD_NUM = 0001 "Sequence Number in the OTR
* LANGU = SY-LANGU "Language
* CONTEXT = "Context
* SEARCH_IN_SECOND_LANGU = 'X' "
* SECOND_LANGU = "
* SEARCH_IN_THIRD_LANGU = "
* THIRD_LANGU = "
IMPORTING
E_TEXT = "Text Field
E_LANGU = "
E_MASTERLANGU = "Master Language
EXCEPTIONS
NO_ENTRY_FOUND = 1 PARAMETER_ERROR = 2
IMPORTING Parameters details for SOTR_GET_TEXT_KEY
CONCEPT -
Data type: SOTR_CONCOptional: Yes
Call by Reference: No ( called with pass by value option)
ALIAS -
Data type: SOTR_ALIASOptional: Yes
Call by Reference: No ( called with pass by value option)
LFD_NUM - Sequence Number in the OTR
Data type: SOTR_NUMDefault: 0001
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGU - Language
Data type: SYLANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
CONTEXT - Context
Data type: SOTR_CNTXTOptional: Yes
Call by Reference: No ( called with pass by value option)
SEARCH_IN_SECOND_LANGU -
Data type: AS4FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SECOND_LANGU -
Data type: SYLANGUOptional: Yes
Call by Reference: No ( called with pass by value option)
SEARCH_IN_THIRD_LANGU -
Data type: AS4FLAGOptional: Yes
Call by Reference: No ( called with pass by value option)
THIRD_LANGU -
Data type: SYLANGUOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for SOTR_GET_TEXT_KEY
E_TEXT - Text Field
Data type: SOTR_TXTOptional: No
Call by Reference: No ( called with pass by value option)
E_LANGU -
Data type: SYLANGUOptional: No
Call by Reference: No ( called with pass by value option)
E_MASTERLANGU - Master Language
Data type: SYLANGUOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_ENTRY_FOUND -
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 SOTR_GET_TEXT_KEY 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_e_text | TYPE SOTR_TXT, " | |||
| lv_concept | TYPE SOTR_CONC, " | |||
| lv_no_entry_found | TYPE SOTR_CONC, " | |||
| lv_alias | TYPE SOTR_ALIAS, " | |||
| lv_e_langu | TYPE SYLANGU, " | |||
| lv_parameter_error | TYPE SYLANGU, " | |||
| lv_lfd_num | TYPE SOTR_NUM, " 0001 | |||
| lv_e_masterlangu | TYPE SYLANGU, " | |||
| lv_langu | TYPE SYLANGU, " SY-LANGU | |||
| lv_context | TYPE SOTR_CNTXT, " | |||
| lv_search_in_second_langu | TYPE AS4FLAG, " 'X' | |||
| lv_second_langu | TYPE SYLANGU, " | |||
| lv_search_in_third_langu | TYPE AS4FLAG, " | |||
| lv_third_langu | TYPE SYLANGU. " |
|   CALL FUNCTION 'SOTR_GET_TEXT_KEY' " |
| EXPORTING | ||
| CONCEPT | = lv_concept | |
| ALIAS | = lv_alias | |
| LFD_NUM | = lv_lfd_num | |
| LANGU | = lv_langu | |
| CONTEXT | = lv_context | |
| SEARCH_IN_SECOND_LANGU | = lv_search_in_second_langu | |
| SECOND_LANGU | = lv_second_langu | |
| SEARCH_IN_THIRD_LANGU | = lv_search_in_third_langu | |
| THIRD_LANGU | = lv_third_langu | |
| IMPORTING | ||
| E_TEXT | = lv_e_text | |
| E_LANGU | = lv_e_langu | |
| E_MASTERLANGU | = lv_e_masterlangu | |
| EXCEPTIONS | ||
| NO_ENTRY_FOUND = 1 | ||
| PARAMETER_ERROR = 2 | ||
| . " SOTR_GET_TEXT_KEY | ||
ABAP code using 7.40 inline data declarations to call FM SOTR_GET_TEXT_KEY
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_lfd_num) | = 0001. | |||
| DATA(ld_langu) | = SY-LANGU. | |||
| DATA(ld_search_in_second_langu) | = 'X'. | |||
Search for further information about these or an SAP related objects