Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Merge 2 Internal table to new table

0 Kudos

hi !

i have 2 tables and I need merge it to 1 table.

table 1 - sales data.

table 2- contact data.

if have more contact row from sales row - I need duplicate the latest sale row and merge the contact data row.

example:

THANKS!

2 REPLIES 2

VijayaKrishnaG
Active Contributor

Hi,

First SORT LT_TBL_ALV and delete the adjacent duplicates comparing KUNNR & SALESID.

Then loop IT_CONTACT, and read LT_TBL_ALV with key KUNNR.
Now populate all required 4 fields from two work areas into new work area and Append to new internal table.

Thank you!

GVK

Sandra_Rossi
Active Contributor

Okay, we understand that it's pretty easy to do. And what is your question?