‎2008 May 07 8:48 AM
Hi ,
i want to sort a table with reference of two fields.
one field with ascending and and one field with decending ,
so how can i write sort statement for this ,
can any one pls help
‎2008 May 07 8:55 AM
Hi use this,
Sort It_table by f1 ascending
f2 descending.
Reward points if useful.
‎2008 May 07 8:53 AM
Hai ,
Sort it_tab by value1 descending by value2.
this may work.
Thanks
Swetha
‎2008 May 07 8:55 AM
Hi use this,
Sort It_table by f1 ascending
f2 descending.
Reward points if useful.
‎2008 May 07 8:57 AM
hi,
sort itab by field1 descending field2 .
ascending is default. u have to specify descending explicitly.
regards,
madhumitha
‎2008 May 07 9:05 AM
Hi Chaaya,
Refer to the following code:
SORT int_aeoi ascending BY datuv andat DESCENDING.
Hope this helps.
Reward if helpful.
Regards,
Sipra
‎2008 May 07 9:06 AM
Hi Chaaya,
Refer below Code:
DATA:
wa_vbap TYPE vbap,
t_vbap TYPE TABLE OF vbap.
SELECT *
FROM vbap
INTO TABLE t_vbap.
SORT t_vbap BY vbeln ASCENDING posnr DESCENDING.
LOOP AT t_vbap INTO wa_vbap.
WRITE:
/ wa_vbap-vbeln, ' ',
wa_vbap-posnr, ' ',
wa_vbap-matnr.
ENDLOOP.Regards,
Sunil.