SAP RH_AUTHORITY_BUILD Function Module for
RH_AUTHORITY_BUILD is a standard rh authority build 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 authority build FM, simply by entering the name RH_AUTHORITY_BUILD into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHAC
Program Name: SAPLRHAC
Main Program: SAPLRHAC
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function RH_AUTHORITY_BUILD 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_AUTHORITY_BUILD'".
EXPORTING
PLVAR = "Plan version
* BEGDA = SY-DATUM "Start date
* ENDDA = '99991231' "End date
* BASE_PROFILE = ' ' "Create base profiles
* PD_PROFILE = 'X' "Create PD profiles
TABLES
PLSTE_TAB = "Positions
* BASE_USER = "User table for base profiles
* BASE_TAB = "Base profiles
* PD_USER = "User table for PD profiles
* PD_TAB = "PD profiles
* USER_PLSTE = "Table of user->position assignments
IMPORTING Parameters details for RH_AUTHORITY_BUILD
PLVAR - Plan version
Data type: WPLOG-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
BEGDA - Start date
Data type: WPLOG-BEGDADefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
ENDDA - End date
Data type: WPLOG-ENDDADefault: '99991231'
Optional: Yes
Call by Reference: No ( called with pass by value option)
BASE_PROFILE - Create base profiles
Data type:Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PD_PROFILE - Create PD profiles
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RH_AUTHORITY_BUILD
PLSTE_TAB - Positions
Data type: HROBJECTOptional: No
Call by Reference: No ( called with pass by value option)
BASE_USER - User table for base profiles
Data type: HRAUTHUSEROptional: Yes
Call by Reference: No ( called with pass by value option)
BASE_TAB - Base profiles
Data type: HRAUTHPROFOptional: Yes
Call by Reference: No ( called with pass by value option)
PD_USER - User table for PD profiles
Data type: HRAUTHUSEROptional: Yes
Call by Reference: No ( called with pass by value option)
PD_TAB - PD profiles
Data type: HRAUTHPROFOptional: Yes
Call by Reference: No ( called with pass by value option)
USER_PLSTE - Table of user->position assignments
Data type:Optional: Yes
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_AUTHORITY_BUILD 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 WPLOG-PLVAR, " | |||
lt_plste_tab | TYPE STANDARD TABLE OF HROBJECT, " | |||
lv_begda | TYPE WPLOG-BEGDA, " SY-DATUM | |||
lt_base_user | TYPE STANDARD TABLE OF HRAUTHUSER, " | |||
lv_endda | TYPE WPLOG-ENDDA, " '99991231' | |||
lt_base_tab | TYPE STANDARD TABLE OF HRAUTHPROF, " | |||
lt_pd_user | TYPE STANDARD TABLE OF HRAUTHUSER, " | |||
lv_base_profile | TYPE HRAUTHUSER, " SPACE | |||
lt_pd_tab | TYPE STANDARD TABLE OF HRAUTHPROF, " | |||
lv_pd_profile | TYPE HRAUTHPROF, " 'X' | |||
lt_user_plste | TYPE STANDARD TABLE OF HRAUTHPROF. " |
  CALL FUNCTION 'RH_AUTHORITY_BUILD' " |
EXPORTING | ||
PLVAR | = lv_plvar | |
BEGDA | = lv_begda | |
ENDDA | = lv_endda | |
BASE_PROFILE | = lv_base_profile | |
PD_PROFILE | = lv_pd_profile | |
TABLES | ||
PLSTE_TAB | = lt_plste_tab | |
BASE_USER | = lt_base_user | |
BASE_TAB | = lt_base_tab | |
PD_USER | = lt_pd_user | |
PD_TAB | = lt_pd_tab | |
USER_PLSTE | = lt_user_plste | |
. " RH_AUTHORITY_BUILD |
ABAP code using 7.40 inline data declarations to call FM RH_AUTHORITY_BUILD
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 WPLOG INTO @DATA(ld_plvar). | ||||
"SELECT single BEGDA FROM WPLOG INTO @DATA(ld_begda). | ||||
DATA(ld_begda) | = SY-DATUM. | |||
"SELECT single ENDDA FROM WPLOG INTO @DATA(ld_endda). | ||||
DATA(ld_endda) | = '99991231'. | |||
DATA(ld_base_profile) | = ' '. | |||
DATA(ld_pd_profile) | = 'X'. | |||
Search for further information about these or an SAP related objects