生活随笔
收集整理的這篇文章主要介紹了
ABAP SORT
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
SORT?MAN1?BY?HIGH?WEIGHT?DESCENDING.
與
SORT?MAN1?DESCENDING?BY?HIGH?WEIGHT.
的效果是不一樣的。
REPORT??YTEST20160527.?? DATA:BEGIN?OF?MAN,?? ??NAME(20)?TYPE?C,?? ??HIGH?TYPE?P?DECIMALS?2,?? ??WEIGHT?TYPE?P?DECIMALS?2,?? END?OF?MAN.?? ?? DATA:?MAN1?LIKE?HASHED?TABLE?OF?MAN?WITH?UNIQUE?KEY?NAME.?? ?? MAN-NAME?=?'JAY'.?? MAN-HIGH?=?'1.68'.?? MAN-WEIGHT?=?120.?? INSERT?MAN?INTO?TABLE?MAN1.?? ?? ?? MAN-NAME?=?'ADOLF'.?? MAN-HIGH?=?'1.69'.?? MAN-WEIGHT?=?100.?? INSERT?MAN?INTO?TABLE?MAN1.?? ?? MAN-NAME?=?'BABO'.?? MAN-HIGH?=?'1.70'.?? MAN-WEIGHT?=?130.?? INSERT?MAN?INTO?TABLE?MAN1.?? ?? LOOP?AT?MAN1?INTO?MAN.?? ??WRITE:/?MAN-NAME,MAN-HIGH,MAN-WEIGHT.?? ENDLOOP.?? ?? SORT?MAN1?BY?HIGH?WEIGHT?DESCENDING.?? SKIP.?? ULINE.?? LOOP?AT?MAN1?INTO?MAN.?? ??WRITE:/?MAN-NAME,MAN-HIGH,MAN-WEIGHT.?? ENDLOOP.?? ?? SORT?MAN1?DESCENDING?BY?HIGH?WEIGHT.?? SKIP.?? ULINE.?? LOOP?AT?MAN1?INTO?MAN.?? ??WRITE:/?MAN-NAME,MAN-HIGH,MAN-WEIGHT.?? ENDLOOP. ?
結(jié)論:
SORT?MAN1?BY?HIGH?WEIGHT?DESCENDING.--------------------只有WEIGHT?字段是降序,其他字段還是默認(rèn)的升序
SORT?MAN1?DESCENDING?BY?HIGH?WEIGHT.--------------------BY后面所有的字段都是降序
多個(gè)字段排序,字段在前面的優(yōu)先排序
總結(jié)
以上是生活随笔為你收集整理的ABAP SORT的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。