SAP RH_GET_VERSION_OF_WTASK Function Module for
RH_GET_VERSION_OF_WTASK is a standard rh get version of wtask 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 get version of wtask FM, simply by entering the name RH_GET_VERSION_OF_WTASK into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHWF
Program Name: SAPLRHWF
Main Program: SAPLRHWF
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RH_GET_VERSION_OF_WTASK 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_GET_VERSION_OF_WTASK'".
EXPORTING
* PLVAR = "
OTYPE = "
OBJID = "
* DATE = SY-DATUM "
IMPORTING
ACT_BEGDA = "
ACT_ENDDA = "
TABLES
ACT_VERSIONS = "
EXCEPTIONS
INVALID_OTYPE = 1 OBJECT_NOT_EXIST = 2 NO_VERSIONS_AVAILABLE = 3 NO_ACTIVE_PLVAR = 4
IMPORTING Parameters details for RH_GET_VERSION_OF_WTASK
PLVAR -
Data type: HROBJECT-PLVAROptional: Yes
Call by Reference: No ( called with pass by value option)
OTYPE -
Data type: HROBJECT-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJID -
Data type: HROBJECT-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
DATE -
Data type: HRP1000-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_GET_VERSION_OF_WTASK
ACT_BEGDA -
Data type: HRP1000-BEGDAOptional: No
Call by Reference: No ( called with pass by value option)
ACT_ENDDA -
Data type: HRP1000-ENDDAOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RH_GET_VERSION_OF_WTASK
ACT_VERSIONS -
Data type: HRS1205Optional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
INVALID_OTYPE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NOT_EXIST -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_VERSIONS_AVAILABLE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ACTIVE_PLVAR -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_GET_VERSION_OF_WTASK 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_plvar | TYPE HROBJECT-PLVAR, " | |||
| lv_act_begda | TYPE HRP1000-BEGDA, " | |||
| lt_act_versions | TYPE STANDARD TABLE OF HRS1205, " | |||
| lv_invalid_otype | TYPE HRS1205, " | |||
| lv_otype | TYPE HROBJECT-OTYPE, " | |||
| lv_act_endda | TYPE HRP1000-ENDDA, " | |||
| lv_object_not_exist | TYPE HRP1000, " | |||
| lv_objid | TYPE HROBJECT-OBJID, " | |||
| lv_no_versions_available | TYPE HROBJECT, " | |||
| lv_date | TYPE HRP1000-BEGDA, " SY-DATUM | |||
| lv_no_active_plvar | TYPE HRP1000. " |
|   CALL FUNCTION 'RH_GET_VERSION_OF_WTASK' " |
| EXPORTING | ||
| PLVAR | = lv_plvar | |
| OTYPE | = lv_otype | |
| OBJID | = lv_objid | |
| DATE | = lv_date | |
| IMPORTING | ||
| ACT_BEGDA | = lv_act_begda | |
| ACT_ENDDA | = lv_act_endda | |
| TABLES | ||
| ACT_VERSIONS | = lt_act_versions | |
| EXCEPTIONS | ||
| INVALID_OTYPE = 1 | ||
| OBJECT_NOT_EXIST = 2 | ||
| NO_VERSIONS_AVAILABLE = 3 | ||
| NO_ACTIVE_PLVAR = 4 | ||
| . " RH_GET_VERSION_OF_WTASK | ||
ABAP code using 7.40 inline data declarations to call FM RH_GET_VERSION_OF_WTASK
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 PLVAR FROM HROBJECT INTO @DATA(ld_plvar). | ||||
| "SELECT single BEGDA FROM HRP1000 INTO @DATA(ld_act_begda). | ||||
| "SELECT single OTYPE FROM HROBJECT INTO @DATA(ld_otype). | ||||
| "SELECT single ENDDA FROM HRP1000 INTO @DATA(ld_act_endda). | ||||
| "SELECT single OBJID FROM HROBJECT INTO @DATA(ld_objid). | ||||
| "SELECT single BEGDA FROM HRP1000 INTO @DATA(ld_date). | ||||
| DATA(ld_date) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects