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

Function TERM_MOVE 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 'TERM_MOVE'"Terminology: Replace a term.
EXPORTING
TERM_OLD = "Term to be replaced
TERM_NEW = "New term
APPLIC_OLD = "Source path number
APPLIC_NEW = "Target path number
* LANGUAGE = SY-LANGU "Language
IMPORTING
RETCODE = "Successful replacement = 0, otherwise = 4
EXCEPTIONS
TERM = 1 NO_TERM = 2 TERM_UPDATE = 3 TERM_DELETE = 4
IMPORTING Parameters details for TERM_MOVE
TERM_OLD - Term to be replaced
Data type: TERM6-BEGRIFFOptional: No
Call by Reference: No ( called with pass by value option)
TERM_NEW - New term
Data type: TERM6-BEGRIFFOptional: No
Call by Reference: No ( called with pass by value option)
APPLIC_OLD - Source path number
Data type: TERM6-APPLIKKZOptional: No
Call by Reference: No ( called with pass by value option)
APPLIC_NEW - Target path number
Data type: TERM6-APPLIKKZOptional: No
Call by Reference: No ( called with pass by value option)
LANGUAGE - Language
Data type: TERM6-SPRASDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TERM_MOVE
RETCODE - Successful replacement = 0, otherwise = 4
Data type: SY-SUBRCOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
TERM -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_TERM -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TERM_UPDATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TERM_DELETE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TERM_MOVE 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_term | TYPE STRING, " | |||
| lv_retcode | TYPE SY-SUBRC, " | |||
| lv_term_old | TYPE TERM6-BEGRIFF, " | |||
| lv_no_term | TYPE TERM6, " | |||
| lv_term_new | TYPE TERM6-BEGRIFF, " | |||
| lv_applic_old | TYPE TERM6-APPLIKKZ, " | |||
| lv_term_update | TYPE TERM6, " | |||
| lv_applic_new | TYPE TERM6-APPLIKKZ, " | |||
| lv_term_delete | TYPE TERM6, " | |||
| lv_language | TYPE TERM6-SPRAS. " SY-LANGU |
|   CALL FUNCTION 'TERM_MOVE' "Terminology: Replace a term |
| EXPORTING | ||
| TERM_OLD | = lv_term_old | |
| TERM_NEW | = lv_term_new | |
| APPLIC_OLD | = lv_applic_old | |
| APPLIC_NEW | = lv_applic_new | |
| LANGUAGE | = lv_language | |
| IMPORTING | ||
| RETCODE | = lv_retcode | |
| EXCEPTIONS | ||
| TERM = 1 | ||
| NO_TERM = 2 | ||
| TERM_UPDATE = 3 | ||
| TERM_DELETE = 4 | ||
| . " TERM_MOVE | ||
ABAP code using 7.40 inline data declarations to call FM TERM_MOVE
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 SUBRC FROM SY INTO @DATA(ld_retcode). | ||||
| "SELECT single BEGRIFF FROM TERM6 INTO @DATA(ld_term_old). | ||||
| "SELECT single BEGRIFF FROM TERM6 INTO @DATA(ld_term_new). | ||||
| "SELECT single APPLIKKZ FROM TERM6 INTO @DATA(ld_applic_old). | ||||
| "SELECT single APPLIKKZ FROM TERM6 INTO @DATA(ld_applic_new). | ||||
| "SELECT single SPRAS FROM TERM6 INTO @DATA(ld_language). | ||||
| DATA(ld_language) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects