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

Compare Two Structures or Itab at Runtime

former_member212713
Contributor
0 Likes
754

Hi Experts;

I want to do compare two structures or itabs in my program at runtime.

I will give two structures or itab names and I want to get difference between two structures names or itabs.

I know Diff Screen of ABAP Debug . I want to make same process but only with FM or Class.

Are there any FMs or Classes working this way?

Best regards.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
627

Check [this|http://wiki.sdn.sap.com/wiki/display/Snippets/ComparingTwoInternalTables-AGeneric+Approach]

4 REPLIES 4
Read only

Former Member
0 Likes
628

Check [this|http://wiki.sdn.sap.com/wiki/display/Snippets/ComparingTwoInternalTables-AGeneric+Approach]

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
627

I noted a similar question two days before . Might be useful for your reference.

Read only

0 Likes
627

Hi;

Is there any example about CL_TPDA_DIFF_STRUC Class?

Thanks.

Read only

0 Likes
627

I created my interface success . But It give error at runtime. Error mesaage : 'Error during interprocess communication; Debugger will be closed . Message Number TPDA151'


DATA l_ref_diff TYPE REF TO CL_TPDA_DIFF_STRUC.
data : xyz  TYPE REF TO IF_TPDA_DIFF_SERVICE.

data : p_var1 type TPDA_VAR_NAME,
          p_var2 type TPDA_VAR_NAME,
          lv_x type TPDA_DIFF_ATTR.
data : l_it_value_diff TYPE TPDA_DIFF_VALUE_DIFF_IT,
          l_it_main_diff TYPE tpda_diff_main_diffs_it.
p_var1 = 'CLIENTDATA1'.
p_var2 = 'CLIENTDATA2'.
lv_x-maxhits = 100.

CREATE OBJECT l_ref_diff.
xyz ?= l_ref_diff.
xyz->init( ).
xyz->DIFF( EXPORTING p_var1 = p_var1
                     p_var2 = p_var2
                     p_diff_attr = lv_x
           CHANGING p_it_value_diff_it = l_it_value_diff
                    p_it_main_diff_it  = l_it_main_diff ).