on 11-12-2008 4:31 AM
Row EBELN UDATE USERNAME EBELP NETWR EKGRP ERNAM GRNAM BEDAT BUDAT DMBTR
1 4500016284 20081111 INDIRAS 10 675 A26 INDIRAS INDIRAS 20081111 20081111 30
2 4500016284 20081111 POTEST 10 675 A26 INDIRAS INDIRAS 20081111 20081111 30
3 4500016284 20081111 INDIRAS 20 675 A26 INDIRAS INDIRAS 20081111 20081111 40
4 4500016284 20081111 POTEST 20 675 A26 INDIRAS INDIRAS 20081111 20081111 40
5 4500016285 20081111 INDIRAS 10 200 A26 POTEST INDIRAS 20081111 20081111 100
6 4500016286 20081111 INDIRAS 10 2160 A26 POTEST INDIRAS 20081111 20081111 280
iam having the following data in the final internal table
i want to delete ebelp(lineietm) for the same ebeln if it's repeating more than once
and keep the latest ebelp only among the repeated ones.i can add time also in the same tabel if needed.
please guide.
>
> i want to delete ebelp(lineietm) for the same ebeln if it's repeating more than once
>
> and keep the latest ebelp only among the repeated ones
Yes,you need to take time field in internal table than sort decending accordind to EBELN EBELP TIME and delete adjecent duplicate comparing EBELN EBELP .your old entry would be deleted.
Sampl code:
SORT itab BY ebeln ebelp time decending.
DELETE ADJACENT DUPLICATES FROM itab COMPARING ebeln ebelp .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use the logic what Amit has suggested.
Regards
Sathar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
After populating the internal table; sort it with EBELN and EBELP.
Then use Delete Adjacent Duplicates comapring the same fields as above.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
U add another field timestamp to the internal table.
while populating the internal table...populate that too...
SORT itab by ebeln ebelp timestamp descending.
DELETE ADJACENT DUPLICATES FROM itab COMPARING ebeln ebelp.
Regards,
SAPient
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
youcan do like this:
sort itab by ebeln ebelp,
delete adjacent duplicates from itab comparing ebelp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
DELETE ADJACENT DUPLICATES FROM itab comparing field1(vbeln) field2 (posnr) .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Prakash,
You can do it in 2 steps
sort itab by BEDAT BUDAT descending.
DELETE ADJACENT DUPLICATES FROM itab COMPARING EBELP
regards,
Anirban
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Delete like this...
SORT itab BY ebeln ebelp.
DELETE ADJACENT DUPLICATES FROM itab COMPARING ebeln ebelp.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
9 | |
9 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.