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

Function TERM_GET_USAGE 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_GET_USAGE'"TERM_GET_USAGE.
EXPORTING
CONCEPT = "CHAR32 data element for SYST
* DISPLAY_USAGE = ' ' "Indicator
* USAGE_TYPE = ' ' "CHAR32 data element for SYST
* TITEL = "Documentation Object
* WITH_DIALOG = ' ' "Indicator
TABLES
* REFERENCES = "References to Term Entries
EXCEPTIONS
ENTRY_NOT_FOUND = 1
IMPORTING Parameters details for TERM_GET_USAGE
CONCEPT - CHAR32 data element for SYST
Data type: STERM_HEAD-CONCEPTOptional: No
Call by Reference: No ( called with pass by value option)
DISPLAY_USAGE - Indicator
Data type: BAPIFLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
USAGE_TYPE - CHAR32 data element for SYST
Data type: SYCHAR32Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TITEL - Documentation Object
Data type: STERM_REF-OBJ_NAMEOptional: Yes
Call by Reference: No ( called with pass by value option)
WITH_DIALOG - Indicator
Data type: BAPIFLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TERM_GET_USAGE
REFERENCES - References to Term Entries
Data type: STERM_REFOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ENTRY_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TERM_GET_USAGE 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_concept | TYPE STERM_HEAD-CONCEPT, " | |||
| lt_references | TYPE STANDARD TABLE OF STERM_REF, " | |||
| lv_entry_not_found | TYPE STERM_REF, " | |||
| lv_display_usage | TYPE BAPIFLAG, " ' ' | |||
| lv_usage_type | TYPE SYCHAR32, " ' ' | |||
| lv_titel | TYPE STERM_REF-OBJ_NAME, " | |||
| lv_with_dialog | TYPE BAPIFLAG. " ' ' |
|   CALL FUNCTION 'TERM_GET_USAGE' "TERM_GET_USAGE |
| EXPORTING | ||
| CONCEPT | = lv_concept | |
| DISPLAY_USAGE | = lv_display_usage | |
| USAGE_TYPE | = lv_usage_type | |
| TITEL | = lv_titel | |
| WITH_DIALOG | = lv_with_dialog | |
| TABLES | ||
| REFERENCES | = lt_references | |
| EXCEPTIONS | ||
| ENTRY_NOT_FOUND = 1 | ||
| . " TERM_GET_USAGE | ||
ABAP code using 7.40 inline data declarations to call FM TERM_GET_USAGE
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 CONCEPT FROM STERM_HEAD INTO @DATA(ld_concept). | ||||
| DATA(ld_display_usage) | = ' '. | |||
| DATA(ld_usage_type) | = ' '. | |||
| "SELECT single OBJ_NAME FROM STERM_REF INTO @DATA(ld_titel). | ||||
| DATA(ld_with_dialog) | = ' '. | |||
Search for further information about these or an SAP related objects