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

table compare

Former Member
0 Likes
294

hi all,

i have a dought of comparing two tables , i have two internal tables , in one internal table i am fetching data from ztable and other from the standard table. then i need to compare both the record and perform some task based on true and false. please suggest . my requirement from spec is as follows.

compare both Create and Change dates/time. For all records that has different date/time, output in an ALV report:

1.For each record, compare the CREATE_DAT, CREATE_TIM as well as CHANGE_DAT, CHANGE TIM between I_AGR_DEF and I_CT.

a.If different date/time, output the record in ALV.

b.If record exist in I_AGR_DEF but not in I_CT, output record in ALV

c.If record do not exist in I_AGR_DEF but exist in I_CT, output record in ALV.

1 REPLY 1
Read only

Former Member
0 Likes
270

do this way ...


loop at itab.
read table itab1 with key field1 = itab-field1.
if sy-subrc = 0.
write:\ itab-field1.
endif.
endloop.