Ansicht
Dokumentation
/SAPAPO/RRP_CREATE_SORT - Generates Coding for Sort
RFUMSV00 - Advance Return for Tax on Sales/Purchases BAL_S_LOG - Application Log: Log header dataThis documentation is copyright by SAP AG.
Functionality
This function module is used to sort tables.
The following are transferred:
- The name of the structure of the table to be sorted (ESNAME)
- The parameter EBUILD which controls how the table is to be built up or completed with the fields that can be sorted SORTX.
The parameter EBUILD can have the following characteristics:
- initial (SPACE): The table SORTX is completely rebuilt. During this
- process, all fields of the structure ESNAME are used.
- X: The table SORTX is merely sorted before it is displayed but
- apart from that it remains unchanged.
- F: The key texts for the fields are read, SORTX is sorted, but
- apart from that it remains unchanged.
It is therefore possible to either let the table SORTX be built up, which is to recommended when all fields of a structure are to be sorted in ascending order, or to preallocate the table in the program that calls the table.
If you choose Sort in the dialog box that is called up from the function module, the sort routine DO_SORT is generated in the main memory. The export parameter 'IFCODE' is given the value 'DOSO' (DO SOrt), the parameter 'IPNAME', is given the name of the program, when 'DO_SORT' is generated.
In the program that calls up the sort routine is then called up.
Example
The call could be as follows:
*--> Call sort dialog box / Generate sort codings
CALL FUNCTION 'MD_CREATE_SORT'
EXPORTING
ESNAME = 'MDKE'
EBUILD = SORT_AUFBAU
IMPORTING
IPNAME = L_PNAME
IFCODE = L_FCODE
TABLES
SORTX = SORTX.
*--> Set build up indicator
MOVE 'X' TO SORT_AUFBAU.
IF NOT L_PNAME IS INITIAL
AND L_FCODE EQ 'DOSO'.
*--> Execute sorting
PERFORM DO_SORT IN PROGRAM (L_PNAME) TABLES MDKEX.
ENDIF.
Notes
Further information
Parameters
EV_PNAMEIT_SORTX
IV_STRUCNAME
Exceptions
ERRORFunction Group
APO/SAPLRRP_TREEVendor Master (General Section) BAL_S_LOG - Application Log: Log header data
This documentation is copyright by SAP AG.
Length: 2685 Date: 20240427 Time: 061804 sap01-206 ( 27 ms )