2007 May 11 2:11 PM
in SLIS_SORTINFO_ALV type ,,
we have data spos,, what does it mean.
how shud i give value to it.
2007 May 11 3:00 PM
SPOS is sorting postiong. Like while your are sorting your internal table you will use SORT ITAB F1 f2. Here F1 is the first postion and F2 is the second postion. So first it will sort on the basis of F1. In the same way SPOS also works.
I hope you make you clear.
Warm Regards,
Vijay
SPOS is sorting postiong. Like while your are sorting your internal table you will use SORT ITAB F1 f2. Here F1 is the first postion and F2 is the second postion. So first it will sort on the basis of F1. In the same way SPOS also works.
I hope you make you clear.
Warm Regards,
Vijay
2007 May 11 2:11 PM
2007 May 11 2:26 PM
This sample code will help you.
in this way you can use the 'spos'.
FORM build_sortcat .
wa_sort-spos = 1.
wa_sort-fieldname = 'EBELN'.
gd_sortcat-tabname
APPEND wa_sort TO it_sortcat.
wa_sort-spos = 2.
wa_sort-fieldname = 'EBELP'.
gd_sortcat-tabname
APPEND wa_sort TO it_sortcat.
ENDFORM.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_sort = <b>it_sortcat</b>
it_special_groups = gd_tabgroup
IT_EVENTS = GT_XEVENTS
i_save = 'X'
is_variant = z_template
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
2007 May 11 3:00 PM
SPOS is sorting postiong. Like while your are sorting your internal table you will use SORT ITAB F1 f2. Here F1 is the first postion and F2 is the second postion. So first it will sort on the basis of F1. In the same way SPOS also works.
I hope you make you clear.
Warm Regards,
Vijay
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |