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

Function module for comparing contents of two internal tables

Former Member
0 Kudos
1,963

Hi All,

Is there any function module to compare contents of two internal tables of same structure?

If yes please let me know.

Thanks in advance.

Amol

1 ACCEPTED SOLUTION
Read only

Former Member
0 Kudos
1,090

Hi,

Try this in ur code....

it may works....

CATSXT_COMPARE_STRUCTURES

6 REPLIES 6
Read only

Former Member
0 Kudos
1,091

Hi,

Try this in ur code....

it may works....

CATSXT_COMPARE_STRUCTURES

Read only

Former Member
0 Kudos
1,090

Hi Amol,

CTVB_COMPARE_TABLES

This function module may work try this one. This in some cases gives dump. This may work in your case.

Reward if useful.

Read only

0 Kudos
1,090

Hi Kaushik,

Thanks for reply.

Do u have any example for using this function module? I am getting short dump "CALL_FUNCTION_CONFLICT_GEN_TYP", because of type mismatch of parameter "KEY_LENGTH". If you have any example, Can you please post it here?

Thanks,

Amol

Read only

Former Member
0 Kudos
1,090

simple way...

if tab1[ ] = tab2[ ].

.....

endif.

Edited by: Abap-fresher on Jan 11, 2008 10:12 AM

Read only

Former Member
0 Kudos
1,090

I don't think that the simple way is very useful.

Usually one wants to know, if there is a difference between the two internal tables, how the table

differ exactly.

Siegfried

Read only

Former Member
0 Kudos
1,090

Hi Amol,

I dont have an example right now but i can give you another function module which works fine

COMPARE_TABLES

This works fine it gives you the result "F" if the tables have different data and "T" if the data matches.

This is a simple function module.

Reward if helpful.