SAP RHGA_WRITE_ATTRIBUTES Function Module for
RHGA_WRITE_ATTRIBUTES is a standard rhga write attributes 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 rhga write attributes FM, simply by entering the name RHGA_WRITE_ATTRIBUTES into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRBAS00GENATTR_DIALOG
Program Name: SAPLHRBAS00GENATTR_DIALOG
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function RHGA_WRITE_ATTRIBUTES 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 'RHGA_WRITE_ATTRIBUTES'".
EXPORTING
SCENARIO = "General Attribute Maintenance: Application Scenario
* PPOMA_MODE = ' ' "Call from PPOMA
* CHECK_AUTHORITY = ' ' "Execute authorization check
* CHECK_ATTRIBUTES = ' ' "
* PLVAR = "Plan Version
OTYPE = "Object Type
OBJID = "Object ID
* ATTRIBUTES = "Table: Attribute Names
* ATTRIBUTE_VALUES = "Table: Attributes of an Object
* BEGDA = SY-DATUM "Start Date
* ENDDA = '99991231' "End Date
* REPLACE_VALUES = 'X' "
IMPORTING
CHECK_RESULTS = "Table: Application Log - Messages
EXCEPTIONS
INTERNAL_ERROR = 1 INVALID_OBJECT = 2 INVALID_SCENARIO = 3 INVALID_ATTRIBUTE = 4 NO_AUTHORITY = 5 WRITE_ERROR = 6 INVALID_VALUES = 7
IMPORTING Parameters details for RHGA_WRITE_ATTRIBUTES
SCENARIO - General Attribute Maintenance: Application Scenario
Data type: OM_ATTRSCNOptional: No
Call by Reference: No ( called with pass by value option)
PPOMA_MODE - Call from PPOMA
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHECK_AUTHORITY - Execute authorization check
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
CHECK_ATTRIBUTES -
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PLVAR - Plan Version
Data type: PLVAROptional: Yes
Call by Reference: No ( called with pass by value option)
OTYPE - Object Type
Data type: OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
OBJID - Object ID
Data type: HROBJIDOptional: No
Call by Reference: No ( called with pass by value option)
ATTRIBUTES - Table: Attribute Names
Data type: HRTB_ATTRIBOptional: Yes
Call by Reference: No ( called with pass by value option)
ATTRIBUTE_VALUES - Table: Attributes of an Object
Data type: HRTB_PT1222Optional: Yes
Call by Reference: No ( called with pass by value option)
BEGDA - Start Date
Data type: BEGDATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA - End Date
Data type: ENDDATUMDefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
REPLACE_VALUES -
Data type: FLAGDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RHGA_WRITE_ATTRIBUTES
CHECK_RESULTS - Table: Application Log - Messages
Data type: HRTB_BAL_S_MSGOptional: No
Call by Reference: Yes
EXCEPTIONS details
INTERNAL_ERROR - System Error
Data type:Optional: No
Call by Reference: Yes
INVALID_OBJECT - Invalid Object
Data type:Optional: No
Call by Reference: Yes
INVALID_SCENARIO -
Data type:Optional: No
Call by Reference: Yes
INVALID_ATTRIBUTE -
Data type:Optional: No
Call by Reference: Yes
NO_AUTHORITY - No Authorization
Data type:Optional: No
Call by Reference: Yes
WRITE_ERROR - Error in writing
Data type:Optional: No
Call by Reference: Yes
INVALID_VALUES - Error in consistency check
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RHGA_WRITE_ATTRIBUTES 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_scenario | TYPE OM_ATTRSCN, " | |||
| lv_check_results | TYPE HRTB_BAL_S_MSG, " | |||
| lv_internal_error | TYPE HRTB_BAL_S_MSG, " | |||
| lv_ppoma_mode | TYPE FLAG, " SPACE | |||
| lv_check_authority | TYPE FLAG, " SPACE | |||
| lv_check_attributes | TYPE FLAG, " SPACE | |||
| lv_plvar | TYPE PLVAR, " | |||
| lv_invalid_object | TYPE PLVAR, " | |||
| lv_otype | TYPE OTYPE, " | |||
| lv_invalid_scenario | TYPE OTYPE, " | |||
| lv_objid | TYPE HROBJID, " | |||
| lv_invalid_attribute | TYPE HROBJID, " | |||
| lv_attributes | TYPE HRTB_ATTRIB, " | |||
| lv_no_authority | TYPE HRTB_ATTRIB, " | |||
| lv_write_error | TYPE HRTB_ATTRIB, " | |||
| lv_attribute_values | TYPE HRTB_PT1222, " | |||
| lv_begda | TYPE BEGDATUM, " SY-DATUM | |||
| lv_invalid_values | TYPE BEGDATUM, " | |||
| lv_endda | TYPE ENDDATUM, " '99991231' | |||
| lv_replace_values | TYPE FLAG. " 'X' |
|   CALL FUNCTION 'RHGA_WRITE_ATTRIBUTES' " |
| EXPORTING | ||
| SCENARIO | = lv_scenario | |
| PPOMA_MODE | = lv_ppoma_mode | |
| CHECK_AUTHORITY | = lv_check_authority | |
| CHECK_ATTRIBUTES | = lv_check_attributes | |
| PLVAR | = lv_plvar | |
| OTYPE | = lv_otype | |
| OBJID | = lv_objid | |
| ATTRIBUTES | = lv_attributes | |
| ATTRIBUTE_VALUES | = lv_attribute_values | |
| BEGDA | = lv_begda | |
| ENDDA | = lv_endda | |
| REPLACE_VALUES | = lv_replace_values | |
| IMPORTING | ||
| CHECK_RESULTS | = lv_check_results | |
| EXCEPTIONS | ||
| INTERNAL_ERROR = 1 | ||
| INVALID_OBJECT = 2 | ||
| INVALID_SCENARIO = 3 | ||
| INVALID_ATTRIBUTE = 4 | ||
| NO_AUTHORITY = 5 | ||
| WRITE_ERROR = 6 | ||
| INVALID_VALUES = 7 | ||
| . " RHGA_WRITE_ATTRIBUTES | ||
ABAP code using 7.40 inline data declarations to call FM RHGA_WRITE_ATTRIBUTES
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_ppoma_mode) | = ' '. | |||
| DATA(ld_check_authority) | = ' '. | |||
| DATA(ld_check_attributes) | = ' '. | |||
| DATA(ld_begda) | = SY-DATUM. | |||
| DATA(ld_endda) | = '99991231'. | |||
| DATA(ld_replace_values) | = 'X'. | |||
Search for further information about these or an SAP related objects