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

Sorting ALV's

former_member209703
Active Contributor
0 Likes
394

somebody can tell me, what are, g_it_wa_sort-spos AND g_it_wa_sort-group for?

I need to do a special sorting.

Check this sample. If i have

FIELD1 INVES-002

FIELD1 INVES-002

FIELD2 INVES-002

FIELD2 INVES-002

and i use g_it_wa_sort I get in my ALV

-


FIELD1 INVES-002

(EMPTY ROW)

-


FIELD2

(EMPTY ROW)

-


but what i need is:

-


FIELD1 INVES-002

(EMPTY ROW)

-


FIELD2 <b>INVES-002</b>

(EMPTY ROW)

-


Because, field has changed from FIELD1 to FIELD2

Can anybody help me please?

3 REPLIES 3
Read only

former_member209703
Active Contributor
0 Likes
378

Anybody's got an idea?????

Read only

0 Likes
378

hi

spos - Sort order

for ex:

DATA: it_sort TYPE slis_t_sortinfo_alv,

wa_sort TYPE slis_sortinfo_alv,

wa_sort-fieldname = 'BUKRS'.

wa_sort-tabname = 'IT_SORT'.

wa_sort-up = 'X'.

APPEND wa_sort TO it_sort.

wa_sort-fieldname = 'BELNR'.

wa_sort-tabname = 'IT_SORT'.

wa_sort-up = 'X'.

APPEND wa_sort TO it_sort.

CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'

EXPORTING

i_callback_program = sy-repid

is_layout = gs_layout

it_fieldcat = ct_fieldcat

it_sort = it_sort[]

i_save = 'A'

TABLES

t_outtab = itab.

**reward if helpful

regards,

madhu

Read only

former_member209703
Active Contributor
0 Likes
378

yes, i alredy knew that, but this don't solve my problem.

Should i do any special group in the alv?

Help please.