‎2008 Nov 17 5:30 AM
hi,
in the below table
EBELN UDATE UTIME USERNAME EBELP ERNAM GRNAM CHANGEDBY
4500016284 20081113 132504 SIVAK 10 INDIRAS SIVAK
4500016284 20081113 145020 SIVAK 10 INDIRAS SIVAK
4500016284 20081111 104220 POTEST 10 INDIRAS SIVAK
4500016284 20081111 104756 INDIRAS 10 INDIRAS SIVAK
4500016284 20081113 132504 SIVAK 20 INDIRAS INDIRAS
4500016284 20081113 145020 SIVAK 20 INDIRAS INDIRAS SIVAK
4500016284 20081111 104220 POTEST 20 INDIRAS INDIRAS SIVAK
4500016284 20081111 104756 INDIRAS 20 INDIRAS INDIRAS
4500016284 20081113 132504 SIVAK 10 INDIRAS SIVAK
4500016284 20081113 145020 SIVAK 10 INDIRAS SIVAK POTEST
4500016284 20081111 104220 POTEST 10 INDIRAS SIVAK POTEST
4500016284 20081111 104756 INDIRAS 10 INDIRAS SIVAK POTEST
4500016285 20081113 144549 SIVAK 10 POTEST INDIRAS
4500016285 20081111 104608 INDIRAS 10 POTEST INDIRAS
4500016286 20081113 143824 SIVAK 10 POTEST SIVAK SIVAK
4500016286 20081111 111303 INDIRAS 10 POTEST SIVAK SIVAK
4500016286 20081113 143824 SIVAK 10 POTEST SIVAK SIVAK
4500016286 20081111 111303 INDIRAS 10 POTEST SIVAK
4500016287 20081115 214509 POTEST 10 POTEST INDIRAS SIVAK
4500016287 20081115 214146 INDIRAS 10 POTEST INDIRAS SIVAK
in this table i want unique lineitems for the corresponding order
but the latest changed by name should be displayed for this unique record and
if the changed by field is no present then it should show the latest unique line item
please suggest the needful.
Thnaks in advance
‎2008 Nov 17 6:57 AM
your question:
in this table i want unique lineitems for the corresponding order
but the latest changed by name should be displayed for this unique record and
if the changed by field is no present then it should show the latest unique line item
please suggest the needful.
answer:
what ever may be the value for changed by name you need unique lineitems (right)
1. sort itab by
EBELN
UDATE descending
UTIME descending
2. delete adjacent duplicates from itab comparing ebeln
‎2008 Nov 17 5:38 AM
hi,
First sort your internal table descending based on changed date and time and
then use this statement.
delete adjacent duplicates from itab comparing ebeln.
‎2008 Nov 17 5:38 AM
HI.,
Initially I can suggest you one thing make utility of SORT ITAB BY <field name>
Thanks,
Naveen.I
‎2008 Nov 17 5:41 AM
Hi,
sort itab DESCENDING.
delete ADJACENT DUPLICATES FROM itab
COMPARING ebeln utime.
Regards
Debarshi
‎2008 Nov 17 6:20 AM
Hi,
You can do as below:
sort itab by EBELN UDATE descending.
delete adjacent duplicates from itab comparing ebeln.
Thanks,
Sriram POnna.
‎2008 Nov 17 6:57 AM
your question:
in this table i want unique lineitems for the corresponding order
but the latest changed by name should be displayed for this unique record and
if the changed by field is no present then it should show the latest unique line item
please suggest the needful.
answer:
what ever may be the value for changed by name you need unique lineitems (right)
1. sort itab by
EBELN
UDATE descending
UTIME descending
2. delete adjacent duplicates from itab comparing ebeln
‎2008 Nov 17 7:31 AM
Hello Prakash,
First you sort the table on ( EBELN UDATE UTIME ) these combination and finally used this statement
DELETE ADJACENT DUPLICATES FROM itab COMPARING ebeln utime and mould the itab as per requirement.
Mahesh