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

Similar Messages

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

  • 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

  • How to compare two PLSQL tables dynamically.

    Hi,
    Can you any body help for the following scenario,
    I have two PLSQLtables with same structure ,Each PLSQL table contains more than 100 columns.
    Now I want to compare content of the two PLSQL tables column wise.
    I Knew allready one method like below
    FOR I IN 1..100
    LOOP
    IF PLSQL_1_TAB(I).ACCT_NO = PLSQL_2_TAB(I).ACCT_NO THEN
    INSERT INTO …....
    END IF;
    END LOOP;
    is there any method to compare two PLSQL tables dynamically
    Edited by: RAVI KUMAR.T.V. on May 5, 2011 11:51 PM

    Hi Saubhik,
    Thanks for your reply..
    See the below code..
    DECLARE
    CURSOR cur_emp IS
    SELECT *
    FROM emp
    WHERE job = 'MANAGER';
    TYPE typ1 IS TABLE OF emp%ROWTYPE INDEX BY BINARY_INTEGER;
    v_pl_old typ1;
    v_pl_new typ1;
    BEGIN
    OPEN cur_emp;
    FETCH cur_emp INTO v_pl_old(1);
    CLOSE cur_emp;
    UPDATE emp SET comm = comm+1000 WHERE hiredate < '01-MAY-1981' AND job = 'MANAGER';
    COMMIT;
    OPEN cur_emp;
    FETCH cur_emp INTO v_pl_new(1);
    CLOSE cur_emp;
    IF v_pl_old(1) = v_pl_new(1) THEN
    DBMS_OUTPUT.PUT_LINE('Latest comm not yet Updated');
    ELSE
    DBMS_OUTPUT.PUT_LINE('Latest comm Updated');
    END IF;
    END;
    When the above code is executed iam getting the following error :
    ORA-06550: line 19, column 19: PLS-00306: wrong number or types of arguments in call to '='
    ORA-06550: line 19, column 4: PL/SQL: Statement ignored
    Here in the example I have taken the standard EMP table, but
    actually, Iam having a bigger table with 90 columns of different datatypes,
    in which some of the columns gets updated after some UPDATE statements executed based on some conditions.
    Now, my requirement is to compare the values of each and every column in the table before and after the execution of the UPDATE statements,
    and to insert the modified values only along with the primary key column value into in a new table of similar structure.
    If I write the code (to compare the values of each and every column in the table, and if the value is modified then insert that value along with the primary key value into a different talbe) then as the table is having many columns (90), the code becomes lengthy..
    Is there any alternative method which does the same with shorter code.
    Can you please give me an idea/sol. to meet my requirement.
    Thanks..
    Edited by: RAVI KUMAR.T.V. on May 9, 2011 2:43 AM

  • Compare two dynamic variables

    Hello,
    I'm struggeling comparing two variables against each other as seen below. I have some AD-group names in a csv file, and I have a  variable($getGroup) with results from a Get-ADGrup-query.
    I'd like to filter out the groups of the csv-file from the variable, so "$getGroup" in this example should end up empty. 
    In the example below, the return is the two groups, so it doesn't get filtered out. How can I do that?
    Contents of exclude.csv:
    Name,Comment
    "AD,Group1","Some comment"
    "AD*Group2","Some comment"
    $excluded = Import-CSV 'C:\temp\exclude.csv'
    $getGroup = Get-ADGroup -Filter * | Where-Object {$_.Name -like '*,*' -or $_.Name -like '*#*' -or $_.Name -like '*+*' -or $_.Name -like '*"*' -or $_.Name -like '*\*' -or $_.Name -like '*<*' -or $_.Name -like '*>*' -or $_.Name -like '*;*'}
    #At this point $getGroup returns two groups; AD,Group1 and AD*Group2
    $getGroup = $getGroup | Where-Object {$_.Name -notlike $excluded.Name}
    $getGroup

    Hi,
    If you have actual group names in your input CSV, try this:
    $excludedGroups = Import-Csv .\excludeGroups.csv | Select -ExpandProperty Name
    Get-ADGroup -Filter * -SearchBase 'OU=Testing,DC=domain,DC=com' |
    Where { $excludedGroups -notcontains $_.Name }
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • 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

  • 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
    */

  • 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

  • Apps Not Downloading in App Store 10.6.8

    I am running Snow Leopard 10.6.8 on a 2010 iMac, and I'd like to upgrade to Yosemite.  However, any time I click the "Get" button in the app store, the button just turns gray and nothing happens at all.  This is also happening on my 2006 Macbook Pro

  • Whatsapp for nokia asha 200

    As there are many dual sim phones in market which supports whatsapp, i want to give advice or suggestion to nokia developer community that they should make asha 200 compatible for whatsapp as in asha 201 in there next software update. It doesn't matt

  • Cannot install Headstart 2.1.2 due to strange error.

    I'm trying to install Headstart 2.1.2.0.2 on an Oracle 8.1.5.0.0 clean DB and Designer 6.0 After selecting a home in the installer and assigning a directory I want to install Headstart but the installer immediately errors out with the following messa

  • I want to make a list of my log in names and passwords that are stored in my Firefox profile to give my wife

    Wife and I are old. I am afraid if I die my dear wife won't be able to access any of our joint bank and investment accounts. All I want to do is provide a list for her. I can see the list in the Security window. I highlighted the list, but cannot cop

  • Windows Domain Thuursby and Centrify..which one..both?

    I am looking at have my Mac environment integrate with my Windows environment. I have 30x as many windows clients as Mac's I have the typical Windows office environment...AD, File Servers,Group Policies..etc, I rather not have to go through expense o