Table compare

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.

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

Similar Messages

  • Table compare deleting rows which does not exist in target table

    Hi Gurus,
    I am struggling with an issue in Data Services.
    I have a job which uses Table Compare, then History Preserving and then a Key Generation transforms.
    There is every possibility that data would get deleted from the source table.
    Now, I want to delete them from the target table also.
    I tried Detect deleted rows but it is not working.
    Could some one please help me on this issue.
    Thanks,
    Raviteja.

    Doesn't history preserving really only operate on "Update" rows.  Wouldn't it only process the deletes if you turned the "Preserve Delete row(s) as update row(s)" on?
    I would think if you turned on Detect Delete rows in the Table compare and did not turn this on in the history preserving it would retain those rows as delete rows and effectively remove them from the target.
    Preserve delete row(s) as update row(s)
    Converts DELETE rows to UPDATE rows in the target warehouse and, if you previously set effective date values (Valid from and Valid to), sets the Valid To value to the execution date. Use this option to maintain slowly changing dimensions by feeding a complete data set first through the Table Comparison transform with its Detect deleted row(s) from comparison table
    option selected.

  • Get the values from a table comparing fields of different data types

    Hi Experts,
    I want to fetch AFVC-AUFPL and AFVC- APLZL by passing WBS element from a ztable.
    select aufpl aplzl
      from  afvc
      into TABLE gt_afvc
      FOR ALL ENTRIES IN gt_boq
      where projn = gt_boq-posid.
    AFVC-PROJN - NUMC 8  (WBC ELEMENT)
    ZTABLE-POSID - CHAR24 (WBC ELEMENT)
    How to get aufpl and aplzl by comparing those 2?
    Regards
    Mani

    WBS element does have an conversion routine at the domain level. So sometimes you work with one format (8 digits) and sometimes with 24 digits.
    You use FMs
    CONVERSION_EXIT_ABPSP_INPUT
    CONVERSION_EXIT_ABPSP_OUTPUT
    to convert between values. Do your conversion before your select and do not forget to use a large enough data element for the field, which gets the 24-digits long value of the field.

  • Script for comparing 2 schemas based upon table compare

    Hi,
    I want to write a script on 2 schemas TEST and TEST1 which will compare the difference in tables in both schemas and will Insert Data
    into schema TEST from TEST1 depending upon the matched columns in schema TEST and TEST1
    Any help will be nedful for me

    I want to write a script on 2 schemas TEST and TEST1 which will compare the difference in tables Differences in METADATA or differences in data.?
    It would be helpful if you provided DDL for tables involved.
    It would be helpful if you provided DML for test data.
    It would be helpful if you provided expected/desired results & a detailed explanation how & why the test data gets transformed or organized.

  • Merging SAP Clients - Reporting on Cross Client Table Compare Results

    Hey folks,
    We are trying to merge two clients into one (on the cheap), i think that cross client table comparision is the best way to find differences and possible issues and clashes with the two systems configuration, but i was wondering if there is anyway to report on these differences, so we can pull them out to word/excel document to anaylse and document them prior to making the changes.
    Does anyone know if this possible?
    Thanks a lot,
    Greg

    Hello Mr. Newman,
    I think using SCU0 is going to be the way to go but the output is not always the best. However you should be able to show the differences and download to excel to analyse further. If this doens't fit then I think you will have to look at copying the tcode / report and improving the output to meet your needs.
    Alternatively post to basis folks and see if they have some better ideas!
    Hope this helps,
    Cheers,
    Dan
    Edited by: Danny boy on Mar 31, 2010 3:00 PM

  • Table compare and derive alter script between 2 schemas

    I am in Oracle 10g.
    We are in need to synchronise table structures between two different database.
    and execute the alter script in the target database.
    I have an idea to find the tables which have the table definition changed using all_tab_columns and datbase link;
    A sample of it as below:
    prompt
    prompt columns having same name but difference in datatype or length:
    prompt -------------------------------------------------------------------------
    select
    a.column_name, a.data_type, a.data_length, a.data_scale,a.data_precision,
    b.column_name, b.data_type, b.data_length, b.data_scale,b.data_precision
    from
    all_tab_columns a, all_tab_columns@link b
    where
    a.table_name in (select tablename from test) and
    a.table_name = b.table_name and
    a.column_name = b.column_name and
    a.data_type <> b.data_type or
    a.data_length <> b.data_length or
    a.data_scale <> b.data_scale or
    a.data_precision <> b.data_precision
    prompt columns present in &table1 but not in &table2
    prompt ----------------------------------------------
    select
    column_name
    from
    all_tab_columns@link
    where
    table_name in (select tablename from test)
    minus
    select
    column_name --, data_type, data_length, data_scale, data_precision
    from
    all_tab_columns
    where
    table_name in (select tablename from test) ;
    prompt columns present in &table2 but not in &table1
    prompt ----------------------------------------------
    select
    column_name --, data_type, data_length, data_scale, data_precision
    from
    all_tab_columns@link
    where
    table_name in (select tablename from test)
    minus
    select
    column_name
    from
    all_tab_columns
    where
    table_name in (select tablename from test)
    just looking for idea to derive the alter scripts on these? Please share your ideas on this.

    You don't have to write lots of triggers. You only need to write one trigger e.g :-
    create table ddl_audit
    (audit_date date,
    username varchar2(30),
    instance_number integer,
    database_name varchar2(9),
    object_type varchar2(19),
    object_owner varchar2(30),
    object_name varchar2(128),
    sql_text varchar2(2000));
    create or replace trigger BEFORE_DDL_TRG before ddl on database
    declare
    l_sql_text ora_name_list_t;
    l_count NUMBER;
    l_puser VARCHAR2(30) := NULL;
    l_sql varchar2(2000);
    begin
    l_count := ora_sql_txt(l_sql_text);
    l_puser := SYS_CONTEXT('USERENV', 'KZVDVCU');
    l_count := ora_sql_txt(l_sql_text);
    for i in 1..l_count
    loop
    l_sql := l_sql||l_sql_text(i);
    end loop;
    insert into ddl_audit (audit_date, username, instance_number, database_name, object_type, object_owner, object_name, sql_text)
    values (sysdate, l_puser,ora_instance_num,ora_database_name,ora_dict_obj_type,ora_dict_obj_owner,ora_dict_obj_name,l_sql);
    exception
    when others then
    null;
    end;
    show errors;

  • Article number is missing for a sales document in VBAP table compared to BW data.

    Hi,
    We are loading data from 2LIS_11_VAITM and 2LIS_11_V_SSL to 0SD_O01, when we execute a report based on this DSO we are getting Article number 2224859 (for example) for sales order 573345 (for example) but when we check in VBAP/VA03 for the same sales order/document (573345)  we don't have the Article Number.
    It is delta load to the DSO from the two datasources and will executed daily once.
    Please suggest me any one on this.

    All,
    Thanks for your replys.
    Here are the more details about this.
    We are using 3.X flow in BW. (3.x Data sources)
    In BW                                           Mapping                In ECC     
    0DOC_NUMBER    Sales document  ----------->  VBELN          Sales Document
    0MATERIAL           Material  -----------------------> MATNR           Article Number
    In VBAP table, I have entered Sales document 573345 and executed then I got so many Article Numbers and Filtered with Article Number 2224859 then got no data.
    As I told earlier in BW for the same Sales Document number we have Article Number.
    We have start routine.
    PROGRAM UPDATE_ROUTINE.
    *$*$ begin of global - insert your declaration only below this line  *-*
    *$*$ end of global - insert your declaration only before this line   *-*
    * The follow definition is new in the BW3.x
    TYPES:
      BEGIN OF DATA_PACKAGE_STRUCTURE.
         INCLUDE STRUCTURE /BIC/CS2LIS_11_VAITM.
    TYPES:
         RECNO   LIKE sy-tabix,
      END OF DATA_PACKAGE_STRUCTURE.
    DATA:
      DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE
           WITH HEADER LINE
           WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.
    FORM startup
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
               MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n
               DATA_PACKAGE STRUCTURE DATA_PACKAGE
      USING    RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    *$*$ begin of routine - insert your code only below this line        *-*
    * fill the internal table "MONITOR", to make monitor entries
      LOOP AT DATA_PACKAGE.
        IF DATA_PACKAGE-doc_categ NE 'C' AND
           DATA_PACKAGE-doc_categ NE 'I'.
          DELETE DATA_PACKAGE.
        elseif DATA_PACKAGE-recordmode eq 'R'.
          DATA_PACKAGE-recordmode = 'X'.
          modify DATA_PACKAGE.
        ENDIF.
      ENDLOOP.
    * if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    *$*$ end of routine - insert your code only before this line         *-*
    ENDFORM.
    I think there is no much more lookups. ( I don't have much knowledge in ABAP)
    I have checked in another tables also like VBFA VBAG VBAK, VBKD, VBUK and VBUP but in those tables I don't have Article (MATNR) field.
    One more Question.
    Can any one tell me how the Queued Delta mechanism will work.
    As of now I know that, when ever any changes have been done to the tables this will pickup the changes and move into LBWQ after that RSA7.
    My Question is, If some one has forcefully deleted one Article number from the table for a Sales Order then this Queued delta will pick that also?
    Please let me know If you need any more details

  • Tables compare whether they are equal

    i will check of my replicated in oracle streams schema tables and row are equal.
    how can do this is there any query to do this?
    greet.
    Shamier

    considering the fact that minus will return distinct rows we cant use it to find exact difference.
    SQL> select * from a
      2  /
            NO
             1
             2
             3
             4
             5
             6
             7
             7
    8 rows selected.
    SQL> select * from b
      2  /
            NO
             1
             2
             3
             4
             5
             6
             7
    7 rows selected.
    SQL> select no from a
      2  minus
      3  select no from b
      4  /
    no rows selectedThanks,
    Karthick.

  • How to compare each row in an internal table

    Hi,
    Say I have an internal table with 3 fields in each row, num1, num2, num3, each type of integer i, now I want to get the maximum of num1, num2, num3 and put this maximum number into num4, may I know how can I do that? Also, if say I need to pull out this num4 and play around with it, sould I just loop it into my workarea of internal table and assign a variable for whatever that is in the work area? Thanks a lot!
    Regards,
    Anyi

    Hi,
    Inside a loop of the table compare each field like this:
    loop at itab.
    l_num4 = itab-num1.
    if l_num4 < itab-num2. l_num4 = itab-num2. endif.
    if l_num4 < itab-num3. l_num4 = itab-num3. endif.
    Here you can play with the maximum number
    itab-num4 = l_num4.
    modify itab.
    endloop.
    You can also do the same using field-symbols (it's faster to assignations) :
    loop at itab assigning <a>.
    endloop.
    Regards.

  • PL/SQL Pipelined Function to Compare *ANY*  2 tables

    I am trying to create a pipelined function in 10g R1 that will take the name of two tables, compare the the tables using dynamic SQL and pipe out the resulting rows using the appropriate row type. The pipelined function will be used in a DML insert statement.
    For example:
    create table a (f1 number, f2, date, f3 varchar2);
    create table b (f1 number, f2, date, f3 varchar2);
    create table c (f1 number, f2, date, f3 varchar2);
    create or replace TYPE AnyCollTyp IS TABLE OF ANYTYPE;
    create or replace TYPE CRowType IS c%ROWTYPE;
    create or replace TYPE CRowTabType IS table of CRowType;
    CREATE OR REPLACE FUNCTION compareTables (p_source IN VARCHAR2, p_dest IN VARCHAR2)
    RETURN AnyCollTyp PIPELINED
    IS
    CURSOR columnCur (p_tableName IN user_tab_columns.table_name%TYPE)
    IS
    SELECT column_name, column_id
    FROM user_tab_columns
    WHERE table_name = p_tableName
         ORDER BY column_id;
    l_cur sys_refcursor;
    l_rec ANYTYPE;
    l_stmt VARCHAR2 (32767);
    BEGIN
    l_stmt := 'select ';
    FOR columnRec IN columnCur (p_dest)
    LOOP
    l_stmt := l_stmt || CASE
    WHEN columnRec.column_id > 1
    THEN ','
    ELSE ''
    END || columnRec.column_name;
    END LOOP;
    l_stmt := l_stmt || ' from ' || p_source;
    l_stmt := l_stmt || ' minus ';
    l_stmt := l_stmt || ' select ';
    FOR columnRec IN columnCur (p_dest)
    LOOP
    l_stmt := l_stmt || CASE
    WHEN columnRec.column_id > 1
    THEN ','
    ELSE ''
    END || columnRec.column_name;
    END LOOP;
    l_stmt := l_stmt || ' from ' || p_dest;
    OPEN l_cur FOR l_stmt;
    LOOP
    FETCH l_cur
    INTO l_rec;
    PIPE ROW (l_rec);
    EXIT WHEN l_cur%NOTFOUND;
    END LOOP;
    CLOSE l_cur;
    RETURN;
    END compareTables;
    The pipelined function gets created without error. However, the testCompare procedure gets an error:
    SQL> create or replace procedure testCompare is
    begin
    insert into c
    select *
    from (TABLE(CAST(compareTables('a','b') as cRowTabType)));
    dbms_output.put_line(SQL%ROWCOUNT || ' rows inserted into c.');
    end;
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TESTCOMPARE:
    LINE/COL ERROR
    3/4 PL/SQL: SQL Statement ignored
    5/47 PL/SQL: ORA-22800: invalid user-defined type
    Does anyone know what I am doing wrong? Is there a better way to compare any two tables and get the resulting rows?

    904640 wrote:
    Hi All,
    Is it possible to post messages to weblogic JMS queue from pl/sql procedure/function?
    From this Queue, message will be read by OSB interface.
    Any help will be highly appreciated.
    http://www.lmgtfy.com/?q=oracle+pl/sql+weblogic+jms+queue

  • Avoid SUPPLEMENTAL LOG while comparing 2 tables using dbms_metadata_diff()

    Hi,
    I am using ORACLE DATABASE 11g R2. I am using a inbuilt package dbms_metadata_diff.compare_alter() to compare 2 tables and get the alter statements for them. I have applied GOLDEN GATE on one of the Schema's and as per the process we need to apply SUPPLEMENTAL LOGGING on the database. So when 2 tables are compared it also gives me the difference about the SUPPLEMENTAL LOG. I want to compare 2 tables but it should avoid the difference of the SUPPLEMENTAL LOG group.
    Below is a part of code which I use :-
    dbms_metadata.set_transform_param(DBMS_METADATA.SESSION_TRANSFORM,  -- Parameter to keep the DDL pretty.
                                                'PRETTY',
                                                TRUE);
              dbms_metadata.set_transform_param(DBMS_METADATA.SESSION_TRANSFORM, -- To put an SQL terminator(;) at the end of SQL.
                                                'SQLTERMINATOR',
                                                TRUE);
              dbms_metadata.set_transform_param(dbms_metadata.session_transform, -- Not to consider the SEGMENT attributes for comparison.
                                                'SEGMENT_ATTRIBUTES',
                                                false);
              dbms_metadata.set_transform_param(dbms_metadata.session_transform, -- Not to include the STORAGE clause.
                                                'STORAGE',
                                                false);
              dbms_metadata.set_transform_param(dbms_metadata.session_transform, -- Not to include the TABLESPACE Info.
                                                'TABLESPACE',
                                                false);
    -- Here I want some parameter which should avoid the SUPPLEMENTAL LOG group difference.
    SELECT dbms_metadata_diff.compare_alter('TABLE',    -- Compare 2 tables with respect to above parameters and give output as ALTER STATEMENTS.
                                                      V_OBJECT_NAME,
                                                      V_OBJECT_NAME,
                                                      V_DEST_SCHEMA_NAME,
                                                      V_SOURCE_SCHEMA_NAME,
                                                      null,
                                                      'DBLINK_TEMP')
                into V_TAB_DIFF_ALTER
                FROM dual;In the current case for all tables i get the output as below :- (sample table output)
    ALTER TABLE "BANK"."BA_EOD_SHELL_DRIVER" DROP SUPPLEMENTAL LOG GROUP GGS_BA_EOD_SHELL_DR_199689;I don't want such alter statements in my output as i am not going to execute this on the schema , because i need SUPPLEMENTAL LOG for GOLDEN GATE.
    Please suggest me some solution on it.
    Thanks in advance.

    It probably won't answer the question...
    The DBMS_METADATA_DIFF.COMPARE_ALTER function will return a CLOB containing all the ALTER TABLE statements.
    I have noticed that you hold your resoult in V_TAB_DIFF_ALTER variable. Why don't you search what you need and remove it?
    "The DBMS_LOB package provides subprograms to operate on BLOBs, CLOBs, NCLOBs, BFILEs, and temporary LOBs. You can use DBMS_LOB to access and manipulation specific parts of a LOB or complete LOBs."

  • Merging of multiple rows in an internal table as a single record

    Hi All,
    I have an internal table which has the following columns:
    text, date, time, user.
    it stores notes in the internal table.
    The problem is...when I save a note with multiple lines and spaces it saves each line of the note as a row in the internal table.
    Thus i get more no. of rows in the internal table compare to the no. of rows!
    I need to store each notes as single row in the internal table.
    Please advise how to approach this?
    Helpful answers will be rewarded.
    Thanks & Regards,
    Anshumita.

    You can create a deep internal table. You can declare one Column as an internal table and store the NOTES in that Internal table for each row.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
    you can check the example in the link
    regards,
    abhishek

  • Are there any (dis)advantages in building a universe on fully normalized tables instead of building dimensional model/tables and then universe on top of them?

    Hello,
    I’m hoping someone can help me with understanding advantages and disadvantages if we want to build a universe on top of a fully normalized tables, compared to using a dimensional model with star schemas.
    I’ve read some discussions here that say that it is possible to create a universe on top of normalized tables. Then, can we avoid building of dimensional tables (a data mart), and just use normalized tables? I would say that it is easier to use star schema dimensions and facts tables to build a universe, but our end users might ask “why do we have to go through building a dimensional data mart, if we can have same reports with hierarchies and drill-down functionality based on a universe built on top of our already existing normalized tables?”
    Can you point me to some established best practices regarding using normalized tables to build a universe? Any documents with some examples for this?
    Any expected difficulties during design/development phase of our universe, related to using normalized tables?
    Any expected performance degradation if we use normalized tables compared to using dimensional tables?
    Can I build universe more easily if I transform (modify) our normalized model (by using alias tables and views) to look like snowflake model?
    I’m using BOE XI 3.1, tables are in Oracle 11.2.
    Thank you

    Few Disadvantages that I usually face when building universe on Normalized tables,
    1. Performance - Read operations have to suffer because indexing strategies do not go well with table joins
    2. Derived Tables - Due to complex Queries/ Logic, most of the time, end-up creating derived tables, which doesn't use back-end table indexes and slows down the report runtime.
    3. Normalized table/ Transaction tables may not always have proper cardinality and often results in Cartesian products
    4. Normalized tables may not have tight referential integrity and may have to join more than one column and join on varchar, etc whereas, good Dimensional model datawarehouse will have proper keys/ integer joins and not always necessary to join on multiple fields
    5. Often deal with Fan and Chasm Traps
    6. Dealing with Database fields with nulls, blanks, date in numeric format, etc.,
    7. No Facts, Dimensions separated and most of the time they are in same table
    and More...
    If performance is not a matter and building Datawarehouse is a big deal, then I will start building Universe on normalized tables by having the database diagram as reference for Joins, contexts, etc
    Note: After dealing with universes based on normalized tables for few years (by creating views, complex sql queries data loading to tables and unv on these tables, derived tables), I ended up creating star-schema dimensional model (couple of months extra ETL work), users/ developers felt lot better when they have to create standard/ ad-hoc reports and they are super fast compared to previous universes.

  • Sql Loader Vs External table? Which one is preffered?

    Hello guru,
    We trying to load the data into about 160 tables. Here are the following things we are doing currently,
    1. We get the flat file in .txt format
    2. We are writing the control file for each flat file for thier respective tables
    3.And we are using sql loader command to load this data into the table.
    I was wondering if this process is cumbersome, and i m not sure if external table could be simple in loading the tables compared to what we are doing ?And i have not used external tables, so wanted to know which on eis better ? So any idea is greatly appriciated !
    FYI.. Version :- Oracle 11g
    Thank you so much!

    Thanks for you reply justin !
    I found the below example for loading the data into external table...
    CREATE OR REPLACE DIRECTORY dat_dir AS 'C:\Oradata\Data';
    CREATE OR REPLACE DIRECTORY log_dir AS 'C:\Oradata\Log';
    CREATE OR REPLACE DIRECTORY bad_dir AS 'C:\Oradata\Bad';
    GRANT READ ON DIRECTORY dat_dir TO scott;
    GRANT WRITE ON DIRECTORY log_dir TO scott;
    GRANT WRITE ON DIRECTORY bad_dir TO scott;
    CREATE TABLE revext (person      VARCHAR2(20),
                         rev_jan     NUMBER(4),
                         rev_feb     NUMBER(4),
                         rev_mar     NUMBER(4),
                         rev_apr     NUMBER(4),
                         rev_mai     NUMBER(4),
                         rev_jun     NUMBER(4),
                         rev_jul     NUMBER(4),
                         rev_aug     NUMBER(4),
                         rev_sep     NUMBER(4),
                         rev_oct     NUMBER(4),
                         rev_nov     NUMBER(4),
                         rev_dez     NUMBER(4))
    ORGANIZATION EXTERNAL
       TYPE ORACLE_LOADER
       DEFAULT DIRECTORY dat_dir
       ACCESS PARAMETERS
         records delimited by newline
         badfile bad_dir:'revext%a_%p.bad'
         logfile log_dir:'revext%a_%p.log'
         fields terminated by ','
         missing field values are null
         ( person,
           rev_jan,
           rev_feb,
           rev_mar,
           rev_apr,
           rev_mai,
           rev_jun,
           rev_jul,
           rev_aug,
           rev_sep,
           rev_oct,
           rev_nov,
           rev_dez
       LOCATION ('revext.dat')
    PARALLEL 4
    REJECT LIMIT UNLIMITED;
    CREATE TABLE revenue (
        person       VARCHAR2(20),
        month        VARCHAR2(3),
        revenue      NUMBER,
        CONSTRAINT revenue_pk PRIMARY KEY (person,month));
    INSERT INTO revenue (person,month,revenue)
       SELECT person,'Jan',rev_jan
       FROM revext--but currently we are using sql loader, our data looks like this
      1119Smith      01/01/1982AXYZ corporation  xyz corp
      1111collen      01/01/1990AABC corporation  abc corp
         and control file is like this
    INTO TABLE "XYZ_tbl"
       ID                     POSITION(01:05)        CHAR                  "DECODE(RTRIM(:ID), NULL, 'NA', :ID)"       ,
       Name                POSITION(06:15)        CHAR                  "DECODE(RTRIM(:NAME), NULL, 'NA', :Name)"   ,
       Act_dt              POSITION(16:25)        DATE                  "MM/DD/YYYY" NULLIF ACT_DT=BLANKS
    My question is, can i use the options like NULLIF/ DECODE or changing datatypes when loading or functions like REPLACE / TO_DATE in External tables ? Any idea? Any example code or SQL will great
    Thank you so much!

  • Set operations on Internal tables.

    Hi,
      Last week i had to enhance a program that has a internal table with some records. I need to find populate a table with the records in the internal table. But before populating i must find out the difference in the records (i.e) the extra records in the internal table compared with the records in the database table and then i have to append those records in the internal table again and then insert the internal table records into database table. while doing it i need to create another internal table with records in database table and then loop at it to find the extra records and rest of the logic goes on.
      At this point of time it clicked in my mind "WHY DON'T WE HAVE SET OPERATIONS ON TWO INTERNAL TABELS(UNION, INTERSECTION, MINUS)".
      Now i am doing some study how to implemnt it. Before that i want to find out whether that functionality exists in ABAP or anybody of youo gurus have done similar work on it.
    Pls help me in proceeding with my work.

    Hi Arul,
    There is no special aided SET operations upon internal tables in ABAP. Concerning your particular task I would say that you can try INSERT statement for each record in your internal table without preliminary comparing them with DB table. If there is a record in DB table with the same key then sy-subrc after INSERT will be non zero (actually 4) and no real insert would occur. So, only those records would be inserted which have no counterpart in DB table.
    Best regards, Sergei

Maybe you are looking for

  • Please help, iPhone 5 stuck in recovery mode and will not update.

    I tried to update my girlfriend's iPhone 5 (AT&T) from 6.1.2 to 7.0.4 last night and something went wrong so of course I had backed it up so I put the phone into recovery mode and attempted to completely restore it and then restore from back-up (or a

  • Error while deploying Composite to SOA 11.1.1.3.0 cluster

    This is the error we are getting while deploying the composite to a cluster from the em console. We deploy from the em console . We choose node1 and then deploy it to the partition default .For node 2 also we do the same. Deploying on partition "defa

  • Airport Extreme Not Seeing Hard Drives

    When I first installed Leopard, everything worked great, no issues with APEn connection or with my USB drive attached to it. Because transfer speeds are terribly slow to the hard drive (only 0.5-1 MBps when 802.11n should theoretically be getting me

  • Workflow log in error

    Hi, I have one workflow log for ivoice. It is in error stste in one step. I have restaterd the main workflow using swpr . Still the workflow is in error. User wants to complete the workflow in any case. But if I use SWIA then it says that error workf

  • Plot 3d curves at once

    hello all together, is there a way to plot for example 10 3d-curves at once in a 3d graph instead of sequentially? thanks for the feedback !