SAP RH_TEXT_GET Function Module for
RH_TEXT_GET is a standard rh text get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 rh text get FM, simply by entering the name RH_TEXT_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: RH_READ_TEXT
Program Name: SAPLRH_READ_TEXT
Main Program:
Appliation area: P
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function RH_TEXT_GET 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 'RH_TEXT_GET'".
EXPORTING
TABNAME = "
RECORD = "
* LANGU = SY-LANGU "
* BEGDAT = SY-DATUM "
* ENDDAT = SY-DATUM "
* TCLAS = 'A' "
* INFTY_0001 = "
* MOLGA = "
* VAR_FIELD = "
TABLES
FIELDS = "
TEXT_TAB = "
EXCEPTIONS
DDIC_ENTRY_NOT_FOUND = 1 INCORRECT_CALL = 2 INTERNAL_ERROR = 3 MISSING_TEXT = 4
IMPORTING Parameters details for RH_TEXT_GET
TABNAME -
Data type: DFIES-TABNAMEOptional: No
Call by Reference: No ( called with pass by value option)
RECORD -
Data type: ANYOptional: No
Call by Reference: No ( called with pass by value option)
LANGU -
Data type: SY-LANGUDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
BEGDAT -
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDAT -
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
TCLAS -
Data type: PME04-TCLASDefault: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
INFTY_0001 -
Data type: P0001Optional: Yes
Call by Reference: No ( called with pass by value option)
MOLGA -
Data type: T001P-MOLGAOptional: Yes
Call by Reference: No ( called with pass by value option)
VAR_FIELD -
Data type: ANYOptional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RH_TEXT_GET
FIELDS -
Data type: RHTEXT_FIELDOptional: No
Call by Reference: No ( called with pass by value option)
TEXT_TAB -
Data type: RHTEXT_TABOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
DDIC_ENTRY_NOT_FOUND -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INCORRECT_CALL -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
MISSING_TEXT -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RH_TEXT_GET 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: | ||||
lt_fields | TYPE STANDARD TABLE OF RHTEXT_FIELD, " | |||
lv_tabname | TYPE DFIES-TABNAME, " | |||
lv_ddic_entry_not_found | TYPE DFIES, " | |||
lv_record | TYPE ANY, " | |||
lt_text_tab | TYPE STANDARD TABLE OF RHTEXT_TAB, " | |||
lv_incorrect_call | TYPE RHTEXT_TAB, " | |||
lv_langu | TYPE SY-LANGU, " SY-LANGU | |||
lv_internal_error | TYPE SY, " | |||
lv_begdat | TYPE SY-DATUM, " SY-DATUM | |||
lv_missing_text | TYPE SY, " | |||
lv_enddat | TYPE SY-DATUM, " SY-DATUM | |||
lv_tclas | TYPE PME04-TCLAS, " 'A' | |||
lv_infty_0001 | TYPE P0001, " | |||
lv_molga | TYPE T001P-MOLGA, " | |||
lv_var_field | TYPE ANY. " |
  CALL FUNCTION 'RH_TEXT_GET' " |
EXPORTING | ||
TABNAME | = lv_tabname | |
RECORD | = lv_record | |
LANGU | = lv_langu | |
BEGDAT | = lv_begdat | |
ENDDAT | = lv_enddat | |
TCLAS | = lv_tclas | |
INFTY_0001 | = lv_infty_0001 | |
MOLGA | = lv_molga | |
VAR_FIELD | = lv_var_field | |
TABLES | ||
FIELDS | = lt_fields | |
TEXT_TAB | = lt_text_tab | |
EXCEPTIONS | ||
DDIC_ENTRY_NOT_FOUND = 1 | ||
INCORRECT_CALL = 2 | ||
INTERNAL_ERROR = 3 | ||
MISSING_TEXT = 4 | ||
. " RH_TEXT_GET |
ABAP code using 7.40 inline data declarations to call FM RH_TEXT_GET
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 TABNAME FROM DFIES INTO @DATA(ld_tabname). | ||||
"SELECT single LANGU FROM SY INTO @DATA(ld_langu). | ||||
DATA(ld_langu) | = SY-LANGU. | |||
"SELECT single DATUM FROM SY INTO @DATA(ld_begdat). | ||||
DATA(ld_begdat) | = SY-DATUM. | |||
"SELECT single DATUM FROM SY INTO @DATA(ld_enddat). | ||||
DATA(ld_enddat) | = SY-DATUM. | |||
"SELECT single TCLAS FROM PME04 INTO @DATA(ld_tclas). | ||||
DATA(ld_tclas) | = 'A'. | |||
"SELECT single MOLGA FROM T001P INTO @DATA(ld_molga). | ||||
Search for further information about these or an SAP related objects