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

Function RH_OBJECT_DELETE 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_OBJECT_DELETE'".
EXPORTING
PLVAR = "Plan Version
OTYPE = "Object type
OBJID = "Object ID
* STATUS = '1' "Status
* GDATE = SY-DATUM "
* DEL_HISTO = 'X' "
* VTASK = 'D' "Update (B=Buffer,D=Online,V=Update,S=Sync)
IMPORTING
DEL_STEXT = "
EXCEPTIONS
NO_AUTHORIZATION = 1 OBJECT_NOT_FOUND = 2 OBJECT_NOT_DELETED = 3 GDATE_BEFORE_BEGDA = 4 WRONG_DATE_FORMAT = 5 HISTORICIZED = 6 OBJECT_ENQUEUED = 7 UNDEFINED = 8
IMPORTING Parameters details for RH_OBJECT_DELETE
PLVAR - Plan Version
Data type: HRP1000-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
OTYPE - Object type
Data type: HRP1000-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJID - Object ID
Data type: HRP1000-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
STATUS - Status
Data type: HRP1000-ISTATDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
GDATE -
Data type: HRP1000-GDATEDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
DEL_HISTO -
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
VTASK - Update (B=Buffer,D=Online,V=Update,S=Sync)
Data type: HRRHAP-VTASKDefault: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_OBJECT_DELETE
DEL_STEXT -
Data type: HRP1000-STEXTOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_AUTHORIZATION - No Authorization
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NOT_FOUND - Object does not exist
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_NOT_DELETED - Object was not deleted
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
GDATE_BEFORE_BEGDA -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
WRONG_DATE_FORMAT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
HISTORICIZED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_ENQUEUED - Object is locked
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNDEFINED - Other Error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_OBJECT_DELETE 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 HRP1000-PLVAR, " | |||
| lv_del_stext | TYPE HRP1000-STEXT, " | |||
| lv_no_authorization | TYPE HRP1000, " | |||
| lv_otype | TYPE HRP1000-OTYPE, " | |||
| lv_object_not_found | TYPE HRP1000, " | |||
| lv_objid | TYPE HRP1000-OBJID, " | |||
| lv_object_not_deleted | TYPE HRP1000, " | |||
| lv_status | TYPE HRP1000-ISTAT, " '1' | |||
| lv_gdate_before_begda | TYPE HRP1000, " | |||
| lv_gdate | TYPE HRP1000-GDATE, " SY-DATUM | |||
| lv_wrong_date_format | TYPE HRP1000, " | |||
| lv_del_histo | TYPE CHAR1, " 'X' | |||
| lv_historicized | TYPE CHAR1, " | |||
| lv_vtask | TYPE HRRHAP-VTASK, " 'D' | |||
| lv_object_enqueued | TYPE HRRHAP, " | |||
| lv_undefined | TYPE HRRHAP. " |
|   CALL FUNCTION 'RH_OBJECT_DELETE' " |
| EXPORTING | ||
| PLVAR | = lv_plvar | |
| OTYPE | = lv_otype | |
| OBJID | = lv_objid | |
| STATUS | = lv_status | |
| GDATE | = lv_gdate | |
| DEL_HISTO | = lv_del_histo | |
| VTASK | = lv_vtask | |
| IMPORTING | ||
| DEL_STEXT | = lv_del_stext | |
| EXCEPTIONS | ||
| NO_AUTHORIZATION = 1 | ||
| OBJECT_NOT_FOUND = 2 | ||
| OBJECT_NOT_DELETED = 3 | ||
| GDATE_BEFORE_BEGDA = 4 | ||
| WRONG_DATE_FORMAT = 5 | ||
| HISTORICIZED = 6 | ||
| OBJECT_ENQUEUED = 7 | ||
| UNDEFINED = 8 | ||
| . " RH_OBJECT_DELETE | ||
ABAP code using 7.40 inline data declarations to call FM RH_OBJECT_DELETE
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 HRP1000 INTO @DATA(ld_plvar). | ||||
| "SELECT single STEXT FROM HRP1000 INTO @DATA(ld_del_stext). | ||||
| "SELECT single OTYPE FROM HRP1000 INTO @DATA(ld_otype). | ||||
| "SELECT single OBJID FROM HRP1000 INTO @DATA(ld_objid). | ||||
| "SELECT single ISTAT FROM HRP1000 INTO @DATA(ld_status). | ||||
| DATA(ld_status) | = '1'. | |||
| "SELECT single GDATE FROM HRP1000 INTO @DATA(ld_gdate). | ||||
| DATA(ld_gdate) | = SY-DATUM. | |||
| DATA(ld_del_histo) | = 'X'. | |||
| "SELECT single VTASK FROM HRRHAP INTO @DATA(ld_vtask). | ||||
| DATA(ld_vtask) | = 'D'. | |||
Search for further information about these or an SAP related objects