Plzzzzz doubt in concatenating of tables

Hi i have to Concatenate EKPO-WERKS + EKKO-LIFNR + EKPO-MATNR and put this value in KONH-VAKEY     so i was a little bit confused to do this can u give me any suggestion to do this operation whether i have to use database view or an query in select statement if you suggest to write a query in report it self then please provide me an example plzzzz

okay ..
see take a purchase order number and pass it as a parameter into this code for ur understanding .
report zex1.
parameters: p_ebeln like ekko-ebeln.
data : val like konh-vakey.
data  : begin of itab occurs 0 ,
        bukrs like ekko-bukrs,
        ebeln like ekko-ebeln,
        matnr like mara-matnr,
        lifnr like lfa1-lifnr,
        werks like marc-werks,
        end of itab.
start-of-selection.
select a~ebeln
       a~bukrs
       a~lifnr
       b~matnr
       b~werks
       from ekko as a join ekpo as b
       on a~ebeln = b~ebeln
       into table itab
       where a~ebeln = p_ebeln.
       loop at itab.
       at first.
       write:/5 'PONUM',
             18 'MATNR',
             40 'PLANT',
             48 'VENDOR',
             62 'COMPANY CODE'.
       endat.
        write:/5  itab-ebeln,
               18 itab-matnr,
               40 itab-werks,
               48 itab-lifnr,
               62 itab-bukrs.
       endloop.
loop at itab.
     concatenate itab-werks itab-lifnr itab-matnr
                 into val separated by space.
     write:/ val.
endloop.
this is solely for ur understanding.
to praveen
If this is a report program and not updating any standard tables or ztables then its fine but if u r going to update anytable  then i advise u to understand the scenario of updating the conditions from ur seniors and mainly the Functional consultant .
next for ur query u need to understand the pricing and conditions and the changes
from Po in goto-me23  header --conditions ..
start analysing what is condition record and condition number for a PO .
best of luck ..
regards,
vijay.

Similar Messages

  • Doubt in compression of tables

    Hello,
    I have a doubt regarding compression of tables.
    I just compressed three tables in my Database and took a dump of the compressed tables. And later i took the dump of the same uncompressed tables (having same data as compressed table). But there was no difference in the file size of the two dumps..Both the dump having compressed tables and uncompressed tables are of the same size, infact the dump of compressed tables is slightly larger by some MBs compared to dump of uncompressed tables..
    My doubt is why is the size of the dumps not varied..Will compressing does not change the physical size of the data file??

    Table compression is supported (and useful) in following cases:
    1) direct path sqlloader,
    2) create table as select
    3) parallel inserts or inserts with append hint
    4) single-row or array insert and updates
    If you want to compress dump data, use compression feature of datapump (11g)
    Note: advanced compression is an SE/EE option and needs an extra licence .
    Werner

  • Doubt in concatenating strings

    Hi all,
    Am concatenating two strings and i want space of 10 characters.
    If i use concatenate text1 text2 into text3 separated by space
    it is dispalying as : text1 text2
    But my requirement is to display text with gap of 10 characters
    ::::::text1                               text2

    Hello,
    If u want to use it in ALV then u should do like this.
    I have did the same thing for TOP_OF_PAGE do the same for end_OF list
    GO therough this code..
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM          = IT_VARIANT-REPORT
    <b>            I_CALLBACK_HTML_TOP_OF_PAGE = 'TOP_OF_PAGE'</b>     <b>Herechange to END_OF_LIST</b>        IT_FIELDCAT                 = IT_FIELDCAT
                I_SAVE                      = 'A'
                IS_VARIANT                  = IT_VARIANT
                IT_EVENTS                   = IT_EVENTS
           TABLES
                T_OUTTAB                    = G_T_OUTTAB
           EXCEPTIONS
                PROGRAM_ERROR               = 1
                OTHERS                      = 2.
    FORM TOP_OF_PAGE USING CL_DD TYPE REF TO CL_DD_DOCUMENT.    "#EC *
      DATA: L_F_INFO(255).
      DATA: LV_COUNT TYPE SDYDO_TEXT_ELEMENT,
            LV_PER TYPE SDYDO_TEXT_ELEMENT,
            LV_NUMC(8) TYPE N.
      CALL METHOD CL_DD->ADD_TEXT
        EXPORTING
          TEXT         = TEXT-008
          SAP_STYLE    = CL_DD_DOCUMENT=>SMALL
          SAP_COLOR    = CL_DD_DOCUMENT=>LIST_HEADING_INT
          SAP_FONTSIZE = CL_DD_DOCUMENT=>SMALL
          SAP_EMPHASIS = CL_DD_DOCUMENT=>STRONG
          STYLE_CLASS  = SPACE.
      CALL METHOD CL_DD->NEW_LINE
        EXPORTING
          REPEAT = 1.
      CALL METHOD CL_DD->ADD_GAP
        EXPORTING
          WIDTH = 25.
      CALL METHOD CL_DD->ADD_TEXT
        EXPORTING
          TEXT         = TEXT-009
          SAP_STYLE    = CL_DD_DOCUMENT=>SMALL
          SAP_COLOR    = CL_DD_DOCUMENT=>LIST_HEADING_INT
          SAP_FONTSIZE = CL_DD_DOCUMENT=>SMALL
          SAP_EMPHASIS = CL_DD_DOCUMENT=>STRONG
          STYLE_CLASS  = SPACE.
      CALL METHOD CL_DD->ADD_GAP
        EXPORTING
          WIDTH = 10.
      CALL METHOD CL_DD->ADD_TEXT
        EXPORTING
          TEXT         = TEXT-010
          SAP_STYLE    = CL_DD_DOCUMENT=>SMALL
          SAP_COLOR    = CL_DD_DOCUMENT=>LIST_HEADING_INT
          SAP_FONTSIZE = CL_DD_DOCUMENT=>SMALL
          SAP_EMPHASIS = CL_DD_DOCUMENT=>STRONG
          STYLE_CLASS  = SPACE.
      CALL METHOD CL_DD->ADD_GAP
        EXPORTING
          WIDTH = 11.
      CALL METHOD CL_DD->ADD_TEXT
        EXPORTING
          TEXT         = TEXT-011
          SAP_STYLE    = CL_DD_DOCUMENT=>SMALL
          SAP_COLOR    = CL_DD_DOCUMENT=>LIST_HEADING_INT
          SAP_FONTSIZE = CL_DD_DOCUMENT=>SMALL
          SAP_EMPHASIS = CL_DD_DOCUMENT=>STRONG
          STYLE_CLASS  = SPACE.
      CALL METHOD CL_DD->ADD_GAP
        EXPORTING
          WIDTH = 15.
    Hope this will be help ful for u.
    If useful reward.
    Vasanth

  • Doubt with creation of table!

    Hi Friends,
    I Have studied that we cannot create tables with that the name of ORACLE SERVER RESERVED clause like select,insert etc. Recenty i came across a query
    Create table TIMESTAMP (
                             ENO NUMBER(1)
                           );TIMESTAMP is a datatype but the table gets created without any errors.
    In this example
    create table "SELECT" (
                            ENO NUMBER(1)
                          );How does oracle differntiate it from the table name and the SELECT clause. I could not understand the logic also of what difference does it make when u give the table name in double quotes.
    Regards,
    Manoj

    Hi,
    This is very important.
    >
    "Nonquoted identifiers cannot be Oracle Database reserved words. Quoted identifiers can be reserved words, although this is not recommended."
    >
    Why? because I don't know about someone that type sql statements with object names between " ". So, anybody can waste a lot of time trying to indetify why the table name is invalid or they think that need to be grented by the correct privileges. So, if you put an object name in lower case between " " you need to referencing it with lower case, same case with upper case object name.
    SQL>create table "SELECT" (id number);
    Table created.
    SQL>select table_name from dba_tables where table_name = 'select';
    no rows selected
    SQL>select table_name from dba_tables where table_name = 'SELECT';
    TABLE_NAME
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    SELECT
    SQL>drop table "SELECT" purge;
    Table dropped.
    SQL>create table "select" (id number);
    Table created.
    SQL>select table_name from dba_tables where table_name = 'SELECT';
    no rows selected
    SQL>select table_name from dba_tables where table_name = 'select';
    TABLE_NAME
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    selectSo, that is very tiring.
    HTH -- johnxjean --

  • Doubt on creating logical table in BMM

    I have a fact table (time fact table) in physical layer. I am adding a new column billable flag.
    This flag is related with w_lov_d table that means it will contain the row wid of W_LOV_D in time fact table.
    I have created a physical alias table(W_LOV_D) and created foreign key relation to time fact table.
    I have created logical dimension table for billable flag in logical table. WHen i create this table, content tab should be at the table itself. I am getting all the table which are listed in the content. But not the table itself.
    How can i bring the table itself in Logical dimension table and
    I didnot find the dimension table under content table of time fact table also.
    Can anyone throw some idea on this?..

    Just drag and drop the attribute from the physical layer to the logical dimension table. You will have the LTS created with the table as content.

  • Doubt with Global Temporary table

    hi,
    i have created a global temporary table with ON COMMIT DELETE ROWS option. in my Function in a loop i m inserting values into this Table, after that loop closes and then i m selecting some other values from DB. and in the last i am returning a ref cursor which is selecting values from temporary table i hav created.
    now the thing is i m not getting any values in the cursor.
    later I have created the table with ON COMMIT PRESERVE ROWS option, in this case cursor returning values,
    can anyone explain me the functionality, as per my knowledge global temporary table values are session specific so why i m not getting the values in the 1st case when i used ON COMMIT DELETE ROWS (same session).
    Thanks
    Piyush

    Ok, here's a simple example, like we'd like to see from you not working....
    First create a GTT with ON COMMIT DELETE ROWS...
    SQL> ed
    Wrote file afiedt.buf
      1* create global temporary table mytable (x number) on commit delete rows
    SQL> /
    Table created.Now a simple function that populates the GTT and returns a ref cursor to the data without doing any commits (hence the data should be there!)
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace function pop_table return sys_refcursor is
      2    v_rc sys_refcursor;
      3  begin
      4    insert into mytable
      5    select rownum from dual connect by rownum <= 10;
      6    OPEN v_rc FOR SELECT x FROM mytable;
      7    RETURN v_rc;
      8* end;
    SQL> /
    Function created.So now we call the function and get a reference to our ref cursor...
    SQL> var v_a refcursor;
    SQL> exec :v_a := pop_table();
    PL/SQL procedure successfully completed.So, in principle, because no commits have been issued the ref cursor should return data...
    SQL> print v_a;
             X
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.... which it does.
    Now, what happens if we do that again...
    SQL> commit;
    Commit complete.
    SQL> exec :v_a := pop_table();
    PL/SQL procedure successfully completed.... but this time we commit before retrieving the data...
    SQL> commit;
    Commit complete.
    SQL> print v_a;
    ERROR:
    ORA-00600: internal error code, arguments: [kcbz_check_objd_typ_1], [0], [0], [1], [], [], [], []
    no rows selected
    SQL>Oracle has (correctly) lost reference to the data because of the commit.
    So show us what yours is doing.

  • Doubts regarding registering a table using AD_DD Package

    Dear Members,
    Please give me some information on the following points:
    1/ Parameter 'P_Nullable' in AD_DD.REGISTER_COLUMN
    I have defined a custom table and in this table there are some primary columns and nullable columns.
    Here my understanding is if the column is primary or not null then we should pass value 'N' to the parameter 'P_Nullable'.If it is a nullable column then we should pass value 'Y' to the parameter 'P_Nullable'.
    Can any one please tell me is this right or wrong?
    2/ Parameter 'P_Col_Width' in AD_DD.REGISTER_COLUMN
    In my custom table I have some date columns defined.In some of the date columns iam storing the date as DD/MM/YYYY and in some of the columns iam storing the date format as DD/MM/YYYY HI:MM:SS.
    For these date columns what width i should mention for the parameter P_Col_Width.
    Your inputs will be of great help to me.
    Thanks in advance.
    Best Regards,
    Arun Reddy.

    Hi, here's a script that queries the rdbms data dictionary to use that information to register the table in oracle apps data dictionary. Regarding your concerns, it takes the adequate value for nullable parameter according to column definition, and for date columns, it doesn't matter the format used, the information is stored internally the same. For the lenght of this column data type what I use is 9 as this is used for seeded information on this type of columns.
    Regarding the script, change the name of the table to the one to register or add more than one in the tablas_tab table variable. For the schema owner of the table, change XXAMX for the custom schema you defined.
    A more "readeable" version is available on http://oracle.am0x.com/2008/02/script-para-registro-de-tablas-en-la.html , a blog I have on oracle applications development topics but is spanish.
    prompt -- ======================================================================
    prompt -- Registrando tablas en el diccionario de datos de la aplicación
    prompt -- ======================================================================
    declare
    type tablas_t is table of varchar2(30) index by binary_integer ;
    tablas_tab tablas_t ;
    cursor columnas_cur(
    b_table_name in varchar2 ) is
    select atc.column_name col_name
    , atc.column_id col_seq
    , atc.data_type col_type
    , decode( atc.data_type
    , 'NUMBER', 38
    , 'DATE', 9, atc.data_length ) col_width
    , atc.nullable nullable
    , 'N' translate
    , data_scale scale
    , data_precision precision
    from all_tab_columns atc
    where table_name = b_table_name ;
    begin
    -- Llenar la tabla con las tablas a registrar
    tablas_tab(1) := 'XXAMX_TABLA_PERSONALIZADA' ;
    for tabs in 1..tablas_tab.count() loop
    ad_dd.register_table(
    p_appl_short_name => 'XXAMX'
    , p_tab_name => tablas_tab( tabs )
    , p_tab_type => 'T' ) ;
    for cols in columnas_cur(
    b_table_name => tablas_tab( tabs )) loop
    ad_dd.register_column(
    p_appl_short_name => 'XXAMX'
    , p_tab_name => tablas_tab( tabs )
    , p_col_name => cols.col_name
    , p_col_seq => cols.col_seq
    , p_col_type => cols.col_type
    , p_col_width => cols.col_width
    , p_nullable => cols.nullable
    , p_translate => cols.translate
    , p_scale => cols.scale
    , p_precision => cols.precision ) ;
    end loop ;
    end loop ;
    end ;
    Message was edited by:
    user651494

  • A doubt on the internal table

    hi guys,
    i'm having a issue where not able to get the data from selected_items below with
    zero_count NE 'X'.
    fact is we have data in the table, however for some unknown reason it doesn't pick up during the looping.
    pleaase kindly advise. thanks.
          IF NOT selected_items[] IS INITIAL.
           LOOP AT selected_items INTO w_selected_items_temp
            LOOP AT selected_items INTO w_selected_items_temp
            WHERE material = wa_picount_items-material
              AND batch = wa_picount_items-batch
              AND zero_count = 'X'.
              IF sy-subrc EQ 0.
                wa_picount_items-zero_count = 'X'.
                qty = 0.
                v_flag = 'X'.
              ENDIF.
            ENDLOOP.
            IF v_flag NE 'X'.
              LOOP AT selected_items INTO w_selected_items_temp
              WHERE material = wa_picount_items-material
                AND batch = wa_picount_items-batch
                AND zero_count NE 'X'.
                IF sy-subrc EQ 0.
                  wa_picount_items-zero_count = ''.
                  v_flag = 'Y'.
                ENDIF.
              ENDLOOP.
            ENDIF.
          ENDIF.

    hi Boon,
    LOOP AT selected_items INTO w_selected_items_temp
    WHERE material = wa_picount_items-material
    AND batch = wa_picount_items-batch
    AND zero_count = 'X'.
    1. are you sure that wa_picount_items-material and wa_picount_items-batch have proper values?
    2. what is the definition of zero_count? (i. e. what is the data element behind?)
    thanks
    ec

  • Doubt on logging the table change

    For the logging the table changes, we have to check log data changes in the technical setting of a table. But came to know that it is not enogh to log the table changes. There is some parameter rec/client, that we need to take into consideration for logging the table changes. Can anyone please help me where exactly can i find that parameter and what changes do i need to make there.

    Hi,
    The logging flag defines whether changes to the data records of a table should be logged. If logging is activated, every change (with UPDATE, DELETE) to an existing data record by a user or an application program is recorded in a log table in the database.
    It has a Dependency:
    Logging only takes place if parameter rec/client in the system profile is set correctly.
    Now rec/client is a system parameter which i think you see in sytem profile but I am not sure how do we go about it.
    Some BASIS consultant can help you on this.
    Regards,
    Mayank Verdia
    Moderator message: copy/paste of parts of the F1 help of field "log data changes", points removed, please do not repeat this behaviour!
    Edited by: Thomas Zloch on Sep 7, 2010 9:39 AM

  • Doubt in PL/SQL table

    If i declared PL/SQL table and populated 10 values.
    If i want to find one perticular values are there in the populated list how can i find.say i have 1 to 10 values .
    and i want to find if 9 is there in the list.
    I tried with loop.Is there any other way.I am using 10g.
    declare
    tr_nm number_array;
    i number;
    begin
    for i in 1..10
    loop
    tr_nm.extend;
    tr_nm(i) := i;
    end loop;
    for j in 1 .. tr_nm.count
    loop
    if tr_nm(j) = 9 then
    i:=i+1;
    end if;
    end loop;
    if i>0 then
    null;
    end if;
    end;

    SQL> SELECT * FROM v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> SET SERVEROUT on
    SQL> DECLARE
    type number_array
    IS
      TABLE OF NUMBER;
      tr_nm number_array := number_array();
      i        NUMBER;
      response BOOLEAN;
    BEGIN
      FOR i IN 1..10
      LOOP
        tr_nm.extend;
        tr_nm(i) := i;
      END LOOP;
      response:=9 MEMBER OF tr_nm;
      IF response THEN
        dbms_output.put_line('9 Is member of tr_nm');
      ELSE
        dbms_output.put_line('9 Is NOT member of tr_nm');
      END IF;
      response:=90 MEMBER OF tr_nm;
      IF response THEN
        dbms_output.put_line('90 Is member of tr_nm');
      ELSE
        dbms_output.put_line('90 Is NOT member of tr_nm');
      END IF;
    END;  2    3    4    5    6    7    8    9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26 
    27  /
    9 Is member of tr_nm
    90 Is NOT member of tr_nm
    PL/SQL procedure successfully completed.

  • Smartforms doubts--more than one table

    Hi Experts,
    I have to create one Smartforms having 2 tables in a different-different position.
    I know, we can create only one main window.  how we can cretae 2 tables whose data can flow for next page also and which window we will use for those tables.
    Regards
    Mohit

    You Can have more than two tables in the main window, but in the preview the two tables will not appear side by side. Bcoz, after executing the first table only, the next table data comes in the other window.
    solution:
    Create a New window (make it as another main window) arrange main1 main2 windows besides.
    create a table in new main window and text element, execute the driver program. it will work, make sure the table width should match the main window width other wise you will get error,
    Thanks
    Ravi

  • Doubt in updating database table

    hi all
    i want to modify values ztable from a internal table ....
    for eg : the ztable contains matnr and accept_qty
    matnr   qty
    mat01   
    mat02
    i need to modify qty of the table .. i am using where condition (ie modify where matnr = ) but where condition is not working for database tables .... how to proceed with this ..
    thanks
    lokesh

    hi,
    before that :- modify statemnt will modify a record if there is record having the same key like that of record in work area.
    if there is no record in itab with key of work area record, it will insert a new record in itab.
    look this sample code.
    *modify internal table
    loop at itab into wa.
    wa-field1 = data1.
    wa-field2 = data2.
    wa-field 3= data3.
    modify itab from wa transporting field1 field2 field3 where key_field = wa-keyfield. "there shuld not be any chang in key field.
    endloop.
    *now update database table
    *work area and data base structure shuld be same type
    if itab[] is not initial.
    modify ztable from table itab.
    endif.
    rgds
    anver
    if hlped pls mark points

  • Doubts in the tables

    Hi All,
    i have a doubt in the following tables.The tables are
    TEBP_ADR_ADD
    TEBP_ADR_SHIP_TO
    Doubt is
    1) What is the purpose of this two tables and relationsip between  
         them.
    2) I found that some address number that are not available in the
         Address master table for Business partner BUT020 and ADRC,so the address no in the above table are related to Business partner.
    3) from where ie..which tcode or program these tables where populated.
    4) is it necessary to update the corresponding Business partner data in the  table TEBP_ADR_SHIP_TO when we do any changes in the table TEBP_ADR_ADD.
    Thanks in advance..

    Hi Joe,
    TEBP_ADR_ADD
    Supplementary Table for TEBP_ADR_SHIP_TO
    You can use T-Code BP to maintain data to view the info in the above table. For this you have to maintain multiple addresses.
    Cheers.
    ...Reward if useful.

  • Execution plan with Concatenation

    Hi All,
    Could anyone help in finding why concatenation is being used by optimizer and how can i avoid it.
    Oracle Version : 10.2.0.4
    select * from
                               select distinct EntityType, EntityID, DateModified, DateCreated, IsDeleted
                               from ife.EntityIDs i
                               join (select orgid from equifaxnormalize.org_relationships where orgid is not null and related_orgid is not null
                                  and ((Date_Modified >= to_date('2011-06-12 14:00:00','yyyy-mm-dd hh24:mi:ss') and Date_Modified < to_date('2011-06-13 14:00:00','yyyy-mm-dd hh24:mi:ss'))
                                        OR (Date_Created >= to_date('2011-06-12 14:00:00','yyyy-mm-dd hh24:mi:ss') and Date_Created < to_date('2011-06-13 14:00:00','yyyy-mm-dd hh24:mi:ss'))
                     ) r on(r.orgid= i.entityid)
                               where EntityType = 1
                and ((DateModified >= to_date('2011-06-12 14:00:00','yyyy-mm-dd hh24:mi:ss') and DateModified < to_date('2011-06-13 14:00:00','yyyy-mm-dd hh24:mi:ss'))
                                              OR (DateCreated >= to_date('2011-06-12 14:00:00','yyyy-mm-dd hh24:mi:ss') and DateCreated < to_date('2011-06-13 14:00:00','yyyy-mm-dd hh24:mi:ss'))
                               and ( IsDeleted = 0)
                               and IsDistributable = 1
                               and EntityID >= 0
                               order by EntityID
                               --order by NLSSORT(EntityID,'NLS_SORT=BINARY')
                             where rownum <= 10;
    Execution Plan
    Plan hash value: 227906424
    | Id  | Operation                                 | Name                          | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | SELECT STATEMENT                          |                               |    10 |   570 |    39   (6)| 00:00:01 |       |       |
    |*  1 |  COUNT STOPKEY                            |                               |       |       |            |          |       |       |
    |   2 |   VIEW                                    |                               |    56 |  3192 |    39   (6)| 00:00:01 |       |       |
    |*  3 |    SORT ORDER BY STOPKEY                  |                               |    56 |  3416 |    39   (6)| 00:00:01 |       |       |
    |   4 |     HASH UNIQUE                           |                               |    56 |  3416 |    38   (3)| 00:00:01 |       |       |
    |   5 |      CONCATENATION                        |                               |       |       |            |          |       |       |
    |*  6 |       TABLE ACCESS BY INDEX ROWID         | ORG_RELATIONSHIPS             |     1 |    29 |     1   (0)| 00:00:01 |       |       |
    |   7 |        NESTED LOOPS                       |                               |    27 |  1647 |    17   (0)| 00:00:01 |       |       |
    |   8 |         TABLE ACCESS BY GLOBAL INDEX ROWID| ENTITYIDS                     |    27 |   864 |     4   (0)| 00:00:01 | ROWID | ROWID |
    |*  9 |          INDEX RANGE SCAN                 | UX_TYPE_MOD_DIST_DEL_ENTITYID |    27 |       |     2   (0)| 00:00:01 |       |       |
    |* 10 |         INDEX RANGE SCAN                  | IX_EFX_ORGRELATION_ORGID      |     1 |       |     1   (0)| 00:00:01 |       |       |
    |* 11 |       TABLE ACCESS BY INDEX ROWID         | ORG_RELATIONSHIPS             |     1 |    29 |     1   (0)| 00:00:01 |       |       |
    |  12 |        NESTED LOOPS                       |                               |    29 |  1769 |    20   (0)| 00:00:01 |       |       |
    |  13 |         PARTITION RANGE ALL               |                               |    29 |   928 |     5   (0)| 00:00:01 |     1 |     3 |
    |* 14 |          TABLE ACCESS BY LOCAL INDEX ROWID| ENTITYIDS                     |    29 |   928 |     5   (0)| 00:00:01 |     1 |     3 |
    |* 15 |           INDEX RANGE SCAN                | IDX_ENTITYIDS_ETYPE_DC        |    29 |       |     4   (0)| 00:00:01 |     1 |     3 |
    |* 16 |         INDEX RANGE SCAN                  | IX_EFX_ORGRELATION_ORGID      |     1 |       |     1   (0)| 00:00:01 |       |       |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=10)
       3 - filter(ROWNUM<=10)
       6 - filter(("DATE_MODIFIED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "DATE_MODIFIED"<TO_DATE(' 2011-06-13
                  14:00:00', 'syyyy-mm-dd hh24:mi:ss') OR "DATE_CREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "DATE_CREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss')) AND "RELATED_ORGID" IS NOT NULL)
       9 - access("I"."ENTITYTYPE"=1 AND "I"."DATEMODIFIED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND "I"."ENTITYID">=0 AND "I"."DATEMODIFIED"<=TO_DATE(' 2011-06-13 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss'))
           filter("I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND "I"."ENTITYID">=0)
      10 - access("ORGID"="I"."ENTITYID")
           filter("ORGID" IS NOT NULL AND "ORGID">=0)
      11 - filter(("DATE_MODIFIED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND "DATE_MODIFIED"<TO_DATE(' 2011-06-13
                  14:00:00', 'syyyy-mm-dd hh24:mi:ss') OR "DATE_CREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "DATE_CREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss')) AND "RELATED_ORGID" IS NOT NULL)
      14 - filter("I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND (LNNVL("I"."DATEMODIFIED">=TO_DATE(' 2011-06-12 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("I"."DATEMODIFIED"<=TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND
                  "I"."ENTITYID">=0)
      15 - access("I"."ENTITYTYPE"=1 AND "I"."DATECREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "I"."DATECREATED"<=TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      16 - access("ORGID"="I"."ENTITYID")
           filter("ORGID" IS NOT NULL AND "ORGID">=0)ife.entityids table has been range - partitioned on data_provider column.
    Is there any better way to rewrite this sql OR is there any way to eliminate concatenation ?
    Thanks

    We cant use data_provider in the given query. We need to pull data irrespective of data_provider and it should be based on ENTITYID.
    Yes table has only three partitions...
    Not sure issue is due to concatenation....but we are in process to create desired indexes which will help for this sql.
    In development we have created multicolumn index and below is the execution plan.....Also in development it takes just 4-5 seconds to execute. But in production it takes more than 8-9 minutes.
    Below is the execution plan from Dev which seems to perform fast:
    Execution Plan
    Plan hash value: 3121857971
    | Id  | Operation                                 | Name                          | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |
    |   0 | SELECT STATEMENT                          |                               |     1 |    57 |   353   (1)| 00:00:05 |       |       |
    |*  1 |  COUNT STOPKEY                            |                               |       |       |            |          |       |       |
    |   2 |   VIEW                                    |                               |     1 |    57 |   353   (1)| 00:00:05 |       |       |
    |*  3 |    SORT ORDER BY STOPKEY                  |                               |     1 |    58 |   353   (1)| 00:00:05 |       |       |
    |   4 |     HASH UNIQUE                           |                               |     1 |    58 |   352   (1)| 00:00:05 |       |       |
    |   5 |      CONCATENATION                        |                               |       |       |            |          |       |       |
    |*  6 |       TABLE ACCESS BY INDEX ROWID         | ORG_RELATIONSHIPS             |     1 |    26 |     3   (0)| 00:00:01 |       |       |
    |   7 |        NESTED LOOPS                       |                               |     1 |    58 |   170   (1)| 00:00:03 |       |       |
    |   8 |         PARTITION RANGE ALL               |                               |    56 |  1792 |    16   (0)| 00:00:01 |     1 |     3 |
    |*  9 |          TABLE ACCESS BY LOCAL INDEX ROWID| ENTITYIDS                     |    56 |  1792 |    16   (0)| 00:00:01 |     1 |     3 |
    |* 10 |           INDEX RANGE SCAN                | IDX_ENTITYIDS_ETYPE_DC        |    56 |       |     7   (0)| 00:00:01 |     1 |     3 |
    |* 11 |         INDEX RANGE SCAN                  | EFX_ORGID                     |     2 |       |     2   (0)| 00:00:01 |       |       |
    |* 12 |       TABLE ACCESS BY INDEX ROWID         | ORG_RELATIONSHIPS             |     1 |    26 |     3   (0)| 00:00:01 |       |       |
    |  13 |        NESTED LOOPS                       |                               |     1 |    58 |   181   (0)| 00:00:03 |       |       |
    |  14 |         PARTITION RANGE ALL               |                               |    57 |  1824 |    10   (0)| 00:00:01 |     1 |     3 |
    |* 15 |          INDEX RANGE SCAN                 | UX_TYPE_MOD_DIST_DEL_ENTITYID |    57 |  1824 |    10   (0)| 00:00:01 |     1 |     3 |
    |* 16 |         INDEX RANGE SCAN                  | EFX_ORGID                     |     2 |       |     2   (0)| 00:00:01 |       |       |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=10)
       3 - filter(ROWNUM<=10)
       6 - filter("RELATED_ORGID" IS NOT NULL AND ("DATE_CREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "DATE_CREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss') OR "DATE_MODIFIED">=TO_DATE(' 2011-06-12 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss') AND "DATE_MODIFIED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss')))
       9 - filter("I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND "I"."ENTITYID">=0)
      10 - access("I"."ENTITYTYPE"=1 AND "I"."DATECREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "I"."DATECREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))
      11 - access("ORGID"="I"."ENTITYID")
           filter("ORGID" IS NOT NULL AND "ORGID">=0)
      12 - filter("RELATED_ORGID" IS NOT NULL AND ("DATE_CREATED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "DATE_CREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss') OR "DATE_MODIFIED">=TO_DATE(' 2011-06-12 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss') AND "DATE_MODIFIED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss')))
      15 - access("I"."ENTITYTYPE"=1 AND "I"."DATEMODIFIED">=TO_DATE(' 2011-06-12 14:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
                  "I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND "I"."ENTITYID">=0 AND "I"."DATEMODIFIED"<TO_DATE(' 2011-06-13 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss'))
           filter("I"."ISDISTRIBUTABLE"=1 AND "I"."ISDELETED"=0 AND (LNNVL("I"."DATECREATED">=TO_DATE(' 2011-06-12 14:00:00',
                  'syyyy-mm-dd hh24:mi:ss')) OR LNNVL("I"."DATECREATED"<TO_DATE(' 2011-06-13 14:00:00', 'syyyy-mm-dd hh24:mi:ss'))) AND
                  "I"."ENTITYID">=0)
      16 - access("ORGID"="I"."ENTITYID")
           filter("ORGID" IS NOT NULL AND "ORGID">=0)Thanks

  • Field and table

    Hi,
    Can any one tell me the difference
    1) We can unarchive repository after right clicking on specified repository
    or right clicking on server.
    What is the difference between two?
    2) Can any one explain me with example what is Qualifier table , qualified record, Display Field, Remote key (which we can see in destination field during field/value mapping). It is not clear to me which source fields we should map with which destination field.
    3) I am some doubt with look up table, fields and taxonomy field Can any one give me simple example rather than link.How can we create all this?
    Thanks in advance.

    Hi Pappu,
    1) We can unarchive repository after right clicking on specified repository
    or right clicking on server.
    What is the difference between two?
    Ans : The only difference between the two is when you unarchieve the repository by right clicking on the server it will ask the name of the repository and creates the new one while in other case it overwrites the existing repository on which you have right clicked for Unarchieving.
    2) Can any one explain me with example what is Qualifier table , qualified record, Display Field, Remote key (which we can see in destination field during field/value mapping). It is not clear to me which source fields we should map with which destination field.
    Ans : Qualifier Table:
    Consider the simple example given below:
    If one Product is to be sold in different countries with different price depending on the country then in such case if you kept all this information in the main table then it creates the redundancy
    E.g.
    Product     Country     Price
    100     India     50
    100     US     60
    100     UK     40
    Now if you model the above data using Qualified table in which Country will be the non-qualifier and price will be qualifier fields then
    Product                                       Country     Price
    100                                             India     50
                                                      US     60
                                                      UK    40
    i.e. you are eliminating the redundancy by storing the repetative information in another table and just forming the link between main table record and its corresponding qualified table records.
    Qualified Records:
    Records stored in the qualified tables are known as qualified records like India 50 is the qualified record in above example.
    Display Field:
    If any field is declared as the Display field then the data of that field will be visible in the main table in MDM Data Manager.
    E.g. Consider the lookup table name Countries with the structure shown below:
    CountryName     Code
    India     Ind
    United States    US
    then when you select the drop down list say while entering data then you will get
    India,Ind
    United States,US
    Otherwise if only code has been set as the Display Field then only code will appear in the drop down list
    Ind
    US
    Remote Key:
    Remote key is used when you want to communicate with many systems like say you want to send particular MDM records to R3 and some records to BW system.Then you have to enable the Remote Key property of the main table and select the remote system say R3 if you want syndicate the records only for R3 system.
    3) I am some doubt with look up table, fields and taxonomy field Can any one give me simple example rather than link.How can we create all this?
    Ans:
    Lookup table:
    These tables are used when you want to select the data from some fixed set of records like countries.
    Create the lookup table countries and assign the table to the field(lookup flat) of main table then when you enter data into that field you will get the drop down list.
    Taxonomy table:
    Taxonomy table is used when there exists some fields whose occurance depends on the value of other some field.
    E.g. Say there a main table field named Product which consists of values like Shoes and Bottles.When you select Shoes then field Brand appears and when you select Bottles field Quantity appears.Now if you create 3 fields named Products Brand and Quantity then for product field value Shoes quantity will be null and similarly for Bottles Brand field will be Null.Imagine the scenario with lacs of records.
    Now when you use taxonomy table to model the above design it will be as shown below:
    1. Create the field Product in the main table with type Lookup Taxonomy.
    2. In the Data Manager create two attributes named Brand and Quantity.
    3. Link the value Shoes with the Brand and Bottles with the quantity.
    Whenever you select Shoes, Brand field will appear automatically and similarly for other case.
    Reward if found useful
    Regards,
    Jitesh Talreja

Maybe you are looking for

  • User-Defined Table Types - Where is it in SQL Server 2008?

    I am having 2 issues: 1.  I don't see a folder for 'User-Defined Table Types' under programmability-->Types 2.  When I execute the following code to create a Type; I get an error 'Incorrect syntax near the keyword 'AS'.' USE Locations; GO /* Create a

  • Controlling 2 "for" loops

    Hi, I need a particular control of 2 "for" loops. It goes like this: for(int j=1;j<5;j+3){      for(int i=0;i<20;i++){            //do something }However, when the for loop for "i" ends it is coming out of both the for loops. I don't want this. But w

  • Problems with Adobe Flash

    My DEP closes the adobe flashplayer.  It won't allow me to exclude it either.  Can't view videos, movies, etc. What can I do?

  • Why is my Transcode Setting for MPEG1 ok box greyed out?

    For the longest time I could Export>Adobe Media Encoder which takes me into Transcode Settings and I could select MPEG1 and hit OK at the bottom of the page. Now, for no particular reason, the OK box is greyed out. Any thoughts as to what caused this

  • Canon PIXMA MX860 printer on Snow Leopard

    After upgrading from OS 10.4.11 Tiger to OS 10.6.4 Snow Leopard, my Ethernet connected MX860 stopped working. The original "PIXMA MX860 series Setup CD-ROM" returned an "unsupported" s/w error when started. After working with a Canon tech for a while