Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8556

Re: Duplicate records management

$
0
0

Hello Amine,

 

Try with the below logic.

 

DSO1:

 

ID
Code1
Code2
1AB
2AB
3DE
4DE
5CF

 

DSO2:


ID
Code1Code2

2

AB


RESULT DSO1:


ID
Code1Code2
1AB
2AB
3DE
5CF


SORT dso1 BY id code1 code2.

DELETE ADJACENT DUPLICATES FROM dso1 COMPARING code1 code2.

LOOP AT dso2 INTO wa2.

   READ TABLE dso1 INTO wa1

                                 WITH KEY id = wa2-id

                                 code1 = wa2-code1

                                 code2 = wa2-code2.

IF sy-subrc = 0.

   INSERT wa1 INTO TABLE dso1.

ENDIF.

ENDLOOP.



Hope this answers your question.


Regards,

Thanga


Viewing all articles
Browse latest Browse all 8556

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>