2009 Sep 01 2:49 PM
Hi,
I am trying to sort the entries populated to dynamic internal table and collect the same.
Is there any way to achieve the same.
Thanks in advance.
Regards,
Navas
Hi,
Please look at the functionality existing in the standard program given by SAP.
Prog Name - BCALV_TABLE_CREATE
2009 Sep 01 3:04 PM
DATA L_FILED TYPE CHAR25.
L_FIELD = 'MATNR'
SORT <FS_TABLE> BY (L_FIELD).
Kanagaraja L
2009 Sep 02 11:16 AM
Hi,
I am trying to sort an amount field of type curr which is not possible by normal sort as
l_field1 = 'DMBTR'.
SORT <dyn_table> BY (l_field1).
Please suggest a way to achieve the way.
Regards,
M.Navas
2009 Sep 02 11:54 AM
Use the follwoing coding and check in the debug mode it will sort
DATA l_field TYPE char25.
DATA:g_data TYPE REF TO data.
FIELD-SYMBOLS <fs_table> TYPE STANDARD TABLE.
l_field = 'DMBTR'.
CREATE DATA g_data TYPE TABLE OF bsad.
ASSIGN g_data->* TO <fs_table>.
SELECT * FROM bsad INTO CORRESPONDING FIELDS OF TABLE <fs_table>.
SORT <fs_table> BY (l_field).Kanagaraja L
2009 Sep 01 3:06 PM
Hi,
Please look at the functionality existing in the standard program given by SAP.
Prog Name - BCALV_TABLE_CREATE
2009 Sep 01 3:15 PM
hi,
Try this
DATA: it_tab TYPE abap_sortorder_tab.
FIELD-SYMBOLS:<itab> TYPE STANDARD TABLE.
*get data into your table then
SORT <itab> BY (it_tab).
However if column names don't match it will throw an error
Hope This helps you.
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |