SAP TERM_UPDATE Function Module for Save term module









TERM_UPDATE is a standard term update SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Save term module 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 update FM, simply by entering the name TERM_UPDATE 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_UPDATE 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_UPDATE'"Save term module
EXPORTING
* ANLEGDATUM = SY-DATUM "
* START_RELEASE = ' ' "
* CHANGED_RELEASE = ' ' "
* ANLEGER = SY-UNAME "
APPLIKKZ = "
BEGRIFF = "
GELENKNR = "
* GENUS = ' ' "
* KATEGORIE = ' ' "
* SPRACHE = ' ' "
* STATUS = ' ' "

IMPORTING
RETCODE = "

TABLES
ITERMATTR = "
.



IMPORTING Parameters details for TERM_UPDATE

ANLEGDATUM -

Data type: TERM6-ADATUM
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

START_RELEASE -

Data type: TERM6-RELEASE_F
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHANGED_RELEASE -

Data type: TERM6-RELEASE_L
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

ANLEGER -

Data type: TERM6-ANLEGER
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

APPLIKKZ -

Data type: TERM6-APPLIKKZ
Optional: No
Call by Reference: No ( called with pass by value option)

BEGRIFF -

Data type: TERM6-BEGRIFF
Optional: No
Call by Reference: No ( called with pass by value option)

GELENKNR -

Data type: TERM8-GELENKNR
Optional: No
Call by Reference: No ( called with pass by value option)

GENUS -

Data type: TERM6-GENIUS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

KATEGORIE -

Data type: TERM6-KATEGORIE
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SPRACHE -

Data type: TERM6-SPRAS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

STATUS -

Data type: TERM6-STATUS
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for TERM_UPDATE

RETCODE -

Data type: SY-SUBRC
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for TERM_UPDATE

ITERMATTR -

Data type: TERMATTR
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for TERM_UPDATE 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_retcode  TYPE SY-SUBRC, "   
lt_itermattr  TYPE STANDARD TABLE OF TERMATTR, "   
lv_anlegdatum  TYPE TERM6-ADATUM, "   SY-DATUM
lv_start_release  TYPE TERM6-RELEASE_F, "   SPACE
lv_changed_release  TYPE TERM6-RELEASE_L, "   SPACE
lv_anleger  TYPE TERM6-ANLEGER, "   SY-UNAME
lv_applikkz  TYPE TERM6-APPLIKKZ, "   
lv_begriff  TYPE TERM6-BEGRIFF, "   
lv_gelenknr  TYPE TERM8-GELENKNR, "   
lv_genus  TYPE TERM6-GENIUS, "   SPACE
lv_kategorie  TYPE TERM6-KATEGORIE, "   SPACE
lv_sprache  TYPE TERM6-SPRAS, "   SPACE
lv_status  TYPE TERM6-STATUS. "   SPACE

  CALL FUNCTION 'TERM_UPDATE'  "Save term module
    EXPORTING
         ANLEGDATUM = lv_anlegdatum
         START_RELEASE = lv_start_release
         CHANGED_RELEASE = lv_changed_release
         ANLEGER = lv_anleger
         APPLIKKZ = lv_applikkz
         BEGRIFF = lv_begriff
         GELENKNR = lv_gelenknr
         GENUS = lv_genus
         KATEGORIE = lv_kategorie
         SPRACHE = lv_sprache
         STATUS = lv_status
    IMPORTING
         RETCODE = lv_retcode
    TABLES
         ITERMATTR = lt_itermattr
. " TERM_UPDATE




ABAP code using 7.40 inline data declarations to call FM TERM_UPDATE

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 ADATUM FROM TERM6 INTO @DATA(ld_anlegdatum).
DATA(ld_anlegdatum) = SY-DATUM.
 
"SELECT single RELEASE_F FROM TERM6 INTO @DATA(ld_start_release).
DATA(ld_start_release) = ' '.
 
"SELECT single RELEASE_L FROM TERM6 INTO @DATA(ld_changed_release).
DATA(ld_changed_release) = ' '.
 
"SELECT single ANLEGER FROM TERM6 INTO @DATA(ld_anleger).
DATA(ld_anleger) = SY-UNAME.
 
"SELECT single APPLIKKZ FROM TERM6 INTO @DATA(ld_applikkz).
 
"SELECT single BEGRIFF FROM TERM6 INTO @DATA(ld_begriff).
 
"SELECT single GELENKNR FROM TERM8 INTO @DATA(ld_gelenknr).
 
"SELECT single GENIUS FROM TERM6 INTO @DATA(ld_genus).
DATA(ld_genus) = ' '.
 
"SELECT single KATEGORIE FROM TERM6 INTO @DATA(ld_kategorie).
DATA(ld_kategorie) = ' '.
 
"SELECT single SPRAS FROM TERM6 INTO @DATA(ld_sprache).
DATA(ld_sprache) = ' '.
 
"SELECT single STATUS FROM TERM6 INTO @DATA(ld_status).
DATA(ld_status) = ' '.
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!