SAP RH_OBJ_GENREL_1002_CREATE Function Module for









RH_OBJ_GENREL_1002_CREATE is a standard rh obj genrel 1002 create 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 obj genrel 1002 create FM, simply by entering the name RH_OBJ_GENREL_1002_CREATE into the relevant SAP transaction such as SE37 or SE38.

Function Group: RHPT
Program Name: SAPLRHPT
Main Program:
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function RH_OBJ_GENREL_1002_CREATE 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_OBJ_GENREL_1002_CREATE'"
EXPORTING
OTYPE = "
* VBEGDA = "
* VENDDA = "
* VTASK = 'D' "
* LANGU = SY-LANGU "
PLVAR = "
STEXT = "
* BEGDA = SY-DATUM "
* ENDDA = '99991231' "
VSUBTY = "
* VOTYPE = "
* VOBJID = "

IMPORTING
OBJID = "

TABLES
* PTXT1002 = "

EXCEPTIONS
TEXT_REQUIRED = 1 INVALID_DATE = 2 OBJECT_NOT_FOUND = 3 ERROR_DURING_INSERT = 4 UNDEFINED = 5
.



IMPORTING Parameters details for RH_OBJ_GENREL_1002_CREATE

OTYPE -

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

VBEGDA -

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

VENDDA -

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

VTASK -

Data type: HRRHAP-VTASK
Default: 'D'
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGU -

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

PLVAR -

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

STEXT -

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

BEGDA -

Data type: HRP1000-BEGDA
Default: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)

ENDDA -

Data type: HRP1000-ENDDA
Default: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)

VSUBTY -

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

VOTYPE -

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

VOBJID -

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

EXPORTING Parameters details for RH_OBJ_GENREL_1002_CREATE

OBJID -

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

TABLES Parameters details for RH_OBJ_GENREL_1002_CREATE

PTXT1002 -

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

EXCEPTIONS details

TEXT_REQUIRED -

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

INVALID_DATE -

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

OBJECT_NOT_FOUND -

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

ERROR_DURING_INSERT -

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

UNDEFINED -

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

Copy and paste ABAP code example for RH_OBJ_GENREL_1002_CREATE 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_objid  TYPE HRP1000-OBJID, "   
lv_otype  TYPE HRP1000-OTYPE, "   
lt_ptxt1002  TYPE STANDARD TABLE OF PT1002, "   
lv_text_required  TYPE PT1002, "   
lv_vbegda  TYPE HRP1001-BEGDA, "   
lv_vendda  TYPE HRP1001-ENDDA, "   
lv_vtask  TYPE HRRHAP-VTASK, "   'D'
lv_langu  TYPE SY-LANGU, "   SY-LANGU
lv_invalid_date  TYPE SY, "   
lv_plvar  TYPE HRP1000-PLVAR, "   
lv_object_not_found  TYPE HRP1000, "   
lv_stext  TYPE HRP1000-STEXT, "   
lv_error_during_insert  TYPE HRP1000, "   
lv_begda  TYPE HRP1000-BEGDA, "   SY-DATUM
lv_undefined  TYPE HRP1000, "   
lv_endda  TYPE HRP1000-ENDDA, "   '99991231'
lv_vsubty  TYPE PLOG-SUBTY, "   
lv_votype  TYPE HRP1000-OTYPE, "   
lv_vobjid  TYPE HRP1000-OBJID. "   

  CALL FUNCTION 'RH_OBJ_GENREL_1002_CREATE'  "
    EXPORTING
         OTYPE = lv_otype
         VBEGDA = lv_vbegda
         VENDDA = lv_vendda
         VTASK = lv_vtask
         LANGU = lv_langu
         PLVAR = lv_plvar
         STEXT = lv_stext
         BEGDA = lv_begda
         ENDDA = lv_endda
         VSUBTY = lv_vsubty
         VOTYPE = lv_votype
         VOBJID = lv_vobjid
    IMPORTING
         OBJID = lv_objid
    TABLES
         PTXT1002 = lt_ptxt1002
    EXCEPTIONS
        TEXT_REQUIRED = 1
        INVALID_DATE = 2
        OBJECT_NOT_FOUND = 3
        ERROR_DURING_INSERT = 4
        UNDEFINED = 5
. " RH_OBJ_GENREL_1002_CREATE




ABAP code using 7.40 inline data declarations to call FM RH_OBJ_GENREL_1002_CREATE

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 OBJID FROM HRP1000 INTO @DATA(ld_objid).
 
"SELECT single OTYPE FROM HRP1000 INTO @DATA(ld_otype).
 
 
 
"SELECT single BEGDA FROM HRP1001 INTO @DATA(ld_vbegda).
 
"SELECT single ENDDA FROM HRP1001 INTO @DATA(ld_vendda).
 
"SELECT single VTASK FROM HRRHAP INTO @DATA(ld_vtask).
DATA(ld_vtask) = 'D'.
 
"SELECT single LANGU FROM SY INTO @DATA(ld_langu).
DATA(ld_langu) = SY-LANGU.
 
 
"SELECT single PLVAR FROM HRP1000 INTO @DATA(ld_plvar).
 
 
"SELECT single STEXT FROM HRP1000 INTO @DATA(ld_stext).
 
 
"SELECT single BEGDA FROM HRP1000 INTO @DATA(ld_begda).
DATA(ld_begda) = SY-DATUM.
 
 
"SELECT single ENDDA FROM HRP1000 INTO @DATA(ld_endda).
DATA(ld_endda) = '99991231'.
 
"SELECT single SUBTY FROM PLOG INTO @DATA(ld_vsubty).
 
"SELECT single OTYPE FROM HRP1000 INTO @DATA(ld_votype).
 
"SELECT single OBJID FROM HRP1000 INTO @DATA(ld_vobjid).
 


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!