SAP RSTH_HIERARCHY_TEST Function Module for NOTRANSL: Prüft einen Hierarchienamen auf Existenz und liefert den TEXT









RSTH_HIERARCHY_TEST is a standard rsth hierarchy test 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: Prüft einen Hierarchienamen auf Existenz und liefert den TEXT 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 rsth hierarchy test FM, simply by entering the name RSTH_HIERARCHY_TEST into the relevant SAP transaction such as SE37 or SE38.

Function Group: RSTH
Program Name: SAPLRSTH
Main Program: SAPLRSTH
Appliation area: K
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RSTH_HIERARCHY_TEST 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 'RSTH_HIERARCHY_TEST'"NOTRANSL: Prüft einen Hierarchienamen auf Existenz und liefert den TEXT
EXPORTING
* APPLCLASS = "Application class for DD objects (not used)
* CHECK = 'X' "
* FBNAM = "Name of Function Module
I_RSTHVKEY = "BRST key fields for hierarchy directory
* I_SEL = "
* REQUESTER = "BRST sender / Tool
* WITH_TEXT = 'X' "

IMPORTING
TEXT20 = "Medium Field Label
TEXT60 = "KE 60-character description in RKB1T

EXCEPTIONS
FM_NOT_EXIST = 1 KEY_NOT_EXIST = 2
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLRSTH_001 Deliver Hierarchy Information
EXIT_SAPLRSTH_002 User-defined Hierarchies

IMPORTING Parameters details for RSTH_HIERARCHY_TEST

APPLCLASS - Application class for DD objects (not used)

Data type: RKB1D-APPLCLASS
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHECK -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

FBNAM - Name of Function Module

Data type: RS38L-NAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_RSTHVKEY - BRST key fields for hierarchy directory

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

I_SEL -

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

REQUESTER - BRST sender / Tool

Data type: RSTHDIVERS-REQUESTER
Optional: Yes
Call by Reference: No ( called with pass by value option)

WITH_TEXT -

Data type:
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for RSTH_HIERARCHY_TEST

TEXT20 - Medium Field Label

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

TEXT60 - KE 60-character description in RKB1T

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

EXCEPTIONS details

FM_NOT_EXIST -

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

KEY_NOT_EXIST -

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

Copy and paste ABAP code example for RSTH_HIERARCHY_TEST 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_text20  TYPE RKB1T-TEXT, "   
lv_applclass  TYPE RKB1D-APPLCLASS, "   
lv_fm_not_exist  TYPE RKB1D, "   
lv_check  TYPE RKB1D, "   'X'
lv_text60  TYPE RKB1T-TEXT_L, "   
lv_key_not_exist  TYPE RKB1T, "   
lv_fbnam  TYPE RS38L-NAME, "   
lv_i_rsthvkey  TYPE RSTHVKEY, "   
lv_i_sel  TYPE RSTHVKEY, "   
lv_requester  TYPE RSTHDIVERS-REQUESTER, "   
lv_with_text  TYPE RSTHDIVERS. "   'X'

  CALL FUNCTION 'RSTH_HIERARCHY_TEST'  "NOTRANSL: Prüft einen Hierarchienamen auf Existenz und liefert den TEXT
    EXPORTING
         APPLCLASS = lv_applclass
         CHECK = lv_check
         FBNAM = lv_fbnam
         I_RSTHVKEY = lv_i_rsthvkey
         I_SEL = lv_i_sel
         REQUESTER = lv_requester
         WITH_TEXT = lv_with_text
    IMPORTING
         TEXT20 = lv_text20
         TEXT60 = lv_text60
    EXCEPTIONS
        FM_NOT_EXIST = 1
        KEY_NOT_EXIST = 2
. " RSTH_HIERARCHY_TEST




ABAP code using 7.40 inline data declarations to call FM RSTH_HIERARCHY_TEST

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 TEXT FROM RKB1T INTO @DATA(ld_text20).
 
"SELECT single APPLCLASS FROM RKB1D INTO @DATA(ld_applclass).
 
 
DATA(ld_check) = 'X'.
 
"SELECT single TEXT_L FROM RKB1T INTO @DATA(ld_text60).
 
 
"SELECT single NAME FROM RS38L INTO @DATA(ld_fbnam).
 
 
 
"SELECT single REQUESTER FROM RSTHDIVERS INTO @DATA(ld_requester).
 
DATA(ld_with_text) = 'X'.
 


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!