Performance Issue When Read from Internal Table

In my form, I have 6 windows which contain all the header information, which are kept in my gt_header internal table. Since all windows required data from the same internal table, reading the internal table at Initialization for once or, creating the LOOP at each window, which one will be a better choice in terms of performance?

Hi,
you cannot create 6 windows under loop.You can only have loop under a window only.
So create a big window which covers whole area of 6 windows.Create templete under that and write only one loo with text in all those boxes of that templete.
Regards,
Rock.

Similar Messages

  • Performance issue when moving from 4.6c to 6.0

    Looks like we took a performance hit when moving from 4.6c to 6.0 on the same hardware. 
    For example, our PGI on outbound deliveries now takes several seconds longer in 6.0 then it did in 4.6c.  We've noticed other SAP area's are taking longer as well.  With an ST05 sql trace on the PGI in 6.0, we see more tables being accessed, same tables being access differently taking longer.  All leading to more time to do a PGI in 6.0.
    Has anyone else noticed this increase in Response time when upgrading to 6.0 ?   
    Thanks,
    David

    Hello.
    Yes, in our system we noticed the same thing at start. The general performance seemed to get worse after upgrading. In fact, database became bigger and more memory is consumed. However, it was tuned up by our system administrator and now seems ok.
    Run the optimizer statistics and see if it get's better.
    Regards.
    Valter Oliveira.

  • End Routine ABAP to read from Internal table and do calculation.

    Hi All...
    I have completed some coding in a start routine to extract some fields from a DSO containing Master Data (Stock Age) into an internal table (the internal table has been defined in the global declarations area) which will then be read in the end routine.
    (the internal table will be read) at loadtime in the end routine and used in a calculation as described below.
    I.E
    GLOBAL DATA DECLARATION
    Data: ITAB1 TYPE TABLE OF /BIC/DSOTAB
    (DSOTAB has 3 fields PLANT, STYLE, 1STDATE (1STDATE IS A DATE FIELD)
    The start routine has the following code:
    IF ITAB1 IS INITIAL.
    SELECT /BIC/PLANT /BIC/STYLE /BIC/1STDATE
                    FROM /BIC/DSOTAB
                    INTO CORRESPONDING FIELDS OF TABLE ITAB1.
    This is working fine when run under simulation i.e ITAB1 is filled no problem.
    I then need to do a calculation in the end routine.
    1. First I have to find the record in the internal table using the key of PLANT AND STYLE from the RESULT_PACKAGE.
    The code i am using now is as follows....
        READ TABLE ITAB1 TRANSPORTING NO FIELDS WITH KEY
        /BIC/PLANT = <result_fields>-/BIC/PLANT /BIC/STYLE =
        <result_fields>-/BIC/STYLE.
    Once this record has been read I then have to perform the following calculation using the following additional fields
    <result_fields>-/BIC/DYS1ST is a NUMC field in the <result_fields> that will be be filled by the result of the calculation described below.
    <result_fields>-CALDAY is a date field which is already populated in the <result-fields> which is used in the calculation below.
    The Calculation required is a difference in days between two dates
    DYS1ST = CALDAY - 1STRED.
    The code i am using is
    If sy-subrc = 0.
         <result_fields>-/BIC/DYS1ST = <result_fields>-CALDAY -
         i_t_1stred_dso-/BIC/1STRED.
    So the whole section of code inside the LOOP at RESULT PACKAGE looks like this in the end routine
           READ TABLE ITAB1 TRANSPORTING NO FIELDS WITH KEY
        /BIC/PLANT = <result_fields>-/BIC/PLANT /BIC/STYLE =
        <result_fields>-/BIC/STYLE.
    IF sy-subrc = 0.
         <result_fields>-/BIC/DYS1ST = <result_fields>-CALDAY -
         i_t_1stred_dso-/BIC/1STRED.
    Im getting the error
    "ITAB1 " is a table without a header line and therefore has no component called "/BIC/1STRED
    Please can someone advise as to what I need to do to get this fixed please.
    Thanks in advance
    Stevo:)

    Hi,
    You will have to do few changes in your code as below,
    GLOBAL DATA DECLARATION
    Data: ITAB1 TYPE standard TABLE OF /BIC/DSOTAB.
    After that declare a workarea to read the values.
    DATA: i_wa_itab1 type /bic/dsotab.
    (DSOTAB has 3 fields PLANT, STYLE, 1STDATE (1STDATE IS A DATE FIELD)
    The start routine has the following code:
    IF ITAB1 IS INITIAL.
    SELECT /BIC/PLANT /BIC/STYLE /BIC/1STDATE
    FROM /BIC/DSOTAB
    INTO CORRESPONDING FIELDS OF TABLE ITAB1.
    This is working fine when run under simulation i.e ITAB1 is filled no problem.
    I then need to do a calculation in the end routine.
    1. First I have to find the record in the internal table using the key of PLANT AND STYLE from the RESULT_PACKAGE.
    The code i am using now is as follows....
    READ TABLE ITAB1 TRANSPORTING NO FIELDS WITH KEY
    /BIC/PLANT = <result_fields>-/BIC/PLANT /BIC/STYLE =
    <result_fields>-/BIC/STYLE.
    Once this record has been read I then have to perform the following calculation using the following additional fields
    <result_fields>-/BIC/DYS1ST is a NUMC field in the <result_fields> that will be be filled by the result of the calculation described below.
    <result_fields>-CALDAY is a date field which is already populated in the <result-fields> which is used in the calculation below.
    The Calculation required is a difference in days between two dates
    DYS1ST = CALDAY - 1STRED.
    The code i am using is
    If sy-subrc = 0.
    <result_fields>-/BIC/DYS1ST = <result_fields>-CALDAY -
    i_t_1stred_dso-/BIC/1STRED.
    So the whole section of code inside the LOOP at RESULT PACKAGE looks like this in the end routine
    READ TABLE ITAB1 into i_wa_itab1 WITH KEY
    /BIC/PLANT = <result_fields>-/BIC/PLANT /BIC/STYLE =
    <result_fields>-/BIC/STYLE.
    IF sy-subrc = 0.
    <result_fields>-/BIC/DYS1ST = <result_fields>-CALDAY -
    i_wa_itab1-/BIC/1STRED.
    Once you do this changes, your code will work fine.
    Regards,
    Durgesh.

  • Performance issue - insert records from db2 tables

    I have a table say emp in oracle database and i have the emp table in db2 database. My job is to pull all the records (million records) from db2 table to oracle emp table. My insert statement is like below. I am connecting to the db2 database using dblink.
    insert into emp
    select * from emp_db2, dept_db2
    where emp_db2.dno = dept_db2.dno
    and dept_db2.dno = 10;
    The statement is still running. How to improve the performance ?
    please suggest.
    thanks,
    Vinodh

    Vinodh2 wrote:
    1.how much is your select query is taking? 1 day over . still running.
    2.What is the row count from the query? 85632978 records
    3.Whats your expected completion time? 30 minutes
    I am not getting the explain plan because the query is still running.
    do as below
    SQL> set autotrace traceonly explain
    SQL> select sysdate from dual;
    Execution Plan
    Plan hash value: 1388734953
    | Id  | Operation      | Name | Rows     | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |     |     1 |     2   (0)| 00:00:01 |
    |   1 |  FAST DUAL      |     |     1 |     2   (0)| 00:00:01 |
    -----------------------------------------------------------------

  • Error TSV_TNEW_BLOCKS_NO_ROLL_MEMORY when reading into internal table

    Hello guys,
    below are snippets of my code and when its goes into the select statement, i get this error TSV_TNEW_BLOCKS_NO_ROLL_MEMORY. Do you have any idea what went wrong? here are the table declaration and select statement.
                                  BEGIN OF ty_instfact,
                                   ucinstalla           TYPE
                                   /bi0/oiucinstalla,
                                   ucoperand             TYPE
                                   /bi0/oiucoperand,
                                   ucop_str1           TYPE /bi0/oiucop_str1,
                                  END   OF ty_instfact
      DATA :           i_instfact TYPE STANDARD TABLE OF ty_instfact.
      SELECT ucinstalla ucoperand ucop_str1
          FROM /bic/azinf_d0100
          INTO TABLE i_instfact
          FOR ALL ENTRIES IN RESULT_PACKAGE
          WHERE ucinstalla EQ RESULT_PACKAGE-ucinstalla
          AND ucinstalla > 0
          AND ucoperand = 'E-NSRD'
          OR ucoperand = 'G-NSRD'.

    Hello All,
    SAP came back to me regarding this issue. There are only way to eliminate this error is to:
    - use InfoSet rather than JOIN
    - increase Extended Memory or Heap Memory for Background WP.
    We have doubled the memory per process (4-->8GB) and it works fine now.
    Kind regards,
    Roman

  • Read from internal table.

    hi frnd's
    Values in the internal_table must be compared with the screen field value entered.
    Whether the where condition can be used in the read table syntax.

    Hi,
    if it is paramter then
    read table it_matnr with key matnr = p_matnr.
    if it is select option then
    loop at it_matnr where matnr in s_matnr.
    do some thing...
    exit.
    endloop.
    Regards
    vijay

  • Read contents of changing fields from internal table

    Hi Folks,
    Please help me in my query below:
    Consider there is a Z-table with two fields TABNAM and FIELD having values KNA1 and NAME1 respectively.
    In my report I have fetched entries for customers from KNA1. Now based on the field from Z-table I want to populate a variable suppose V_FREE_VAR with the value from KNA1 table.
    Here V_FREE_VAR is of CHAR200 so that it accomodate all types of values from KNA1.
    The value of Z-table FIELD can change daily i.e next day the value may be PSTLZ.
    So how can I read the particular field from internal table as the field to be read is dynamic.
    Note: using case is not feasible.
    Thanks in advance.
    Regards,
    Shardul

    @Hartmut P
    As Rob said i want to get the value of the field from internal table. the code is something like this.
    I_KNA1 contains records for customers.
    Suppose values of Z-table are in internal table I_TEMP_TABLE.
    Entries in I_TEMP_TABLE are as follows
    TABNAME      FIELDNAME
    KNA1                 NAME1
    The value of FIELNAME in Z-table can be changed
    Loop at I_TEMP_TABLE into WA_TEMP_TABLE.
    Read I_KNA1 into WA_KNA1 with key KUNNR = '0001002234'.
    IF SY-SUBRC EQ 0.
       CASE WA_TEMP_TABLE-FIELDNAME.
            WHEN 'NAME1'.
                 V_VAR = WA_KNA1-NAME1.
             WHEN 'PSTLZ'
                  V_VAR = WA_KNA1-PSTLZ.
    ENDIF.
    But using case is not appropriate as KNA1 contains 176 fields.

  • Reading Data from Internal Table

    Hi,
    Can anyone please tell me how to read data from Internal Tables in the Event Handler without using the Select statement OnInitialization?
    Thanks,
    Gaurav

    Hi Siddhartha,
    Can you tell me the problem in my code. I tried to work on the way you suggested. Though I have not finished with the coding, I just wanted to know whether I am going in the direction or not.
    I have declared the the structure in Type Defination as
    TYPES: BEGIN OF TEST_STRUC,
             BEGDA TYPE BEGDA,
             ENDDA TYPE ENDDA,
           END OF TEST_STRUC.
    TYPES: TEST_TAB_TYPE TYPE TABLE OF TEST_STRUC.
    In the Event Handler, I have added the following code on OnInputProcessing:
    event handler for checking and processing user input and
    for defining navigation
    DATA TEST_INFO LIKE LINE OF TEST_TAB.
    DATA: MYTAB6 TYPE TABLE OF PA0006,
          MYTAB6_WA LIKE LINE OF MYTAB6.
    REFRESH TEST_TAB.
    CLEAR TEST_INFO.
    MYTAB6_WA-BEGDA = REQUEST->GET_FORM_FIELD( STARTDATE ).
    MYTAB6_WA-ENDDA = REQUEST->GET_FORM_FIELD( ENDDATE ).
    IF EVENT->NAME EQ 'button'
       AND EVENT->SERVER_EVENT EQ 'click'.
      LOOP AT MYTAB6 INTO MYTAB6_WA.
        TEST_INFO-BEGDA = MYTAB6_WA-BEGDA.
        TEST_INFO-ENDDA = MYTAB6_WA-ENDDA.
      ENDLOOP.
      APPEND TEST_INFO TO TEST_TAB.
      CLEAR TEST_INFO.
      NAVIGATION->SET_PARAMETER( NAME = 'test_tab'
      VALUE = 'begda' ).
      NAVIGATION->SET_PARAMETER( NAME = 'test_tab'
      VALUE = 'endda' ).
      NAVIGATION->GOTO_PAGE( 'MyBSP2.htm').
    ENDIF.
    P.S. MyBSP2.htm is my next page.
    Thanks,
    Gaurav

  • Downloding from internal table to excel

    Hi All,
    I am using ole concept to download data from internal table to excel because i want to fill few records with colors and few with bold etc.
    But this ole concept is downloading to excel line by line and taking much time.
    How can i improve the performance in this concept or is there any other concept please let me know.
    i am using fallowng logic to download to excel.
    *Generating the Excel report in the foreground
    data: h_excel type ole2_object, " Excel object
    h_mapl type ole2_object, " list of workbooks
    h_map type ole2_object, " workbook
    start Excel
    create object h_excel 'EXCEL.APPLICATION'.
    set property of h_excel 'Visible' = 1.
    get list of workbooks, initially empty
    call method of h_excel 'Workbooks' = h_mapl.
    perform err_hdl.
    add a new workbook
    call method of h_mapl 'Add' = h_map.
    perform err_hdl.
    output column headings to active Excel sheet
    perform fill_cell using 1 1 1 000 'Job Name'(001).
    perform fill_cell using 1 2 1 000 'Variant'(002).
    perform fill_cell using 1 3 1 000 'Description'(003).
    perform fill_cell using 1 4 1 000 'Run Date'(004).
    perform fill_cell using 1 5 1 000 'Run Time'(005).
    perform fill_cell using 1 6 1 000 'Duration'(006).
    perform fill_cell using 1 7 1 000 'Spool'(007).
    perform fill_cell using 1 8 1 000 'Records Upl'(008).
    perform fill_cell using 1 9 1 000 'Error'(009).
    perform fill_cell using 1 10 1 000 'Total'(010).
    perform fill_cell using 1 11 1 000 'Action'(011).
    perform fill_cell using 1 12 1 000 'ReRun'(012).
    loop at t_final.
    copy datato active EXCEL sheet
    h = sy-tabix + 1.
    perform fill_cell using h 1 0 000 t_final-jobname.
    perform fill_cell using h 2 0 000 t_final-variant.
    perform fill_cell using h 3 0 000 t_final-description.
    perform fill_cell using h 4 0 000 t_final-strtdate.
    perform fill_cell using h 5 0 000 t_final-strttime.
    perform fill_cell using h 6 0 000 t_final-duration.
    perform fill_cell using h 7 0 000 t_final-listident.
    perform fill_cell using h 8 0 000 t_final-rec_upl.
    perform fill_cell using h 9 0 000 t_final-rec_err.
    perform fill_cell using h 10 0 000 t_final-rec_tot.
    if t_final-comment eq 'job did not run'.
    perform fill_cell using h 11 0 200 t_final-comment.
    elseif t_final-rec_err eq 0.
    perform fill_cell using h 11 0 000 t_final-comment.
    else.
    perform fill_cell using h 11 0 200 t_final-comment.
    endif.
    perform fill_cell using h 12 0 000 t_final-rerun.
    endloop.
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
    call method of h_excel 'Worksheets' = h_mapl." EXPORTIN G #1 = 2.
    perform err_hdl.
    add a new workbook
    call method of h_mapl 'Add' = h_map exporting #1 = 2.
    perform err_hdl.
    tell user what is going on
    set property of h_map 'NAME' = 'COPY'.
    loop at t_final.
    copy flights to active EXCEL sheet
    h = sy-tabix + 1.
    perform fill_cell using h 1 0 000 t_final-jobname.
    perform fill_cell using h 2 0 000 t_final-variant.
    perform fill_cell using h 3 0 000 t_final-description.
    perform fill_cell using h 4 0 000 t_final-strtdate.
    perform fill_cell using h 5 0 000 t_final-strttime.
    perform fill_cell using h 6 0 000 t_final-duration.
    perform fill_cell using h 7 0 000 t_final-listident.
    perform fill_cell using h 8 0 000 t_final-rec_upl.
    perform fill_cell using h 9 0 000 t_final-rec_err.
    perform fill_cell using h 10 0 000 t_final-rec_tot.
    if t_final-comment eq 'job did not run'.
    perform fill_cell using h 11 0 200 t_final-comment.
    elseif t_final-rec_err eq 0.
    perform fill_cell using h 11 0 000 t_final-comment.
    else.
    perform fill_cell using h 11 0 200 t_final-comment.
    endif.
    perform fill_cell using h 12 0 000 t_final-rerun.
    endloop.
    free object h_excel.
    perform err_hdl.
    *& Form ERR_HDL
    outputs OLE error if any *
    form err_hdl.
    if sy-subrc <> 0.
    write: / 'Batch Job Automation Carried Out Succesfully'.
    stop.
    endif.
    endform. " ERR_HDL .
    FORM FILL_CELL *
    sets cell at coordinates i,j to value val boldtype bold *
    form fill_cell using i j bold col val.
    call method of h_excel 'Cells' = h_zl exporting #1 = i #2 = j.
    perform err_hdl.
    set property of h_zl 'Value' = val .
    perform err_hdl.
    get property of h_zl 'Font' = h_f.
    perform err_hdl.
    set property of h_f 'Bold' = bold .
    perform err_hdl.
    set property of h_f 'Color' = col.
    perform err_hdl.
    endform. "FILL_CELL

    Hi,
    You are populating the Cells one by one from the internal table, and all of them are coloured and font is bold. the method is OK, but when the amount of data is huge - it is going to take a longer time. May be the performance will improve a little if you turn the visibility off.
    I ll suggest you to use ALV_XXL_CALL, it can color the key columns, at the same time you can have colored headings - and the performance is good. It is the same function module called when you do a "Export to Excel" from an ALV grid. But you can compain about the Font characteristics - as this does not change the Font size etc.
    Your code has got a lot of freedom as long as the formatting is concerned - for bigger data - i ll suggest you to use a WS_DOWNLOAD kind of a function module to get the data at once in the presentation server and then call Excel methods and do the formatting.

  • Performance issues when creating a Report / Query in Discoverer

    Hi forum,
    Hope you are can help, it involves a performance issues when creating a Report / Query.
    I have a Discoverer Report that currently takes less than 5 seconds to run. After I add a condition to bring back Batch Status that = ‘Posted’ we cancelled the query after reaching 20 minutes as this is way too long. If I remove the condition the query time goes back to less than 5 seconds.
    Please see attached the SQL Inspector Plan:
    Before Condition
    SELECT STATEMENT
    SORT GROUP BY
    VIEW SYS
    SORT GROUP BY
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
    AND-EQUAL
    INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N2
    INDEX RANGE SCAN GL.GL_CODE_COMBINATIONS_N1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
    INDEX RANGE SCAN GL.GL_JE_LINES_N1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
    INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
    INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_BATCHES
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
    INDEX RANGE SCAN GL.GL_PERIODS_U1
    After Condition
    SELECT STATEMENT
    SORT GROUP BY
    VIEW SYS
    SORT GROUP BY
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    NESTED LOOPS
    NESTED LOOPS OUTER
    NESTED LOOPS
    TABLE ACCESS FULL GL.GL_JE_BATCHES
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_HEADERS
    INDEX RANGE SCAN GL.GL_JE_HEADERS_N1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    INDEX UNIQUE SCAN GL.GL_ENCUMBRANCE_TYPES_U1
    INDEX UNIQUE SCAN GL.GL_DAILY_CONVERSION_TYPES_U1
    INDEX UNIQUE SCAN GL.GL_BUDGET_VERSIONS_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_SOURCES_TL
    INDEX UNIQUE SCAN GL.GL_JE_SOURCES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_CATEGORIES_TL_U1
    INDEX UNIQUE SCAN GL.GL_JE_BATCHES_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_JE_LINES
    INDEX RANGE SCAN GL.GL_JE_LINES_U1
    INDEX UNIQUE SCAN GL.GL_SETS_OF_BOOKS_U2
    TABLE ACCESS BY INDEX ROWID GL.GL_CODE_COMBINATIONS
    INDEX UNIQUE SCAN GL.GL_CODE_COMBINATIONS_U1
    TABLE ACCESS BY INDEX ROWID GL.GL_PERIODS
    INDEX RANGE SCAN GL.GL_PERIODS_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUES_N1
    INDEX RANGE SCAN APPLSYS.FND_FLEX_VALUE_NORM_HIER_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUES_TL
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUES_TL_U1
    TABLE ACCESS BY INDEX ROWID APPLSYS.FND_FLEX_VALUE_SETS
    INDEX UNIQUE SCAN APPLSYS.FND_FLEX_VALUE_SETS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    INDEX UNIQUE SCAN GL.GL_JE_HEADERS_U1
    Is there anything i can do in Discoverer Desktop / Administration to avoid this problem.
    Many thanks,
    Lance

    Hi Rod,
    I've tried the condition (Batch Status||'' = 'Posted') as you suggested, but the qeury time is still over 20 mins. To test i changed it to (Batch Status||'' = 'Unposted') and the query was returned within seconds again.
    I’ve been doing some more digging and have found the database view that is linked to the Journal Batches folder. See below.
    I think the problem is with the column using DECODE. When querying the column in TOAD the value of ‘P’ is returned. But in discoverer the condition is done on the value ‘Posted’. I’m not too sure how DECODE works, but think this could be the causing some sort of issue with Full Table Scans. How do we get around this?
    Lance
    DECODE( JOURNAL_BATCH1.STATUS,
    '+', 'Unable to validate or create CTA',
    '+*', 'Was unable to validate or create CTA',
    '-','Invalid or inactive rounding differences account in journal entry',
    '-*', 'Modified invalid or inactive rounding differences account in journal entry',
    '<', 'Showing sequence assignment failure',
    '<*', 'Was showing sequence assignment failure',
    '>', 'Showing cutoff rule violation',
    '>*', 'Was showing cutoff rule violation',
    'A', 'Journal batch failed funds reservation',
    'A*', 'Journal batch previously failed funds reservation',
    'AU', 'Showing batch with unopened period',
    'B', 'Showing batch control total violation',
    'B*', 'Was showing batch control total violation',
    'BF', 'Showing batch with frozen or inactive budget',
    'BU', 'Showing batch with unopened budget year',
    'C', 'Showing unopened reporting period',
    'C*', 'Was showing unopened reporting period',
    'D', 'Selected for posting to an unopened period',
    'D*', 'Was selected for posting to an unopened period',
    'E', 'Showing no journal entries for this batch',
    'E*', 'Was showing no journal entries for this batch',
    'EU', 'Showing batch with unopened encumbrance year',
    'F', 'Showing unopened reporting encumbrance year',
    'F*', 'Was showing unopened reporting encumbrance year',
    'G', 'Showing journal entry with invalid or inactive suspense account',
    'G*', 'Was showing journal entry with invalid or inactive suspense account',
    'H', 'Showing encumbrance journal entry with invalid or inactive reserve account',
    'H*', 'Was showing encumbrance journal entry with invalid or inactive reserve account',
    'I', 'In the process of being posted',
    'J', 'Showing journal control total violation',
    'J*', 'Was showing journal control total violation',
    'K', 'Showing unbalanced intercompany journal entry',
    'K*', 'Was showing unbalanced intercompany journal entry',
    'L', 'Showing unbalanced journal entry by account category',
    'L*', 'Was showing unbalanced journal entry by account category',
    'M', 'Showing multiple problems preventing posting of batch',
    'M*', 'Was showing multiple problems preventing posting of batch',
    'N', 'Journal produced error during intercompany balance processing',
    'N*', 'Journal produced error during intercompany balance processing',
    'O', 'Unable to convert amounts into reporting currency',
    'O*', 'Was unable to convert amounts into reporting currency',
    'P', 'Posted',
    'Q', 'Showing untaxed journal entry',
    'Q*', 'Was showing untaxed journal entry',
    'R', 'Showing unbalanced encumbrance entry without reserve account',
    'R*', 'Was showing unbalanced encumbrance entry without reserve account',
    'S', 'Already selected for posting',
    'T', 'Showing invalid period and conversion information for this batch',
    'T*', 'Was showing invalid period and conversion information for this batch',
    'U', 'Unposted',
    'V', 'Journal batch is unapproved',
    'V*', 'Journal batch was unapproved',
    'W', 'Showing an encumbrance journal entry with no encumbrance type',
    'W*', 'Was showing an encumbrance journal entry with no encumbrance type',
    'X', 'Showing an unbalanced journal entry but suspense not allowed',
    'X*', 'Was showing an unbalanced journal entry but suspense not allowed',
    'Z', 'Showing invalid journal entry lines or no journal entry lines',
    'Z*', 'Was showing invalid journal entry lines or no journal entry lines', NULL ),

  • Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query

    Hi All,
    There is a Performance issue after Upgrade from 4.7 to ECC 6.0 with a select query in a report painter.
    This query is working fine when executed in 4.7 system where as it is running for more time in ECC6.0.
    Select query is on the table COSP.
    SELECT (FIELD_LIST)
            INTO CORRESPONDING FIELDS OF TABLE I_COSP PACKAGE SIZE 1000
            FROM  COSP CLIENT SPECIFIED
            WHERE GJAHR IN SELR_GJAHR
              AND KSTAR IN SELR_KSTAR
              AND LEDNR EQ '00'
              AND OBJNR IN SELR_OBJNR
              AND PERBL IN SELR_PERBL
              AND VERSN IN SELR_VERSN
              AND WRTTP IN SELR_WRTTP
              AND MANDT IN MANDTTAB
            GROUP BY (GROUP_LIST).
       LOOP AT I_COSP      .
         COSP                           = I_COSP      .
         PERFORM PCOSP       USING I_COSP-_COUNTER.
         CLEAR: $RWTAB, COSP                          .
         CLEAR CCR1S                         .
       ENDLOOP.
    ENDSELECT.
    I have checked with the table indexes, they were same as in 4.7 system.
    What can be the reson for the difference in execution time. How can this be reduced without adjusting the select query.
    Thanks in advance for the responses.
    Regards,
    Dedeepya.

    Hi,
    ohhhhh....... lots of problems in select query......this is not the way you should write it.
    Some generic comments:
    1. never use SELECT
                       endselect.
       SELECT
      into table
       for all entries in table
      where.
       use perform statment after this selection.
    2. Do not use into corresponding fields. use exact structure type.
    3. use proper sequence of fields in the where condition so that it helps table go according to indexes.
        e.g in your case
              sequence should be
    LEDNR
    OBJNR
    GJAHR
    WRTTP
    VERSN
    KSTAR
    HRKFT
    VRGNG
    VBUND
    PARGB
    BEKNZ
    TWAER
    PERBL
    sequence should be same as defined in table.
    Always keep select query as simple as possible and perform all other calculations etc. afterwords.
    I hope it helps.
    Regards,
    Pranaya

  • Downloading data from internal table to xls file leading zeros are not disp

    Hai abap gurus,
    when i am downloading data from internal table to excle file. some field values in a column are with leading zeros and some others dont have leading zeros.but in the output it is showing without leading zeros. then how to get with exact values.
    Ex:
    <b>ECC Code.</b>
    045234
      88567
    098456 
    but output is giving like this:
    45234
    88567
    98456
    how to get the actual values.....
    plz help me in this matter.

    Dear Kiran,
    Those field in the internal table having Leading Zeroes, make those fields' datatype as character.
    Then use the function module to download the content of the internal table to the excel file.
    Regards,
    Abir
    Don't forget to Reward Points  *

  • Inserting records from internal table to database table

    Hi all,
    i want to insert records from internal table to zDatabase table, can u plz guide me which statement is better in performance to insert the records.
    1) insert one by one record from internal table
    loop at itab.
    insert ztable from wa.
    endloop.
    2) insert total records at a time
    INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
    or let me know if any other statement is there with high performance.
    i internal table contains nearly 40000 records.
    thanks.

    Hi,
    Insert the entire table at atime rather than a record so as to increase the performance.
    you can use INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
    or
    MODIFY ZPRODUCT FROM TABLE GI_AFPO.
    Regards,
    Raj.

  • Modify database table from internal table

    Hi All,
    I need to update database table from internal table which is having around 30000 records.
    I am using MODIFY tabname FROM TABLE int_tabname...
    Using this statement, I can modify the databse records very well. But user has some additional requirement.
    He wants that the table should be modified from the internal table and after modification we should have the erroneous records to be displayed if any.
    e.g. if 1500 records out of 30000 are erroneous then only 28500 records should be updated and 1500 records should be displayed as erroneous records so that the user can correct them and use them again for executing the program.
    Is there any FM which imports the database table name and internal table, modifies the database and exports an internal tanle with erroneous records?
    Any help will be appriciated,
    Regards,
    Neha

    Hi
    modifying datbase table useing internal table
    <b>advises</b> before updating this datbase table plz lock that table to avoid incosistency
    write the logic for modifying
    Modify the database table as per new dunning procedure
      MODIFY fkkvkp FROM TABLE lt_fkkvkp   .
    and finally unlock the table
    <b>example</b>
    *To lock table for further operations
      constants: lc_tabname TYPE  rstable-tabname  VALUE 'FKKVKP'  . "FKKVKP
      CALL FUNCTION 'ENQUEUE_E_TABLE'
        EXPORTING
          tabname        = lc_tabname
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 2
          OTHERS         = 3.
      IF sy-subrc EQ 0.
      To fetch all the contract accounts for customers of the segment
      Households/SME.
        PERFORM fetch_contract_accounts using lc_tabname .
      ENDIF.                    " IF sy-subrc EQ 0.
    *wrote the logic
    Modify the database table as per new dunning procedure from internal table
      MODIFY fkkvkp FROM TABLE lt_fkkvkp   .
    *unlock the tbale
      CALL FUNCTION 'DEQUEUE_E_TABLE'
       EXPORTING
         TABNAME   =  uc_tabname .
    <b>Reward if usefull</b>

  • Read from 2 tables, write only to one. Simple, but impossible??

    I've been messing about with various annotations for quite a while now, and I can't seem to figure out how to accomplish this seemingly simple task. I'm hoping somebody could explain to me the probably very obvious and simple mistake that I am making.
    I realize that question would otherwise point to problems in my database design and persistence strategy, but I can't seem to read from 2 tables, and write to only one. I have an entity bean that refers mainly to one table, but needs just one column of information from another table. It should not attempt to alter the secondary table, just join on it to get the one field it needs. So far, I've got the following:
    @Entity
    @Table(name = "ventureprofile")
    @SecondaryTable(name = "venture",
                    pkJoinColumns = @PrimaryKeyJoinColumn(name="ventureid"))
    @NamedQueries( {
            @NamedQuery(name = "Ventureprofile.findByVentureprofileid", query = "SELECT v FROM Ventureprofile v WHERE v.ventureprofileid = :ventureprofileid"),
            @NamedQuery(name = "Ventureprofile.findByVentureid", query = "SELECT v FROM Ventureprofile v WHERE v.ventureid = :ventureid"),
            @NamedQuery(name = "Ventureprofile.findByVenturesummary", query = "SELECT v FROM Ventureprofile v WHERE v.venturesummary = :venturesummary"),
            @NamedQuery(name = "Ventureprofile.findByLogoimagelocation", query = "SELECT v FROM Ventureprofile v WHERE v.logoimagelocation = :logoimagelocation"),
            @NamedQuery(name = "Ventureprofile.findByVisible", query = "SELECT v FROM Ventureprofile v WHERE v.visible = :visible ORDER BY v.venturename")
    public class Ventureprofile implements Serializable {
        @Id
        @GeneratedValue(strategy=GenerationType.AUTO, generator="Ventureprofile.ventureprofileid.seq")
        @SequenceGenerator(name="Ventureprofile.ventureprofileid.seq", sequenceName="ventureprofile_ventureprofileid_seq", allocationSize=1) 
        @Column(name = "ventureprofileid", nullable = false)
        private BigInteger ventureprofileid;      
        @Column(name = "ventureid", table="ventureprofile", nullable = false)
        private Long ventureid;
        @Column(name = "venturesummary")
        private String venturesummary;
        @Column(name = "logoimagelocation")
        private String logoimagelocation;
        @Column(name = "visible", nullable = false)
        private boolean visible;  
        @Column(table = "venture", name = "venturename", nullable=false, insertable=false, updatable=false)
        private String venturename;
    //... The extra column of data is "venturename", the tables are related by the column "ventureid". I contest, that since I have specified for read/write access no fields mapped to the 'venture' table (I specified with 'table=' any ambiguous columns), and described the table relationship via my @PrimaryKeyJoinColumn annotation, that toplink should not try to persist anything to the 'venture' table. However, I am getting the following exception:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: org.postgresql.util.PSQLException: ERROR: null value in column "venturename" violates not-null constraint
    Error Code: 0
    Call: INSERT INTO venture (ventureid) VALUES (?)
            bind => [220]
    Query: InsertObjectQuery(VCMarkWeb.db.entity.Ventureprofile[ventureprofileid=220])
            at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:311)
    ...It seems pretty clear that toplink is trying to insert an empty row into the secondary table, and barfing since it is inserting no values, including those constrained to be nonnull. Anyway...I hope it's clear what's going on here, and perhaps somebody knows the right way to do this. Thanks fot your help!

    Tom and Cornelius,
    Thank you both for your ideas. This what I think I will do:
    1) Drive up to OWC (fortunately they are only about 15 miles away from where I live) and get a bigger HD and some more RAM.
    2) Copy the OS9 applications on the existing HD to a thumb drive.
    3) Install the new hard drive and memory
    4) Install OSX TIger and 9.2.2
    5) Maybe do the 4.1.8 firmware update also, maybe.
    6) Look around for a Superdrive and if I can get one for a good price, I'll do it otherwise I'll just use USB thumb drives if I need to copy something off the PB.
    One thing that I was fighting with the other day was that when I had the yoyo power supply plugged in and attached when the PB was in the kitchen, the batteries would not charge although the yoyo was outputting +24 VDC.
    I move everything to the garage, where I originally fixed the yoyo power supply, plug it in out there and the batteries started charging!!! Scratching my head...then I check the voltage between the metal barrel (with the Vsensing resistor attached between the metal shell and the ground wire) of power supply plug and the +24 VDC wire and there is 22 to 23 VDC with the batteries being charged. In the kitchen when they were not being charged, it was about 1.0 VDC. So I rotate the plug a little bit and the batteries start charging. Rotate it more and the batteries don't charge. Something else to do when I have spare time.
    Anyway, thanks for the help and suggestions.
    John

Maybe you are looking for

  • Unable to read SD cards, CF cards, etc with windows 8. Windows 7 and before work

    Hi everyone, One strange thing I've found with Windows 8.1 is that if I try to access a SD card, micro SD card, CF card, or similar, I get an error that says something about you need permission to access this. I've tried giving myself permissions, bu

  • Recovery partition and Recovery disk doesn't work

    I have HP Pavilion dv6000 Windows Vista Home Premium with Recovery Partition at drive D:\. Here is my problem. I want to use the System Recovery to put my PC to its default setting, I have use Recovery Manager, but System Recovery does not work. I ha

  • 30 second rewind there on some books, missing on others. How can I activate it for all books?

    Greetings all. I listen to a lot of audiobooks while I drive. Many of my audiobooks have the 30 second rewind feature, while some don't. I love the feature and use it frequently. I have tried to figure out a correlation between various Option setting

  • Getting Creative with FrameMaker 1x and Windows 7

    For some years I have been treading water with my FrameMaker installation, mainly because of nagging inconsistencies and 'unforeseen consequences' relating to Windows, Acrobat, FrameMaker (and the phases of the moon). Back in 2009 I updated my workst

  • Sharing files across users

    When I first got my MacBook Pro, I couldn't port over the files from my old PC into the default user profile.  So I had to create a second user profile in which to port over the files.  Is there a way to create a shared folder so that both user profi