Application Development and Automation 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: 
Read only

join on internal table

Former Member
0 Likes
279

Hi all,

how to join 2 internal tables .

I have 2 itabs with equal bukrs field , how to insesert country from second itab to first.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
257

HI,

LOOP AT ITAB1.
L_INDEX = SY-INDEX.
READ TABLE ITAB2 WITH KSRY BUKRS = ITAB1-BUKRS.
IF SY-SUBRC EQ 0.
ITAB1-COUNTRY = ITAB2-COUNTRY.
MODIFY ITAB1 INDEX L_INDEX.
ENDIF.
ENDLOOP.
ENDLOOP.

1 REPLY 1
Read only

Former Member
0 Likes
258

HI,

LOOP AT ITAB1.
L_INDEX = SY-INDEX.
READ TABLE ITAB2 WITH KSRY BUKRS = ITAB1-BUKRS.
IF SY-SUBRC EQ 0.
ITAB1-COUNTRY = ITAB2-COUNTRY.
MODIFY ITAB1 INDEX L_INDEX.
ENDIF.
ENDLOOP.
ENDLOOP.