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 Sort

Former Member
0 Likes
702

Hi Guru's

i am use alv sort in my report .

i use following code.

but it gives me DUMP ERROR.

my code like this.

DATA : it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE.

FORM do_sort .

it_sort-spos = 1.

it_sort-fieldname = 'vbeln'.

it_sort-tabname = 'it_vbak'.

it_sort-up = 'X'.

it_sort-subtot = 'X'.

  • it_sort-group = '*'.

  • it_sort-expa = 'X'.

APPEND it_sort.

it_sort-spos = 2.

it_sort-fieldname = 'posnr'.

it_sort-tabname = 'it_vbap'.

it_sort-up = 'X'.

it_sort-subtot = 'X'.

  • it_sort-group = '*'.

  • it_sort-expa = 'X'.

APPEND it_sort.

ENDFORM.

please tell me where is the error.

Thanks in advance.

Regards.

Sam.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
677

hi,

write the internal table name and field name in Capital letters

thanks

Hi Guru's

i am use alv sort in my report .

i use following code.

but it gives me DUMP ERROR.

my code like this.

DATA : it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE.

FORM do_sort .

it_sort-spos = 1.

it_sort-fieldname = 'vbeln'.

it_sort-tabname = 'it_vbak'.

it_sort-up = 'X'.

it_sort-subtot = 'X'.

  • it_sort-group = '*'.

  • it_sort-expa = 'X'.

APPEND it_sort.

it_sort-spos = 2.

it_sort-fieldname = 'posnr'.

it_sort-tabname = 'it_vbap'.

it_sort-up = 'X'.

it_sort-subtot = 'X'.

  • it_sort-group = '*'.

  • it_sort-expa = 'X'.

APPEND it_sort.

ENDFORM.

please tell me where is the error.

Thanks in advance.

Regards.

Sam.

5 REPLIES 5
Read only

Former Member
0 Likes
678

hi,

write the internal table name and field name in Capital letters

thanks

Read only

Former Member
0 Likes
677

try to give your field name in CAPS

Read only

Former Member
0 Likes
677

What is dump error.

Read only

Former Member
0 Likes
677

data:it_sort type slis_sortinfo_alv.

data:it_sort1 type slis_t_sortinfo_alv.

it_sort-fieldname = 'VBELN.

it_sort-up = 'X'.

append it_sort to it_sort1.

APPEND IT_SORT AND FIELD NAME IS IN CAPS (UPPER CASE).

Read only

Former Member
0 Likes
677

Hi,

Try the following code

DATA : it_sort TYPE slis_t_sortinfo_alv WITH HEADER LINE.

FORM do_sort .

it_sort-spos = 1.

it_sort-fieldname = 'VBELN'.

it_sort-tabname = 'IT_VBAK'.

it_sort-up = 'X'.

it_sort-subtot = 'X'.

it_sort-group = '*'.

it_sort-expa = 'X'.

APPEND it_sort.

it_sort-spos = 2.

it_sort-fieldname = 'POSNR'.

it_sort-tabname = 'IT_VBAP'.

it_sort-up = 'X'.

it_sort-subtot = 'X'.

it_sort-group = '*'.

it_sort-expa = 'X'.

APPEND it_sort.

ENDFORM.

Hope this will have u.

If it is helpful provide point.

Thanks.