HR_REORDER_FIELDS is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name HR_REORDER_FIELDS into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
HRNOA03
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'HR_REORDER_FIELDS' "Define the field sequence
* EXPORTING
* title = " sy-title The title on the pop-up window
* field_num = 1 " i The number of fields to be displayed
* disp_only = " c The flag indicating whether updating is allowed
TABLES
fieldtabin = " Input data table
resulttab = " Result table
headertab = " treemhhdr The header table
EXCEPTIONS
INVALID_COLUMN_NUM = 1 " The given column number is not valid
FEW_COLUMN_NUM = 2 " The input table do not have enough columns
NOT_ENOUGH_COL_OUTPUT = 3 " The output table should have more than 2 fields
NOT_ENOUGH_HEADER = 4 " Not enough entries in header table
ERROR_ASSIGN_FIELD = 5 " Error happens when assigning to fields in input table
. " HR_REORDER_FIELDS
The ABAP code below is a full code listing to execute function module HR_REORDER_FIELDS including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| it_fieldtabin | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_fieldtabin | LIKE LINE OF it_fieldtabin , |
| it_resulttab | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_resulttab | LIKE LINE OF it_resulttab , |
| it_headertab | TYPE STANDARD TABLE OF TREEMHHDR,"TABLES PARAM |
| wa_headertab | LIKE LINE OF it_headertab . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_title | TYPE SY-TITLE , |
| it_fieldtabin | TYPE STANDARD TABLE OF STRING , |
| wa_fieldtabin | LIKE LINE OF it_fieldtabin, |
| ld_field_num | TYPE I , |
| it_resulttab | TYPE STANDARD TABLE OF STRING , |
| wa_resulttab | LIKE LINE OF it_resulttab, |
| ld_disp_only | TYPE C , |
| it_headertab | TYPE STANDARD TABLE OF TREEMHHDR , |
| wa_headertab | LIKE LINE OF it_headertab. |
This function module is used to re-define the sequence of entries in a
data table. User will be able to see a pop-up window showing all the
...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name HR_REORDER_FIELDS or its description.