SAP CONTROLKEY_TEXT Function Module for NOTRANSL: Langtext für Steuerschlüssel
CONTROLKEY_TEXT is a standard controlkey text SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Langtext für Steuerschlüssel 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 controlkey text FM, simply by entering the name CONTROLKEY_TEXT into the relevant SAP transaction such as SE37 or SE38.
Function Group: CPTA
Program Name: SAPLCPTA
Main Program: SAPLCPTA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CONTROLKEY_TEXT 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 'CONTROLKEY_TEXT'"NOTRANSL: Langtext für Steuerschlüssel.
EXPORTING
LTSCH_IN = "Detailed long text key
* OBJECT = 'CONTROLKEY' "Object class for SAPscript word pr
PLNAW = "Routing/plan/network application
STEUS = "Control key
* TDID = 'T430' "
* TRTYP = 'S' "Operation type
IMPORTING
LTSCH_OUT = "Long text key after word processin
SUBRC_OUT = "Return code
IMPORTING Parameters details for CONTROLKEY_TEXT
LTSCH_IN - Detailed long text key
Data type: T430-LTSCHOptional: No
Call by Reference: No ( called with pass by value option)
OBJECT - Object class for SAPscript word pr
Data type: THEAD-TDOBJECTDefault: 'CONTROLKEY'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PLNAW - Routing/plan/network application
Data type: T430-PLNAWOptional: No
Call by Reference: No ( called with pass by value option)
STEUS - Control key
Data type: T430-STEUSOptional: No
Call by Reference: No ( called with pass by value option)
TDID -
Data type: THEAD-TDIDDefault: 'T430'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TRTYP - Operation type
Data type:Default: 'S'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CONTROLKEY_TEXT
LTSCH_OUT - Long text key after word processin
Data type: T430-LTSCHOptional: No
Call by Reference: No ( called with pass by value option)
SUBRC_OUT - Return code
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CONTROLKEY_TEXT 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_ltsch_in | TYPE T430-LTSCH, " | |||
| lv_ltsch_out | TYPE T430-LTSCH, " | |||
| lv_object | TYPE THEAD-TDOBJECT, " 'CONTROLKEY' | |||
| lv_subrc_out | TYPE SY-SUBRC, " | |||
| lv_plnaw | TYPE T430-PLNAW, " | |||
| lv_steus | TYPE T430-STEUS, " | |||
| lv_tdid | TYPE THEAD-TDID, " 'T430' | |||
| lv_trtyp | TYPE THEAD. " 'S' |
|   CALL FUNCTION 'CONTROLKEY_TEXT' "NOTRANSL: Langtext für Steuerschlüssel |
| EXPORTING | ||
| LTSCH_IN | = lv_ltsch_in | |
| OBJECT | = lv_object | |
| PLNAW | = lv_plnaw | |
| STEUS | = lv_steus | |
| TDID | = lv_tdid | |
| TRTYP | = lv_trtyp | |
| IMPORTING | ||
| LTSCH_OUT | = lv_ltsch_out | |
| SUBRC_OUT | = lv_subrc_out | |
| . " CONTROLKEY_TEXT | ||
ABAP code using 7.40 inline data declarations to call FM CONTROLKEY_TEXT
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 LTSCH FROM T430 INTO @DATA(ld_ltsch_in). | ||||
| "SELECT single LTSCH FROM T430 INTO @DATA(ld_ltsch_out). | ||||
| "SELECT single TDOBJECT FROM THEAD INTO @DATA(ld_object). | ||||
| DATA(ld_object) | = 'CONTROLKEY'. | |||
| "SELECT single SUBRC FROM SY INTO @DATA(ld_subrc_out). | ||||
| "SELECT single PLNAW FROM T430 INTO @DATA(ld_plnaw). | ||||
| "SELECT single STEUS FROM T430 INTO @DATA(ld_steus). | ||||
| "SELECT single TDID FROM THEAD INTO @DATA(ld_tdid). | ||||
| DATA(ld_tdid) | = 'T430'. | |||
| DATA(ld_trtyp) | = 'S'. | |||
Search for further information about these or an SAP related objects