SAP HR_GET_SUBTYPE_TEXT Function Module for Determine Text for Subtype of Infotype
HR_GET_SUBTYPE_TEXT is a standard hr get subtype text SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine Text for Subtype of Infotype 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 hr get subtype text FM, simply by entering the name HR_GET_SUBTYPE_TEXT into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRPAD00INFTY
Program Name: SAPLHRPAD00INFTY
Main Program: SAPLHRPAD00INFTY
Appliation area:
Release date: 05-Nov-1999
Mode(Normal, Remote etc): Normal Function Module
Update:
Function HR_GET_SUBTYPE_TEXT 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 'HR_GET_SUBTYPE_TEXT'"Determine Text for Subtype of Infotype.
EXPORTING
INFTY = "Infotype
SUBTY = "Subtype
* PERSNR = "Personnel Number
* TCLAS = 'A' "Transaction Class for Data Storage
* BEGDA = SY-DATUM "Date
* ENDDA = SY-DATUM "Date
* LANGU = SY-LANGU "Language Key
* MOLGA = "Country Grouping
IMPORTING
STEXT = "Name of Subtype
EXCEPTIONS
INFTY_NOT_FOUND = 1 SUBTY_NOT_FOUND = 2 INFTY_NOT_SUPPORTED = 3
IMPORTING Parameters details for HR_GET_SUBTYPE_TEXT
INFTY - Infotype
Data type: INFTYOptional: No
Call by Reference: No ( called with pass by value option)
SUBTY - Subtype
Data type: SUBTYOptional: No
Call by Reference: No ( called with pass by value option)
PERSNR - Personnel Number
Data type: PERNR_DOptional: Yes
Call by Reference: No ( called with pass by value option)
TCLAS - Transaction Class for Data Storage
Data type: TCLASDefault: 'A'
Optional: Yes
Call by Reference: No ( called with pass by value option)
BEGDA - Date
Data type: DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA - Date
Data type: DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
LANGU - Language Key
Data type: SPRASDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
MOLGA - Country Grouping
Data type: MOLGAOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for HR_GET_SUBTYPE_TEXT
STEXT - Name of Subtype
Data type: SBTTXOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INFTY_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
SUBTY_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
INFTY_NOT_SUPPORTED -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HR_GET_SUBTYPE_TEXT 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_infty | TYPE INFTY, " | |||
lv_stext | TYPE SBTTX, " | |||
lv_infty_not_found | TYPE SBTTX, " | |||
lv_subty | TYPE SUBTY, " | |||
lv_subty_not_found | TYPE SUBTY, " | |||
lv_persnr | TYPE PERNR_D, " | |||
lv_infty_not_supported | TYPE PERNR_D, " | |||
lv_tclas | TYPE TCLAS, " 'A' | |||
lv_begda | TYPE DATUM, " SY-DATUM | |||
lv_endda | TYPE DATUM, " SY-DATUM | |||
lv_langu | TYPE SPRAS, " SY-LANGU | |||
lv_molga | TYPE MOLGA. " |
  CALL FUNCTION 'HR_GET_SUBTYPE_TEXT' "Determine Text for Subtype of Infotype |
EXPORTING | ||
INFTY | = lv_infty | |
SUBTY | = lv_subty | |
PERSNR | = lv_persnr | |
TCLAS | = lv_tclas | |
BEGDA | = lv_begda | |
ENDDA | = lv_endda | |
LANGU | = lv_langu | |
MOLGA | = lv_molga | |
IMPORTING | ||
STEXT | = lv_stext | |
EXCEPTIONS | ||
INFTY_NOT_FOUND = 1 | ||
SUBTY_NOT_FOUND = 2 | ||
INFTY_NOT_SUPPORTED = 3 | ||
. " HR_GET_SUBTYPE_TEXT |
ABAP code using 7.40 inline data declarations to call FM HR_GET_SUBTYPE_TEXT
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.DATA(ld_tclas) | = 'A'. | |||
DATA(ld_begda) | = SY-DATUM. | |||
DATA(ld_endda) | = SY-DATUM. | |||
DATA(ld_langu) | = SY-LANGU. | |||
Search for further information about these or an SAP related objects