SAP HR_REORDER_FIELDS Function Module for Define the field sequence
HR_REORDER_FIELDS is a standard hr reorder fields SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Define the field sequence processing and below is the pattern details for this FM, 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 hr reorder fields FM, simply by entering the name HR_REORDER_FIELDS into the relevant SAP transaction such as SE37 or SE38.
Function Group: HRNOA03
Program Name: SAPLHRNOA03
Main Program: SAPLHRNOA03
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function HR_REORDER_FIELDS 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 'HR_REORDER_FIELDS'"Define the field sequence.
EXPORTING
* TITLE = "The title on the pop-up window
* FIELD_NUM = 1 "The number of fields to be displayed
* DISP_ONLY = "The flag indicating whether updating is allowed
TABLES
FIELDTABIN = "Input data table
RESULTTAB = "Result table
HEADERTAB = "The header table
EXCEPTIONS
INVALID_COLUMN_NUM = 1 FEW_COLUMN_NUM = 2 NOT_ENOUGH_COL_OUTPUT = 3 NOT_ENOUGH_HEADER = 4 ERROR_ASSIGN_FIELD = 5
IMPORTING Parameters details for HR_REORDER_FIELDS
TITLE - The title on the pop-up window
Data type: SY-TITLEOptional: Yes
Call by Reference: Yes
FIELD_NUM - The number of fields to be displayed
Data type: IDefault: 1
Optional: Yes
Call by Reference: Yes
DISP_ONLY - The flag indicating whether updating is allowed
Data type: COptional: Yes
Call by Reference: Yes
TABLES Parameters details for HR_REORDER_FIELDS
FIELDTABIN - Input data table
Data type:Optional: No
Call by Reference: Yes
RESULTTAB - Result table
Data type:Optional: No
Call by Reference: Yes
HEADERTAB - The header table
Data type: TREEMHHDROptional: No
Call by Reference: Yes
EXCEPTIONS details
INVALID_COLUMN_NUM - The given column number is not valid
Data type:Optional: No
Call by Reference: Yes
FEW_COLUMN_NUM - The input table do not have enough columns
Data type:Optional: No
Call by Reference: Yes
NOT_ENOUGH_COL_OUTPUT - The output table should have more than 2 fields
Data type:Optional: No
Call by Reference: Yes
NOT_ENOUGH_HEADER - Not enough entries in header table
Data type:Optional: No
Call by Reference: Yes
ERROR_ASSIGN_FIELD - Error happens when assigning to fields in input table
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for HR_REORDER_FIELDS 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_title | TYPE SY-TITLE, " | |||
| lt_fieldtabin | TYPE STANDARD TABLE OF SY, " | |||
| lv_invalid_column_num | TYPE SY, " | |||
| lv_field_num | TYPE I, " 1 | |||
| lt_resulttab | TYPE STANDARD TABLE OF I, " | |||
| lv_few_column_num | TYPE I, " | |||
| lv_disp_only | TYPE C, " | |||
| lt_headertab | TYPE STANDARD TABLE OF TREEMHHDR, " | |||
| lv_not_enough_col_output | TYPE TREEMHHDR, " | |||
| lv_not_enough_header | TYPE TREEMHHDR, " | |||
| lv_error_assign_field | TYPE TREEMHHDR. " |
|   CALL FUNCTION 'HR_REORDER_FIELDS' "Define the field sequence |
| EXPORTING | ||
| TITLE | = lv_title | |
| FIELD_NUM | = lv_field_num | |
| DISP_ONLY | = lv_disp_only | |
| TABLES | ||
| FIELDTABIN | = lt_fieldtabin | |
| RESULTTAB | = lt_resulttab | |
| HEADERTAB | = lt_headertab | |
| EXCEPTIONS | ||
| INVALID_COLUMN_NUM = 1 | ||
| FEW_COLUMN_NUM = 2 | ||
| NOT_ENOUGH_COL_OUTPUT = 3 | ||
| NOT_ENOUGH_HEADER = 4 | ||
| ERROR_ASSIGN_FIELD = 5 | ||
| . " HR_REORDER_FIELDS | ||
ABAP code using 7.40 inline data declarations to call FM HR_REORDER_FIELDS
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 TITLE FROM SY INTO @DATA(ld_title). | ||||
| DATA(ld_field_num) | = 1. | |||
Search for further information about these or an SAP related objects