Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV

Former Member
0 Likes
478

in SLIS_SORTINFO_ALV type ,,

we have data spos,, what does it mean.

how shud i give value to it.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
461

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

in SLIS_SORTINFO_ALV type ,,

we have data spos,, what does it mean.

how shud i give value to it.

3 REPLIES 3
Read only

sreeramkumar_madisetty
Active Contributor
0 Likes
461

Hi

SPOS for serach position.

Regards,

Sreeram

Read only

Former Member
0 Likes
461

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.

Read only

Former Member
0 Likes
462

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