Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Collecting similar Business Partner and Merging them to each other

Dear Friends,

I am working on a problem to collect similar Business Partner and Merging them to each other, I am not supposed to delete any matching record, As we can genrate the relationship in t-code BP and dragged n drop to each other for merging, I am supposed to carry out same problem in ABAP application , would you like to help me to solve this problem please. Any artical, code, suggestion would be greate help of mine

thanking you,,,

Former Member

Hi Naim,

Good morning to you too.

Here is a rough idea that I can give to you.

Select based on all the attributes.

Select Partner_no Title Name Address ***

From but000

into table git_but000.

Maybe you won't find all the attributes in the same table.

You will have to join the tables BUT000, ADRC and BUT020 to get all the attributes.

Sort Table git_but000 by Title Name Address ***.

Loop at git_but000 into wa_but000.

  • Since your table is sorted you will get the matching entry after sy-tabix

lv_tabix = sy-tabix.

lv_tabix = lv_tabix + 1.

Read table git_but000 into wa_but000 index lv_tabix binary search.

if sy-subrc eq 0.

* Take this business partner into another internal table

  • This way you can collect the business partners matching in attributes

  • in the same internal table



Please reward points if it helps.


Amit Mishra

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question