Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Sorting

Hi,

I wanted ti sort Itable by XBLNR and KUNNR, but it is sorting the MATNR also. Please help me why it is happening like this.

SORT gt_zprice BY xblnr DESCENDING kunnr.

For Ex:

kunnr matnr xblnr

1002 11111 SA-07-009

1002 22222 SA-07-009

1002 33333 SA-07-009

1001 11111 SA-07-008

1001 22222 SA-07-008

1001 33333 SA-07-008

I want the result to be like this

kunnr matnr xblnr

1001 11111 SA-07-008

1001 22222 SA-07-008

1001 33333 SA-07-008

1002 11111 SA-07-009

1002 22222 SA-07-009

1002 33333 SA-07-009

But it is comming like the following, material is also sorting.

kunnr matnr xblnr

1001 22222 SA-07-008

1001 11111 SA-07-008

1001 33333 SA-07-008

1002 22222 SA-07-009

1002 11111 SA-07-009

1002 33333 SA-07-009

Thanks,

Veni.

Tags:
replied

Does this not work? Adding the word STABLE?


SORT  gt_zprice STABLE BY xblnr DESCENDING kunnr ASCENDING

Regards,

Rich Heilman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question