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
511

Dear all,

What is the use of SPOS in sortinfo?

SPOS means sort position or sort sequence. But why is it used and what change does it make to the sorting?

Plz help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
492

I THINK IT IS BECAUSE THE SORT PREFERENCE IF YOU ARE USING TWO OR THREE OR MORE FIELDS FOR SORT.

LIKE SORT ITAB BY MATNR WERKS LGORT .

HERE SPOS = 1 FOR MATNR IF WE WANT THE PREFFERENCE OF MATNR IS GREATER THAN WERKS AND THEN LGORT.

SO SPOS = 2 FOR WERKS 3 FOR LGORT..

REGARDS

SHIBA DUTTA

Dear all,

What is the use of SPOS in sortinfo?

SPOS means sort position or sort sequence. But why is it used and what change does it make to the sorting?

Plz help.

4 REPLIES 4
Read only

Former Member
0 Likes
492

Hi,

If you give the Sort position as 1 for that field, data will be displayed first sorted by that field, then if you give position as 2 for another field, it will be by that field second.. will be like that.

So you are asking the program to display the sorted records as per the order you mention.

Regards,

anji

Read only

0 Likes
492

thanks to both.

i have rewarded the points.

regards,

shreya

Read only

Former Member
0 Likes
493

I THINK IT IS BECAUSE THE SORT PREFERENCE IF YOU ARE USING TWO OR THREE OR MORE FIELDS FOR SORT.

LIKE SORT ITAB BY MATNR WERKS LGORT .

HERE SPOS = 1 FOR MATNR IF WE WANT THE PREFFERENCE OF MATNR IS GREATER THAN WERKS AND THEN LGORT.

SO SPOS = 2 FOR WERKS 3 FOR LGORT..

REGARDS

SHIBA DUTTA

Read only

Former Member
0 Likes
492

It is for the preference of sorting if you give 1 to one field then it will sort by that field

reward points