Compare Two Structures or Itab at Runtime

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.

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 ).

Similar Messages

  • Compare two structures dynamically.

    Hi,
    How to compare two structures dynamically.
    Thanks,
    Ram.

    Hi,
    WE can compare two structures like they are eual if their elementary components are equal.
    If the structures are unequal, we can find which is longer and which is shorter.
    Regards,
    jaya

  • Comparing two structures

    Hi all,
            Can anyone let me know how to compare two structures ie., wheather all fields(sequence/datatypes) of  <Structure1> are same as <Structure2>..
    Cheers,
    Rahul.

    Hi Rahul,
    do below
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = wa_structure1
        CHANGING
          ct_fieldcat            = it_fieldcat1
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = wa_structure1
        CHANGING
          ct_fieldcat            = it_fieldcat2
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    if it_fieldcat1[] = it_fieldcat2[].
    ,...success message
    endif.
    it works

  • Compare two structures in BPM

    I have a BPM where I get two structures one from SAP
    and one from WebService.
    I have to compare these two strutures
    if no entry is found in web service structure for the correponding entry in  SAP Structure, then call other webservice else skip
    Is this possible using Loop in BPM
    Thanks
    John

    Hi Prasad,
      I got this strucure with data from the rfc call to SAP
    001
    002
    003
    004
    005
    I got this structure with data from a call to web service
    001
    002
    003
    I have these two strucures in my BPM
    Now, I have to compare these two structures and get
    004, 005 which are not in the web service strucure and pass this data by calling another web service
    I dont know how to loop over these two structures.
    Is it possible to do this
    Thanks for ur help
    John

  • Functinality to compare two material price with reference to BOM in CO

    Hi All,
    Is there is any functionality in Controlling which can compare the costing for two FERT materials.
    or
    is there is  any functionality where we can compare two material price with reference to BOM in controlling
    Please help me to compare the material price with reference to BOM
    Regards
    nandu

    Hi,
    You can use this report to compare two itemizations. The report compares the characteristics item number, item category, cost element, resource, material, cost center, plant/work center, cost center/activity type, operation number, BOM item, assembly indicator, and cost component.
    You can access this report as follows:
    Accounting ® Controlling ® Product Cost Controlling ® Product Cost Planning ® Material Costing ® Cost Estimate with Quantity Structure or Cost Estimate Without Quantity Structure ® Compare
    or
    Accounting ® Controlling ® Product Cost Controlling ® Product Cost Planning ® Information System ® Object Comparisons ® For Material ® Itemization Comparison.
    For Detail Please reffer following link:
    http://help.sap.com/saphelp_46c/helpdata/en/56/abd108f1a611d28a950000e8214595/content.htm
    Thanks and Regards
    Binoj M D

  • Comparison of two structures excluding one field

    Hi,
    I need to make comparisons of two complete data structures, excluding from the comparison one field that should not be compared or considered to obtain a result of equality of both structures.
    Somebody know a sentence or practical way to make this comparison (with one field less)?
    Example:
    DATA: im_data_new TYPE mereq_item,
                im_data_old TYPE mereq_item.
    Both structures has 146 fields, and I need to exclude from the comparison the 64th field.
    Thanks in advance and greetings,
    Mayra.

    clear that field value in old and new before comparing the structures.
    Thomas

  • Which structure of itab has a better performance

    Hi experts,
    I have written an ABAP-Report - the performance was good...
    Then I must implement "some" more functions which were not requested at the beginning
    and now the performance is very bad !!!
    In this case I think a new report is the better way than a refactoring of the source code...
    Now I am not sure how to organize my data in itabs.
    I need a dynamic internal table cause number of key columns is only known at runtime...
    What do you think is the better and faster way:
    Alternative A:
    Structure of itab
    -  Assuming 5 key columns ( Key01, Key02, Key03,... )
    -  4 further columns
    estimated lines: 6.000.000 - much smaller linesize than Alternative B
    Alternative B:
    Structure of itab
    -  Assuming 5 key columns ( Key01, Key02, Key03,... )
    -  100 further columns
    estimated lines: 80.000 - much bigger linesize than Alternative B
    I think Alternative B would be faster but I want know your opinion...
    Regards,
    Oliver

    First of all yolu should check the total size of your internal table,
    no of lines *  bytes of the structure =   ?
    And of course you should either a sorted table or a hashed table!  Standard tables should definitely be avoided here!
    Hashed tables are only usefull with the complete unique table key, no other access!!!
    + If a hashed tables can be used then A could actually be better than B!
    Use Assigning !!!
    kind regards    Siegfried

  • How to compare two database on different servers

    hi,
    I want to compare two database on different servers in oracle.first i want to ckechk thier structures and then data.i m using oracle 10.2.0.plz help me out
    Thanks in advance

    In terms of structures, there are various tools out there that can do this, such as TOAD which can do a database compare.
    In terms of data comparisons, that will depend on what sort of results you are expecting to see. I'm sure some tools will do it for you, but it can be just as easy to write your own comparison using a database link from one database to the other.

  • How to compare two Universes ?

    Post Author: Shrikant
    CA Forum: Administration
    Hi.. all I want to compare two universes of different data mart to check the table structure. Can anybody please tell me how to compare two Universes of different Datamarts?How i can achive this usinig BusinessObjects Enterprise XI Release 2 ??
    Thanks in advance.
    Shrikant

    Create
    table tab1(ID
    int ,DE char(10))
    Create
    table tab2(ID
    int ,DE char(10))
    Insert
    into tab1 Values
    (1,'aaa')
    Insert
    into tab1  Values
    (2,'bbb')
    Insert
    into tab1 Values(3,'ccc')
    Insert
    into tab1 Values(4,'dfe')
    Insert
    into tab2 Values
    (1,'aaa')
    Insert
    into tab2  Values
    (2,'xx')
    Insert
    into tab2 Values(3,'ccc')
    Insert
    into tab2 Values(6,'wdr')
    SELECT 
    tab1.ID,tab2.ID
    As T2 from tab1
    FULL
    join tab2 on tab1.ID
    = tab2.ID  
    WHERE
    BINARY_CHECKSUM(tab1.ID,tab1.DE)
    <> BINARY_CHECKSUM(tab2.ID,tab2.DE)
    OR tab1.ID
    IS NULL
    OR 
    tab2.ID IS
    NULL
    ID column considered as a primary Key
    Apart from different record,Above query populate missing record in both tables.
    Result Set
    ID ID 
    2  2
    4 NULL
    NULL 6
    ganeshk

  • How to compare two Universes of two different Datamarts?

    Post Author: Shrikant
    CA Forum: Integrated Solutions
    Hi.. all I want to compare two universes of different data mart to check the table structure. Can anybody please tell me how to compare two Universes of different Datamarts?How i can achive this usinig BusinessObjects Enterprise XI Release 2 ??
    Thanks in advance.

    /*does record 1 have friend*/
    WITH t AS
    (SELECT 1 AS Id, 'a' AS NAME, 'type1' AS Col
      FROM Dual
      UNION ALL
      SELECT 2 AS Id, 'a' AS NAME, 'type1' AS Col
      FROM Dual
      UNION ALL
      SELECT 3 AS Id, 'a' AS NAME, 'type2' AS Col FROM Dual)
    SELECT count(*) as YesNo
    FROM t T1
    WHERE T1.Id = 1
          AND (T1.Name, T1.Col) IN (SELECT T2.Name, T2.Col FROM T t2 where t2.ID != T1.Id);
         1
    /*does record 3 have friend*/
    WITH t AS
    (SELECT 1 AS Id, 'a' AS NAME, 'type1' AS Col
      FROM Dual
      UNION ALL
      SELECT 2 AS Id, 'a' AS NAME, 'type1' AS Col
      FROM Dual
      UNION ALL
      SELECT 3 AS Id, 'a' AS NAME, 'type2' AS Col FROM Dual)
    SELECT count(*) as YesNo
    FROM t T1
    WHERE T1.Id = 3
       AND (T1.Name, T1.Col) IN (SELECT T2.Name, T2.Col FROM T t2 where t2.ID != T1.Id);
         0
    */

  • How to open acrobat in java and compare two files using javacode

    I am absolutely new to use acrobat software in Java. I want to open two pdf files at a time and then compare the differences between them thru java program .
    i am not sure how to do it. iam trying many ways without success.
    I used jre and could open open files using runtime method , but couldn't do comaparision. i..e could't access tools menu (alt+t) Compare two files and <enter>. help in java will be appreciated.
    Pls guide me the steps to use the acrobat library. At http://partners.adobe.com/asn/acrobat i found supporting vb and vc only.
    Any help or links are greatly appreciated.

    iText is an open source PDF library, reads a PDF one page at a time. You could check it out. I've used it for writing/splitting/concatenating PDFs, but not comparing files
    http://www.lowagie.com/iText/
    Scott
    http://www.swiftradius.com

  • Compare two members from the same dimension in HFR

    Hi,
    Is it possibe to compare two members from the same dimension in HFR? The requirement is to compare Year and Week members from the same dimension. The Week date will be selected from POV. The corresponding Year date should be displayed in the report. Week dates are in the format W2008-03-07 and Year dates are in YTD2008-03-07.
    The dates are same except the preceding character.I am unable to compare these two. In my understanding there's no substring or replace functions in HFR.
    Kindly help. Thanks in advance.
    Regards,
    Uma

    Hi,
    How is your database structured? it may be possible to use the 'RelativeMember' function if it will always be the same number of steps between the 'W' member and the 'YTD' member, e.g. if your hierarchy is something like:
    Time
    .Weeks
    ..W2008-03-07
    ..W2008-03-10 etc.. for 52 weeks
    .YTD
    ..YTD2008-03-07
    ..YTD2008-03-10 etc.. for 52 weeks
    In your report select 'Current Point of View for Time' in one row/column and in the other use:
    RelativeMember set up as follows:
    Member: Current Point of View for Time
    Offset: 52
    Hierarchy: Time
    RelativeMemberList: Lev0, Time
    UseFirstDescendant: leave unselected
    Hope this helps
    StuartGame
    www.analitica.co.uk

  • Compare two oracle db's

    Hi All,
    We have two oracle databases and I would like to compare the structure changes in tables, views, procedures, functions etc.
    I found a very good tool (i.e. DBDiff for Oracle) but its Demo and only doing first five structure changes.
    Does anyone know any other tool or aware of some scripts which solves the above purpose.
    Thanks

    Create a database link between the two databases. Then run:
    SELECT OWNER, OBJECT_NAME, OBJECT_TYPE from DBA_OBJECTS
    minus
    SELECT OWNER, OBJECT_NAME, OBJECT_TYPE from DBA_OBJECTS@the_db_link_u_created
    That will show you the objects that are on the local database that are not on the db_link database. Just reverse the select@ to show results the other way.

  • Compare two database

    In oracle 9.2, I need to compare two databases whether they are in sync with table structures, views, procedures and functions. Please guide me.
    Thanking you in anticipation.
    Regards
    Vijay Kumar

    See also Re: Bulit-in packages - Help

  • Compare two schema

    Hi all
    I need to compare two schema structures. I tried to do so using the utility in OEM in Change Management Pack. I am unable to create the baseline, it is giving me following error.
    VBO-1508:An error has occurred and the server object could not be initialized. Please disconnect and try again. ORA-06552: PL/SQL:Compilation unit analysis terminated ORA-06553:PLS-553:character set name is not recognized
    This error is occuring while it is trying to read metadata of synonyms.
    Kindly guide me to resolve the error.
    Awaiting your timely replies.
    Regards
    Vijay Kumar

    I think you have a mismatch in the characterset
    Doc ID: Note:286964.1
    Have a look into that document

Maybe you are looking for