JHeadstart and Intermediate Tables

Howdy y'all,
Here's the situation:
I'm using Oracle JDeveloper with JHeadstart (Latest versions for 9i). I'm using the Struts/UIX option for building the web pages. I have three tables that are inter-related:
REPORT: Maintains reports written by Inspectors (PK: REPORTID).
INSPECTOR: Maintains ID information of Inspectors (PK: INSPECTORID).
Many Reports are written/updated by one Inspector.
Many Inspectors write on one report.
This creates a many-to-many relationship. To fix this problem, I have an Intermediate Table called REPORT_INSPECTOR with a composite primary key composed of REPORTID and INSPECTORID. Both PKs are Foreign Keys in the intermediate table also.
Now, here's the BIG question: How do I make that table a tabbed web page through JHeadstart? I want the inspectors to be able to select from a pull-down menu a list of inspectors to choose from. The REPORTID should be passed to the web page and just wait for an INSPECTORID to insert into the intermediate table. I'm thinking of using a table-form format for the tabbed page.
Thanks in advance for any help/insight offered!
Tracy-Paul Warrington

Bump back to top.

Similar Messages

  • Drop, create and insert data into few intermediate tables

    Hi All,
    I need to schedule a process to drop, create and insert data into few intermediate tables on a weekly basis. Here is what i need to do in the stored procedure, which can be scheduled weekly.
    DROP TABLE TABLE_NAME1;
    DROP TABLE TABLE_NAME2;
    DROP TABLE TABLE_NAME3;
    CREATE TABLE TABLE_NAME1
    CREATE TABLE TABLE_NAME2
    CREATE TABLE TABLE_NAME3
    INSERT INTO TABLE_NAME1 SELECT ....;
    INSERT INTO TABLE_NAME2 SELECT ....;
    INSERT INTO TABLE_NAME3 SELECT ....;
    Any suggestions, examples or code on how to accomplish this task would be very helpful. Any question pls let me know.
    Thanks in advance.

    I am using the intermediate tables in an extract process. The idea was that the table would be created prior to calling the extract procedure and once the data written to the intermediate table had been processed the table would be dropped. This would be repeated each time the extract process is run. From a DBA's point or view, would it be better to just leave the table on the database and truncate it after each run or is removing it entirely best?

  • Out-of-Line Storage: an Intermediate Table is not created

    Hi
    I'm trying to use the "Out-of-Line Storage: Using an Intermediate Table to Store the List of References" sample from "Oracle XML DB Developer’s Guide".
    Here are my schemas:
    oebs_content_organization.xsd
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oebs="http://www.rosbank.ru/oebs"
    targetNamespace="http://www.rosbank.ru/oebs/content/organization"
    xmlns:appsxx_organization="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v"
    elementFormDefault="qualified" xmlns:xdb="http://xmlns.oracle.com/xdb"
    xdb:storeVarrayAsTable="true">
    <xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
    <xsd:import namespace="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v"
    schemaLocation="AppsXx_Organization_V.xsd"/>
    <xsd:complexType name="contentOrganizationType" xdb:SQLType="CONTENT_ORGANIZATION_T">
    <xsd:complexContent>
    <xsd:extension base="oebs:contentAbstractType">
    <xsd:sequence minOccurs="1" maxOccurs="1">
    <xsd:element name="organization" minOccurs="1" maxOccurs="unbounded" xdb:SQLInline="false"
    xdb:defaultTable="ORGANIZATION"
    type="appsxx_organization:AppsXx_Organization_V"/>
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    </xsd:schema>
    oebs_content_organization_element.xsd
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:organization="http://www.rosbank.ru/oebs/content/organization"
    targetNamespace="http://www.rosbank.ru/oebs/content/organization"
    xmlns:oebs="http://www.rosbank.ru/oebs" elementFormDefault="qualified"
    xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
    <xsd:include schemaLocation="oebs_content_organization.xsd"/>
    <xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
    <xsd:element name="content" type="organization:contentOrganizationType"
    substitutionGroup="oebs:contentAbstract" xdb:SQLName="CONTENT_ORGANIZATION"
    xdb:defaultTable=""/>
    </xsd:schema>
    I registered them.
    But I can't find an Intermediate Table which have to keep the List of References to the "organization" element because next select doesn't return any result:
    SELECT * FROM USER_NESTED_TABLES
    Can anybody give me suggestion where these references are stored and how to index them?
    Thanks
    Dmitry

    You appear to hitting bug 5979468 which is fixed in 11g..
    With the heavy usage of inheritance in your XML Schemas I would VERY STRONGLY recommend that you upgrade to 11g immediately...
    SQL*Plus: Release 11.1.0.6.0 - Production on Wed May 14 22:08:49 2008
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    SQL> spool testcase.log
    SQL> --
    SQL> connect sys/ as sysdba
    Enter password:
    Connected.
    SQL> --
    SQL> set define on
    SQL> set timing on
    SQL> --
    SQL> define USERNAME = ROSBANK
    SQL> --
    SQL> def PASSWORD = ROSBANK
    SQL> --
    SQL> def USER_TABLESPACE = USERS
    SQL> --
    SQL> def TEMP_TABLESPACE = TEMP
    SQL> --
    SQL> def DIRECTORY_PATH = &1
    SQL> --
    SQL> drop user &USERNAME cascade
      2  /
    old   1: drop user &USERNAME cascade
    new   1: drop user ROSBANK cascade
    User dropped.
    Elapsed: 00:00:00.51
    SQL> grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &PASSW
    ORD
      2  /
    old   1: grant create any directory, drop any directory, connect, resource, alter session, create view to &USERNAME identified by &P
    ASSWORD
    new   1: grant create any directory, drop any directory, connect, resource, alter session, create view to ROSBANK identified by ROSB
    ANK
    Grant succeeded.
    Elapsed: 00:00:00.20
    SQL> alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
      2  /
    old   1: alter user &USERNAME default tablespace &USER_TABLESPACE temporary tablespace &TEMP_TABLESPACE
    new   1: alter user ROSBANK default tablespace USERS temporary tablespace TEMP
    User altered.
    Elapsed: 00:00:00.04
    SQL> connect &USERNAME/&PASSWORD
    Connected.
    SQL> --
    SQL> alter session set events ='19027 trace name context forever, level 0x800'
      2  /
    Session altered.
    Elapsed: 00:00:00.00
    SQL> call xdb_utilities.createHomeFolder()
      2  /
    Call completed.
    Elapsed: 00:00:00.21
    SQL> create or replace directory XMLDIR as '&DIRECTORY_PATH'
      2  /
    old   1: create or replace directory XMLDIR as '&DIRECTORY_PATH'
    new   1: create or replace directory XMLDIR as 'C:\xdb\customers\ROSBANK'
    Directory created.
    Elapsed: 00:00:00.56
    SQL> declare
      2    JDBC XMLType := XMLType(bfilename('XMLDIR','JDBCASI.xsd'),nls_charset_id('AL32UTF8'));
      3    APPS XMLType := XMLType(bfilename('XMLDIR','AppsXx_Organization_V.xsd'),nls_charset_id('AL32UTF8'));
      4    OEBS XMLType := XMLType(bfilename('XMLDIR','OEBS.xsd'),nls_charset_id('AL32UTF8'));
      5  begin
      6    dbms_xmlschema.registerSchema
      7    (
      8        schemaurl => 'JDBCASI.xsd'
      9       ,schemadoc => JDBC
    10       ,local     => TRUE
    11       ,genBean   => false
    12       ,genTypes  => TRUE
    13       ,genTables => TRUE
    14       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    15    );
    16    dbms_xmlschema.registerSchema
    17    (
    18        schemaurl => 'AppsXx_Organization_V.xsd'
    19       ,schemadoc => Apps
    20       ,local     => TRUE
    21       ,genBean   => false
    22       ,genTypes  => TRUE
    23       ,genTables => TRUE
    24       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    25    );
    26
    27    dbms_xmlschema.registerSchema
    28    (
    29        schemaurl => 'oebs.xsd'
    30       ,schemadoc => OEBS
    31       ,local     => TRUE
    32       ,genBean   => false
    33       ,genTypes  => TRUE
    34       ,genTables => TRUE
    35       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    36    );
    37  end;
    38  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:01:13.70
    SQL> declare
      2    xmlSchema XMLType := XMLType(
      3  '<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:oebs="http://www.rosbank.ru/oebs" targetNamespace="http://www.r
    osbank.ru/oebs/content/organization" xmlns:appsxx_organization="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organizatio
    n_v" elementFormDefault="qualified" xmlns:xdb="http://xmlns.oracle.com/xdb" xdb:storeVarrayAsTable="true">
      4          <xsd:import schemaLocation="oebs.xsd" namespace="http://www.rosbank.ru/oebs"/>
      5          <xsd:import namespace="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v" schemaLocation="AppsXx_
    Organization_V.xsd"/>
      6          <xsd:complexType name="contentOrganizationType" xdb:SQLType="CONTENT_ORGANIZATION_T">
      7                  <xsd:complexContent>
      8                          <xsd:extension base="oebs:contentAbstractType">
      9                                  <xsd:sequence minOccurs="1" maxOccurs="1">
    10                                          <xsd:element name="organization" minOccurs="1" maxOccurs="unbounded" xdb:SQLInline="fal
    se" xdb:defaultTable="ORGANIZATION" type="appsxx_organization:AppsXx_Organization_V"/>
    11                                  </xsd:sequence>
    12                          </xsd:extension>
    13                  </xsd:complexContent>
    14          </xsd:complexType>
    15  </xsd:schema>');
    16  begin
    17    DBMS_XMLSCHEMA.registerSchema(SCHEMAURL => 'oebs_content_organization.xsd', SCHEMADOC => xmlSchema, GENTABLES => TRUE);
    18  end;
    19  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:12.51
    SQL> set pages 0 lines 250
    SQL> --
    SQL> column table_name format A40
    SQL> column column_name format A40
    SQL> column parent_table_name format A40
    SQL> column parent_table_column format A40
    SQL> --
    SQL> select table_name
      2    from user_xml_tables
      3  /
    OEBS
    CONTENT
    ORGANIZATION
    Elapsed: 00:00:29.40
    SQL> select table_name, parent_table_name, parent_table_column
      2    from user_nested_tables
      3  /
    SYS_NTjt3LMhVVSJ6XnKEY8x7idQ==           CONTENT                                  TREAT("XMLDATA" AS "CONTENT_ORGANIZATION
                                                                                      _T")."organization"
    Elapsed: 00:00:00.00
    SQL> select table_name, column_name
      2    from user_refs
      3  /
    SYS_NTjt3LMhVVSJ6XnKEY8x7idQ==           COLUMN_VALUE
    OEBS                                     "XMLDATA"."contentAbstract"
    Elapsed: 00:00:00.67
    SQL>
    SQL>
    SQL>

  • Sy-tabix in relation to LOOP AT and READ TABLE

    Hi All,
    As per SAP documentation,
    1) While looping through an internal table (LOOP AT), sy-tabix contains the index number of current row(for standard and sorted tables)
    2)When successfully reading from an internal table(READ TABLE), sy-tabix is set to the index of the result row.
    But what happens when READ TABLE is used while looping through another internal table?
    i.e. Loop at TAB1...
    write sy-tabix.
    READ TABLE TAB2...
    write sy-tabix.
    endloop.
    If we are looping through 1st row of TAB1 and the result of read statement is found in 3rd row of TAB2, I expected that sy-tabix before READ would be 1 and after the READ be 3.
    But, I found that sy-tabix remains unchanged at 1. Can someone expalin why?
    Thanks,
    Jagan

    Hi
    If after reading the table TAB2 the system variable SY-TABIX has still the previous value, that menas the READ TABLE fails or it was read the first record of TAB2.
    After READ TABLE TAB2 try to check the SY-SUBRC:
    LOOP AT TAB1.
       WRITE: / 'TAB1 index:', SY-TABIX.
       READ TABLE TAB2 .........
       IF SY-SUBRC = 0.
         WRITE: 'TAB2 index:', SY-TABIX.
    Try this:
    DATA: BEGIN OF ITAB OCCURS 0,
            FIELD1,
          END   OF ITAB.
    DATA: BEGIN OF ITAB2 OCCURS 0,
            FIELD1,
          END   OF ITAB2.
    DATA: INDEX TYPE I.
    DO 10 TIMES.
      APPEND ITAB.
    ENDDO.
    DO 10 TIMES.
      APPEND ITAB2.
    ENDDO.
    LOOP AT ITAB.
      WRITE: / 'ITAB:', SY-TABIX.
      INDEX = SY-TABIX + 2.
      READ TABLE ITAB2 INDEX INDEX.
      IF SY-SUBRC = 0.
        WRITE:  'ITAB2:', SY-TABIX.
      ENDIF.
    ENDLOOP.
    Max

  • In Answers am seeing "Folder is Empty" for Logical Fact and Dimension Table

    Hi All,
    Am working on OBIEE Answers, on of sudden when i clicked on Logical Fact table it showed me as "folder is empty". I restarted all the services and then tried still showing same for Logical Fact and Dimension tables but am able to see all my reports in Shared Folders. I restarted the machine too but no change. Please help me out to resolve this issue.
    Thanks in Advance.
    Regards,
    Rajkumar.

    First of all, follow the forum etiquette :
    http://forums.oracle.com/forums/ann.jspa?annID=939
    React or mark as anwser the post that the user gave.
    And for your question, you must check the log for a possible corrupt catalog :
    OracleBIData_Home\web\log\sawlog0.log

  • Best practice when FACT and DIMENSION table are the same

    Hi,
    In my physical model I have some tables that are both fact and dimension table, i.e. in the BMM they are of course separated into Fact and Dim source (2 different units) and it works fine. But I can see that there will be trouble when having more fact tables and I e.g. have a Period dimension pointing to all the different fact tables (different sources).
    Seems like the best solution to this is to have an alias of the fact/transaction table and have 2 "copies" of the transaction table (one for fact and one for dimension table) in the physical layer. Only bad thing is that there will then allways be 2 lookups in the same table when fetching data from the dimension and the fact table.
    This is not built on a datawarehouse - so the architecture is thereby more complex. Hope this was understandable (trying to make a short story of it).
    Any best practice on this? Or other suggestions.

    Id recommend creation of a view in the database. if its an oracle DB, materialised views would be a huge performance benefit. you just need to make sure that the MVs are updated when the source is updated.
    -Domnic

  • Difference between YVBUK and XVBUK tables

    Hello,
       Can somebody explain me the user of Y* and X* tables for application tables such as VBUK, LIKP etc. in user exits?
    According to note 415716 Y* tables store the condition of the record currently in the database and X* tables stores the changed value. But what happens if its a new record (UPDKZ = I), shouldnt Y* table be blank?
    We have the following code in the user exit
      INCLUDE YVUEPRZ1_DOC_SAVE_PREP_CARRIER                             *
    perform update only if insert or update carrier
    UPDKZ : Update indicator
    DATA : ls_vbpa LIKE xvbpa.
    LOOP AT xlikp.
      v_index = sy-tabix.
      CLEAR ls_vbpa.
      READ TABLE xvbpa INTO ls_vbpa
                       WITH KEY vbeln = xlikp-vbeln
                                parvw = 'SP'.
      CASE ls_vbpa-updkz.
        WHEN 'I' OR 'U'.
          MOVE-CORRESPONDING xlikp TO likp.
          MOVE-CORRESPONDING xlikp TO likpd.
    *--   Prepare changes of the delivery header
          PERFORM likp_bearbeiten_vorbereiten(sapfv50k).
          likp-yylfnr = ls_vbpa-lifnr.
    *--   Check and confirm changes
          PERFORM likp_bearbeiten(sapfv50k).
          MOVE-CORRESPONDING likp  TO xlikp.
          MOVE-CORRESPONDING likpd TO xlikp.
          MODIFY xlikp INDEX v_index.
          IF t180-trtyp = 'V'. "Modification
            xvbuk-uvk03  = 'D'.
            xvbuk-updkz  = 'U'.
            MODIFY xvbuk TRANSPORTING uvk03 updkz WHERE vbeln = xlikp-vbeln.
          ENDIF.
        WHEN 'D'.
          MOVE-CORRESPONDING xlikp TO likp.
          MOVE-CORRESPONDING xlikp TO likpd.
    *--   Prepare changes of the delivery header
          PERFORM likp_bearbeiten_vorbereiten(sapfv50k).
          CLEAR likp-yylfnr.
    *--   Check and confirm changes
          PERFORM likp_bearbeiten(sapfv50k).
          MOVE-CORRESPONDING likp  TO xlikp.
          MOVE-CORRESPONDING likpd TO xlikp.
          MODIFY xlikp INDEX v_index.
          IF t180-trtyp = 'V'. "Modification
            xvbuk-uvk03  = 'D'.
            xvbuk-updkz  = 'U'.
            MODIFY xvbuk TRANSPORTING uvk03 updkz WHERE vbeln = xlikp-vbeln.
          ENDIF.
      ENDCASE.
    ENDLOOP.
    Now the problem is that SAP is saying that the table YVBUK also has to have the same record as XVBUK but I think its absurd for UPDKZ = I since there will be no database image for that.
    thanks

    To answer Peluka's question there are no entries in Y* table when UPDKZ = I or UPDKZ = U
    and I dont quite understand what Ferry Lianto is saying but I think its pretty much the same as above
    thanks for your help

  • Difference between Temp table and Variable table and which one is better performance wise?

    Hello,
    Anyone could you explain What is difference between Temp Table (#, ##) and Variable table (DECLARE @V TABLE (EMP_ID INT)) ?
    Which one is recommended to use for better performance?
    also Is it possible to create CLUSTER and NONCLUSTER Index on Variable table?
    In my case: 1-2 days transactional data are more than 3-4 Millions. I tried using both # and table variable and found table variable is faster.
    Is that Table variable using Memory or Disk space?
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Check following link to see differences b/w TempTable & TableVariable: http://sqlwithmanoj.com/2010/05/15/temporary-tables-vs-table-variables/
    TempTables & TableVariables both use memory & tempDB in similar manner, check this blog post: http://sqlwithmanoj.com/2010/07/20/table-variables-are-not-stored-in-memory-but-in-tempdb/
    Performance wise if you are dealing with millions of records then TempTable is ideal, as you can create explicit indexes on top of them. But if there are less records then TableVariables are good suited.
    On Tables Variable explicit index are not allowed, if you define a PK column, then a Clustered Index will be created automatically.
    But it also depends upon specific scenarios you are dealing with , can you share it?
    ~manoj | email: http://scr.im/m22g
    http://sqlwithmanoj.wordpress.com
    MCCA 2011 | My FB Page

  • Performance syntax loop at  and read table

    in the routine , for reading one line in a internal table  , the syntaxe
      loop at  xxx where   and read tabl exxx   with key     XXXX
    has a great difference on performance or not?

    Loop at statement is used only for processing multiple records.Read table is used for reading a particluar record of an internal table.If you just need to check whether record exists in internal table, use can sort and use binary search with TRANSPORTING NO FIELDS addition. Also, try to use field symbols so that performance is increased.

  • No data in cube,but there is data in F and E table, also in dimension table

    Hi, gurus,
         I successfully loaded more than 100,000 records of data into an infocube, but when I check the content of the infocube(without any restriction),  unexpectedly no data displayed, also after I checked the F and E table, still no data, but there is data in dimendsion tables. what happened?
        please help. thanks a lot.

    Hi Kulun Rao,
    Try the following options.
    Check in the selection screen
    Go to infocube through LISTCUBE t.code
    Check the compression and roll-up statuses.
    Check the reporting status in request tab.
    Refresh the cube ( u already do it)
    Check the index status in Request tab**
    might be these things will help u.
    Regards,
    HARI GUPTA

  • Question regarding Classic and Advance table

    Hi,
    I have classic and advance table. I am populating with VO that brings 100 record. When i render page i see last record being displayed. How can i show my first record by defult on both tables?

    By default the first record will be displayed, if you are seeing the last one instead, you probably did a vo.last() in the code.
    Thanks
    Tapash

  • Problem with Master and Child table

    Hi,
    Working in jdev 11.1.1.2.0. I have one strange issue. i have master and child tables, the model is working fine with the view link. but when drag drop the same into my jsff. when i query the result 1st time 2 tables are refershing properly and data is coming. but the when i trying to select another row in the 1st table my 2nd table(child table) is not refreshing.
    i put partial trigger of the 2nd table as 1st table id.
    can any one help wht is issue here.
    Edited by: user5802014 on Jul 15, 2010 3:44 PM

    Check this post might help you
    http://baigsorcl.blogspot.com/2010/03/creating-master-detail-form-in-adf.html

  • Relation b/w PRPS and RPSCO tables

    Hi  PS Experts,
    What is the Relation b/w PRPS and RPSCO tables
    PRPS : WBS (Work Breakdown Structure) Element Master Data
    RPSCO : Project info database: Costs, revenues, finances
    Thanks in Advance,
    Regards,
    sudharsan.

    Hello Sasikanth Thank u for ur information,
      and i need some more information, am working on abap, now i got a requirement in PS,
    i want 2 calculate the values like Planned Revenue, Planned Cost, Actuall Rev, Actuall Cost, Actuall Billing, Revenue Taken, Cost Taken, BNS and SNB.
    based on i/p parameters:  Company Code, Fiscal year and month.
    pls let me know how to calculate the above values, its very urgent for me.
    Thanks in advance,
    sudharsan.

  • Performance issue in BI due to direct query on BKPF and BSEG tables

    Hi,
    We had a requirement that FI document number fieldshould be extracted in BI.
    Following code was written which has the correct logic but performance is bad.
    It fetched just 100 records in more than 4-5 hrs.
    The reason is there was a direct qury written on BSEG and BKPF tables(without WHERE clause).
    Is there any way to improve this code like adding GJAHR field  in where clause? I dont want to change the logic.
    Following is the code:
    WHEN '0CO_OM_CCA_9'." Data Source
        TYPES:BEGIN OF ty_bkpf,
        belnr TYPE bkpf-belnr,
        xblnr TYPE bkpf-xblnr,
        bktxt TYPE bkpf-bktxt,
        awkey TYPE bkpf-awkey,
        bukrs TYPE bkpf-bukrs,
        gjahr TYPE bkpf-gjahr,
        AWTYP TYPE bkpf-AWTYP,
        END OF ty_bkpf.
        TYPES : BEGIN OF ty_bseg1,
        lifnr TYPE bseg-lifnr,
        belnr TYPE bseg-belnr,
        bukrs TYPE bseg-bukrs,
        gjahr TYPE bseg-gjahr,
        END OF ty_bseg1.
        DATA: it_bkpf TYPE STANDARD TABLE OF ty_bkpf,
        wa_bkpf TYPE ty_bkpf,
        it_bseg1 TYPE STANDARD TABLE OF ty_bseg1,
        wa_bseg1 TYPE ty_bseg1,
        l_s_icctrcsta1 TYPE icctrcsta1.
        "Extract structure for Datasoure 0co_om_cca_9.
        DATA: l_awkey TYPE bkpf-awkey.
        DATA: l_gjahr1 TYPE gjahr.
        DATA: len TYPE i,
        l_cnt TYPE i.
        l_cnt = 10.
        tables : covp.
        data : ref_no(20).
        SELECT lifnr
        belnr
        bukrs
        gjahr
        FROM bseg
        INTO TABLE it_bseg1.
        DELETE ADJACENT DUPLICATES FROM it_bseg1 COMPARING belnr gjahr .
        SELECT belnr
        xblnr
        bktxt
        awkey
        bukrs
        gjahr
        AWTYP
        FROM bkpf
        INTO TABLE it_bkpf.
        IF sy-subrc EQ 0.
          CLEAR: l_s_icctrcsta1,
          wa_bkpf,
          l_awkey,
          wa_bseg1.
          LOOP AT c_t_data INTO l_s_icctrcsta1.
            MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
          select single AWORG AWTYP INTO CORRESPONDING FIELDS OF COVP FROM COVP
          WHERE belnr = l_s_icctrcsta1-belnr.
          if sy-subrc = 0.
              if COVP-AWORG is initial.
           concatenate l_s_icctrcsta1-refbn '%' into ref_no.
                  READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
                  l_s_icctrcsta1-refbn
                  awtyp = COVP-AWTYP
                  gjahr = l_gjahr1.
            IF sy-subrc EQ 0.
              MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
              MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
              MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
              MODIFY c_t_data FROM l_s_icctrcsta1.
              READ TABLE it_bseg1 INTO wa_bseg1
              WITH KEY
              belnr = wa_bkpf-belnr
              bukrs = wa_bkpf-bukrs
              gjahr = wa_bkpf-gjahr.
              IF sy-subrc EQ 0.
                MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
                MODIFY c_t_data FROM l_s_icctrcsta1.
                CLEAR: l_s_icctrcsta1,
                wa_bseg1,
                l_gjahr1.
              ENDIF.
            ENDIF.
                ELSE. " IF AWORG IS NOT BLANK -
                concatenate l_s_icctrcsta1-refbn COVP-AWORG into ref_no.
                READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(20) =
                ref_no
                awtyp = COVP-AWTYP
                gjahr = l_gjahr1.
            IF sy-subrc EQ 0.
              MOVE wa_bkpf-belnr TO l_s_icctrcsta1-zzbelnr.
              MOVE wa_bkpf-xblnr TO l_s_icctrcsta1-zzxblnr.
              MOVE wa_bkpf-bktxt TO l_s_icctrcsta1-zzbktxt.
              MODIFY c_t_data FROM l_s_icctrcsta1.
              READ TABLE it_bseg1 INTO wa_bseg1
              WITH KEY
              belnr = wa_bkpf-belnr
              bukrs = wa_bkpf-bukrs
              gjahr = wa_bkpf-gjahr.
              IF sy-subrc EQ 0.
                MOVE wa_bseg1-lifnr TO l_s_icctrcsta1-lifnr.
                MODIFY c_t_data FROM l_s_icctrcsta1.
                CLEAR: l_s_icctrcsta1,
                wa_bseg1,
                l_gjahr1.
              ENDIF.
            ENDIF.
               endif.
          endif.
            CLEAR: l_s_icctrcsta1.
            CLEAR: COVP, REF_NO.
          ENDLOOP.
        ENDIF.

    Hello Amruta,
    I was just looking at your coding:
    LOOP AT c_t_data INTO l_s_icctrcsta1.
    MOVE l_s_icctrcsta1-fiscper(4) TO l_gjahr1.
    select single AWORG AWTYP INTO CORRESPONDING FIELDS OF COVP FROM COVP
    WHERE belnr = l_s_icctrcsta1-belnr.
    if sy-subrc = 0.
    if COVP-AWORG is initial.
    concatenate l_s_icctrcsta1-refbn '%' into ref_no.
    READ TABLE it_bkpf INTO wa_bkpf WITH KEY awkey(10) =
    l_s_icctrcsta1-refbn
    awtyp = COVP-AWTYP
    gjahr = l_gjahr1.
    Here you are interested in those BKPF records that are related to the contents of c_t_data internal table.
    I guess that this table does not contain millions of entries. Am I right?
    If yes, the the first step would be to pre-select COVP entries:
    select BELNR AWORG AWTYP into lt_covp from COVP
    for all entries in c_t_data
    where belnr = c_t_data-belnr.
    sort lt_covp by belnr.
    Once having this data ready, you build an internal table for BKPF selection:
    LOOP AT c_t_data INTO l_s_icctrcsta1.
      clear ls_bkpf_sel.
      ls_bkpf_sel-awkey(10) = l_s_icctrcsta1-refbn.
      read table lt_covp with key belnr = l_s_icctrcsta1-belnr binary search.
      if sy-subrc = 0.
        ls_bkpf_sel-awtyp = lt_covp-awtyp.
      endif.
      ls_bkpf_sel-gjahr = l_s_icctrcsta1-fiscper(4).
      insert ls_bkpf_sel into table lt_bkpf_sel.
    ENDLOOP.
    Now you have all necessary info to read BKPF:
    SELECT
    belnr
    xblnr
    bktxt
    awkey
    bukrs
    gjahr
    AWTYP
    FROM bkpf
    INTO TABLE it_bkpf
    for all entries in lt_bkpf_sel
    WHERE
      awkey = lt_bkpf_sel-awkey and
      awtyp = lt_bkpf_sel-awtype and
      gjahr = lt_bkpf_sel-gjahr.
    Then you can access BSEG with the bukrs, belnr and gjahr from the selected BKPF entries. This will be fast.
    Moreover I would even try to make a join on DB level. But first try this solution.
    Regards,
      Yuri

  • Search a text in a multiple tables and one table has BLOB column

    Hi,
    I couldn't find a solution/examples for below scenario in oracle text documentation or related forums.
    I need to search a text in a multiple tables,in that one table has blob column which is used to store the documnents(pdf,doc,jpg..etc) and other tables have varchar2 columns,These tables have realation each other.
    Please provide a sample examples for above scenario.
    Thanks in advance..

    Have a look at my blog entry here:
    https://blogs.oracle.com/searchtech/entry/indexing_data_from_multiple_tables
    That describes two methods of achieving what you are looking for.

Maybe you are looking for

  • Unable to start IFS Servermanager (ocijdbc8)

    Can anyone help with this? I'm trying to get IFS 1.0 up and running on Oracle Enterprise Edition 8.1.6 on Windows 2000 server. The oracle database is pretty much a clean install and was installed using the 'typical' option. IFS installs ok, creates t

  • Mapping Peformance

    Hello I am working on - OWB 9.2.1 -Oracle 9.1 I have a Customer Dimension mapping in which i am combining data from two tables Cust1 & Cust2 & then filtering out the data on the address type which is Permanent, Corresspondence & Other. Since, i have

  • Want some Userexit or Badi for me23n for updating dates .

    Hi , i want to update the validity start and validity end before displaying in the aditional info TAB of the ME23N.   i need to pass the pricing date(PRSDT) from VFKP table to these fields... Can anyone help me regarding this . Regards, Shilpa.

  • How many minutes without loss in quality?

    I started using iDVD in 2003. Back then, I was told that you can put up to about 80 minutes on a DVD without any noticeable loss in quality. Based on my experiences, that seemed to be a good rule of thumb. Have there been sufficient improvements in t

  • HT1338 Why did my photos disappear when the upgrade was installed?

    why did my photos disppear when i updated Iphoto?