Runtime error in  SQL statement

hello,
I have a runtime during selection from database table due to large ranges in where condition. for example:
select * from cosp into corresponding
  fields of table gt_cosp 
  where objnr in r_objnrs               
  and lednr = lv_lednr                
  and versn = p_vercost               
  and wrttp = lv_wrttp                
  and gjahr in r_gjahr                
  and kstar in r_kstar.
The suggested solution is to use internal table instead of a range and use "for all entries" or to divide the ranges to smaller units.
As you see I have few ranges and this solution could be not effective in this case.
Do you have a better idea?
Thanks in advance,
Far

Hi Fariba
You can tried to limit the number of records are loaded in table range.
So I don't know how you fill those range, but you do it in more steps than one.
For example:
LOOP AT ITAB.
R_RANGE(3) = 'IEQ'.
R_RANGE_LOW = ITAB-FIELD.
APPEND R_RANGE.
ENDLOOP.
SELECT * FROM <TABLE> INTO TABLE MY_TABLE
                            WHERE FIELD IN R_RANGE.
You could do:
DESCRIBE TABLE ITAB LINES MAX_LINE.
INDEX_FROM = 1.
INDEX_TO    = 100.
DO.
LOOP AT ITAB FROM INDEX_FROM
             TO   INDEX_TO.
R_RANGE(3) = 'IEQ'.
R_RANGE_LOW = ITAB-FIELD.
APPEND R_RANGE.
ENDLOOP.
SELECT * FROM <TABLE> APPENDING INTO TABLE MY_TABLE
                            WHERE FIELD IN R_RANGE.
INDEX_FROM = INDEX_TO + 1.
IF INDEX_FROM > MAX_LINE.
  EXIT.
ENDIF.
INDEX_TO   = INDEX_TO + 100.
ENDDO.
In this way you select for all 100 hit.
How to solve your problem depend on how you have to fill the range.
Max

Similar Messages

  • Error in SQL Statement: SAPSQL_INVALID_FIELDNAME F~/BIC/ZREVISQTY

    Dear Guys,
                    Regards..In the "Listcube" transaction and "Manage Contents" of the cube,whenver i execute the transaction to get the 'Output List' ,i get the following error : " Error in SQL Statement : SAPSQL_INVALID_FIELDNAME"..with the following obj : ZREVISQTY............But when i remove the "ZREVISQTY" from the selection screen in both "LISTCUBE" and "MANAGE" of the cube,the output works fine......It would be great if somone can throw light on this...........
    Manythanks
    Arun

    Dear Guys,
                    Regards..In the "Listcube" transaction and "Manage Contents" of the cube,whenver i execute the transaction to get the 'Output List' ,i get the following error : " Error in SQL Statement : SAPSQL_INVALID_FIELDNAME"..with the following obj : ZREVISQTY............But when i remove the "ZREVISQTY" from the selection screen in both "LISTCUBE" and "MANAGE" of the cube,the output works fine......It would be great if somone can throw light on this...........
    Manythanks
    Arun

  • Error in SQL Statement: SAPSQL_INVALID_TABLENAME

    Hello all,
    While displaying contents of infocube i am getting strange error ..
    Error in SQL Statement: SAPSQL_INVALID_TABLENAME ABC
    Message no. DBMAN256
    ( Table name length is 16 )
    I am able to see the contents of Fact table.
    Could not found any solution till now.. Any lights , views will be very much helpful.
    Regards
    Nimesh

    hi Nimesh,
    check oss note 835816
    Symptom
    When you execute a query, a data-mart, SEM, APO or similar access, an SQL error 4004 occurs "Unknown table name" Open SQL: Short dump with UNCAUGHT_EXCEPTION CX_RSR_X_MESSAGE in the ABAP Call Stack, you find the RSDRC_BASIC_DB_QUERY_DATA_GET function module.
    Prior to this, relatively large datasets (more than 10%) were deleted from the InfoCube.
    Other terms
    Business Information Warehouse, Factview, DBMAN256, DBMAN
    256, SAPLRSDRS, DELETE, DELETE_FACTS, RSDRD_DELETE_FACTS
    Reason and Prerequisites
    During the purge, the fact tables are rebuilt again as of a certain percentage, for performance reasons. The factview is then not created again.
    Solution
    Views that are already missing can be compiled again with the SAP_FACTVIEWS_RECREATE report.
    The correction prevents the problem reappearing.
    BW 3.0B
               Import Support Package 27 for 3.0B (BW3.0B Patch27 or SAPKW30B27) into your BW system. The Support Package is available whennote 0723258 with the short text "SAPBWNews BW3.0B Support Package 27", which describes this Support Package in more detail, is released for customers.
    BW 3.10 Content
               Import Support Package 21 for 3.10 (BW3.10 Patch21 or SAPKW31021) into your BW system. The Support Package is available whennote 0723263 with the short text "SAPBWNews BW3.1 Content Support Package 21", which describes this Support Package in more detail, is released for customers.
    BW 3.50
               Import Support Package 13 for 3.5 (BW3.50 Patch13 or SAPKW35013) into your BW system. The Support Package is available when note 0765114 with the short text "SAPBWNews BW Support Package 13 NetWeaver'04  Stack 13", which describes this Support Package in more detail, is released for customers.
    In urgent cases you can use the correction instructions.
    These notes may already be available before the Support Package is released, to make information available in advance. However, the short text then still contains the words "preliminary version".

  • Error executing SQL statement

    Hi,
    Can anyone see why I am getting this error message for my SQL query?
    WITH SKU_DATA AS (
    SELECT /*+ MATERIALIZE */ DISTINCT FROM_LOC_ID,
               SKU_ID,
               DESCRIPTION,
               UPDATE_QTY,
            ORDER_ID,
            CONSIGNMENT,
               WEIGHT,
            PALLET_ID,
            CASE 
        WHEN Upd_Qty_Ratio < 1
        THEN TO_CHAR(UPDATE_QTY) || 'U'
        WHEN TRUNC(Upd_Qty_Ratio) = Upd_Qty_Ratio
        THEN TO_CHAR(Upd_Qty_Ratio) || 'C'
        ELSE TO_CHAR(TRUNC(UPDATE_QTY)) || 'C' || ' ' || TO_CHAR(ROUND(MOD(Upd_Qty_Ratio, 1) *  USER_DEF_NUM_3, 6)) || 'U'
        END CU_Sum
        FROM (
      SELECT DISTINCT
             FROM_LOC_ID,
          S.SKU_ID,
             S.DESCRIPTION,
             ITL.UPDATE_QTY,
             S.USER_DEF_NUM_3,
          OH.ORDER_ID,
          ITL.CONSIGNMENT,
          ITL.PALLET_ID,
             NVL(ITL.UPDATE_QTY,0)*NVL(S.EACH_WEIGHT,0) Weight,
             ITL.UPDATE_QTY/(CASE S.USER_DEF_NUM_3 WHEN 0 THEN 1 ELSE S.USER_DEF_NUM_3 END) Upd_Qty_Ratio
        FROM INVENTORY_TRANSACTION ITL, SKU S, LOCATION L, ORDER_HEADER OH
        WHERE ITL.SKU_ID = S.SKU_ID
        AND ITL.CODE = 'Pick'
        AND ITL.CONSIGNMENT = $P{Consignment}
        AND OH.ORDER_DATE = TO_CHAR($P{Date}, 'DD-Mon-YYYY')
        AND OH.ORDER_ID = ITL.REFERENCE_ID
        AND ITL.TO_LOC_ID = 'CONTAINER'))
    SELECT DISTINCT ORDER_ID, CONSIGNMENT, WEIGHT, PALLET_ID, CU_Sum,
    (SELECT NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'U') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'C',NULL) END)),'0') ||'C' || ' ' || NVL(TO_CHAR(SUM(CASE WHEN NULLIF(SUBSTR(Cu_Sum, -1), 'C') IS NULL THEN NULL ELSE REPLACE(Cu_Sum,'U',NULL) END)),'0') ||'U' FROM SKU_DATA) AS Total_Cu_Sum
    FROM SKU_DATAThanks in advance.
    SM.

    Hi Sean,
    It is saying error executing SQL statement, but with no "ORA error" so maybe its a Jasper Reports error i'm not too sure.
    And this is a different version of the one we done together, that one is running fine just having problems putting the jasper file on to the server. I'm just using the main bits from the original SQL.
    SM

  • Report -Error in SQL Statement

    Hi to All,
    Whe I ran the report on ODS its giving the following error.
    Error Error in SQL Statement:DBIF_RSQL_INVALID-RSQL
    Error Error When generating the SQL statement
    Error reading the data of Infoprovider ZABCXX
    Abort system error in Program SAPLRRK0 and form RSRDR;SRRK0F30-01
    Note:ZABCXX is a Multiprovider
    Then I identified data type  is mismatched for 4 characteristics in ODS , I have changed the data type from Date to Char then deleted the data from ODS and reloaded the six Init packages with different selections.
    After reloading I ran the report still same error its showing.
    Is any bug in stadard program?
    Pls can anyody throw some light on my problem.
    Thanks,
    Sha.

    Hi,
    Try using transaction code ListCube and see if you are able to see some entries in BW system itself.
    Also in RSRT -> Query -> Environment -> Delete old abaps
    Also in RSRT -> Query -> Environment -> Generate Queries
    And let us know the outoput .
    Hope that helps.
    Regards
    Mr Kapadia
    Assigning points is the way to say thanks in SDN.

  • SAP BW 3.5 "Error in SQL Statement: DBIF_RSQL_INVALID_RSQL" in Infospoke

    Hi ,
    I am working on SAP BW 3.5.
    while downloading the records through infospoke and giving them to the Application server side, I am getting an error  "Error in SQL Statement: DBIF_RSQL_INVALID_RSQL".
    Daily the Infospoke runs on delta mode. But for downloading of few records i have deactivated the delta and changed it in to Full mode. After downloading the data I again Activated the delta.but while Executing on Background mode I am getting an error mentioned above.
    can anyone please suggest a solution for resolving this error?
    Thanks in advance.
    Santosh.

    Hi:
    Did you do some recent change in the objects?. I face sometimes this error and it is due to misalignment among the objects in a data flow (cubes, DSOs, transformations, DTPs, etc.).
    What you can do is activate everything again.
    Best regards.

  • SQL error, Error in SQL statement

    hi all,
    in our project we are using 0SD_C03. while  i creating aggrigates it's showining "SQL error" and Error in SQL statement.
    please provide me some inputs.
    sasidhar

    check:
    Aggregate issue
    Problems with BITMAPINDEX under ORACLE in BW
    SAP Note Number: 159779
    No 'Star Transformation' for a Hierarchy Changerun
    SAP Note Number: 934281

  • Error in SQL Statement (ODS data loading Error)

    Hello Gurus...
    I am trying to loading the data Info Source To ODS in my ODS Key Figure Z_IVQUA (Invoice Quantity)
    is getting the Error Message Data shows 0 from 0 Records.
    I was Remove the Key Field from ODS Then try to load the data but i am getting same Error..
    Error in SQL Statement: SAPSQL_INVALID_FIELDNAME F~/BIC/Z_INVQUA
    Errors in source system
    Please Suggest....
    Thanks
    Prakash

    Hello All...
    Really appreciate if you can give me some advise. Thanks.
    Prakash
    Edited by: Prakash M on Jan 14, 2009 2:14 PM

  • Error in SQL Statement: SAPSQL_INVALID_TABLENAME /BI0/V0FIGL_C01F

    Hi,
    When I am executing datasource 80FIGL_C01 using T.code RSA3 in BW3.5, getting error Error in SQL Statement: SAPSQL_INVALID_TABLENAME /BI0/V0FIGL_C01F
    I am getting same error when pulling data from BW3.5 to BI7.0 at scheduling.
    Can I have your valuable insights on this.
    Thanks in advance!
    Sapna

    Hi,
    Try the report sap_factviews_recreate. Warning: the program generate the views for all infocubes. When you don't want to do this, debug the abap and delete the infocubes from the table G_T_CUBE.
    Or activate the infocube and re-generate the datasource.
    Sven

  • RMAN-10006: error running SQL statement: alter session set remote_dependenc

    Backups are failing with following error
    RMAN-00554: initialization of internal recovery manager package failed
    RMAN-12001: could not open channel default
    RMAN-10008: could not create channel context
    RMAN-10002: ORACLE error: ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must be from among MANUAL, AUTO
    RMAN-10006: error running SQL statement: alter session set remote_dependencies_mode = signature
    Not able to change to signature
    SQL> alter session set remote_dependencies_mode=signature;
    ERROR:
    ORA-00096: invalid value SIGNATURE for parameter remote_dependencies_mode, must
    be from among MANUAL, AUTO
    I dont see MANUAL or AUTO as valid value for this parameter (http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/ch1175.htm#1023124) DB version is 9.2.0
    Parameter type
    String
    Syntax
    REMOTE_DEPENDENCIES_MODE = {TIMESTAMP | SIGNATURE}
    Default value
    TIMESTAMP
    Parameter class
    Dynamic: ALTER SESSION, ALTER SYSTEM
    =======================================
    I believe it could be because of following bug
    "A PRE-PATCHED ORACLE IMAGE CAN BE INSTALLED IN MEMORY "
    Refer: "https://metalink2.oracle.com/metalink/plsql/f?p=130:15:1613505143885559758::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,4610411,1,1,1,helvetica"
    I appreciate your effort in fixing this issue.
    Edited by: user10610722 on Nov 25, 2008 4:37 PM

    Hi:
    It seems when you are starting RMAN it's executing some commands (one 'ALTER SESSION...'. It's seems to be a batch which has a bad value for SORT_AREA_SIZE. Find it and modify to a proper value as message shows. If you can't find start RMAN by calling directly the executable ($ORACLE_HOME/bin/rman or %ORACLE_HOME%/bin/rman.exe).

  • Capture Error'd SQL Statement

    Hi Everyone,
    I would like to create an error package say PKG_ERROR that has a procedure say LOG_ERROR. The LOG_ERROR procedure will basically logs the following in a table
    ERROR_ID
    -> SEQ_ERROR_ID.NEXTVAL
    CREATED_DATE
    -> SYSDATE
    HOST_NAME
    -> SELECT sys_context('USERENV', 'HOST') FROM dual;
    IP_ADDRESS
    -> SELECT sys_context('USERENV', 'IP_ADDRESS') FROM dual;
    OS_USER
    -> SELECT sys_context('USERENV', 'OS_USER') FROM dual;
    SESSION_USER
    -> SELECT sys_context('USERENV', 'SESSION_USER') FROM dual;
    SCHEMA_NAME
    -> SELECT sys_context('USERENV', 'CURRENT_SCHEMA') FROM dual;
    ERROR_CODE
    -> SQLCODE
    ERROR_MESSAGE
    -> SQLERRM
    ERROR_STACK
    -> DBMS_UTILITY.FORMAT_ERROR_STACK
    CALL_STACK
    -> DBMS_UTILITY.FORMAT_CALL_STACK
    SQL_STATEMENT
    -> ????
    My problem now is how to get the SQL_STATEMENT that caused the error.
    I'll be using the PKG_ERROR.LOG_ERROR procedure as follows:
    PROCEDURE SP_TEST
    IS
    v_NUMBER NUMBER;
    BEGIN
    SELECT 1 / 0
    INTO v_NUMBER
    FROM DUAL;
    EXCEPTION
    WHEN OTHERS THEN
    PKG_ERROR.LOG_ERROR(param_1, param_N);
    END PROCEDURE SP_TEST;
    I tried numerous codes and place them on the PKG_ERROR.LOG_ERROR procedure but to no avail:
    #1
    -- did not return the ERROR'd SQL Statement
    SELECT q.sql_text
    INTO captured_sql
    FROM gv$sql q, gv$sql_cursor c, gv$session s
    WHERE s.audsid = USERENV('sessionid')
    AND s.prev_sql_addr = q.address
    AND q.address = c.parent_handle;
    #2
    -- Only works in Database Error Trigger (I would like a solution via Package)
    DECLARE
    l_text ora_name_list_t;
    l_n number;
    BEGIN
    dbms_output.put_line( '--------------------' );
    dbms_output.put_line('statment causing error: ' );
    l_n := ora_sql_txt( l_text );
    FOR i in 1 .. nvl(l_text.count,0)
    LOOP
    dbms_output.put_line(l_text(i) );
    END LOOP;
    dbms_output.put_line( 'error text: ' );
    FOR i IN 1 .. ora_server_error_depth
    LOOP
    dbms_output.put_line(ora_server_error_msg(i) );
    END LOOP;
    dbms_output.put_line( '--------------------' );
    END;
    #3
    -- as per PSOUG it is returns the first 4K bytes of the current SQL that triggered the fine-grained auditing event. (I'm not using FGA)
    SELECT sys_context('USERENV', 'CURRENT_SQL') FROM dual;
    Is it possible??
    Thanks,
    Henry Wu

    <My problem now is how to get the SQL_STATEMENT that caused the error.>
    We use a location variable that indicates where in a program the error occurred, something like
      variable v_location_c VARCHAR2(10);
      v_location_c := '1000000000';
      UPDATE ...
    EXCEPTION
      WHEN OTHERS THEN
        log_error('program_name',user,v_location_c, ...)

  • Runtime Error in SQL command ..

    Hi everybody
    I have a report wich terminates with a dump message.
    The error is in an SQL command, here the program aborts:
    SELECT KUNNR KKBER KLIMK SAUFT SKFOR SSOBL
        INTO TABLE I_KNKK
        FROM KNKK
       WHERE KUNNR IN R_KUNNR
         AND KKBER IN R_KKBER
         AND SBGRP IN S_SBGRP.
    DATA: BEGIN OF I_KNKK OCCURS 0,
          KUNNR LIKE KNKK-KUNNR,
          KKBER LIKE KNKK-KKBER,
          KLIMK LIKE KNKK-KLIMK,
          SAUFT LIKE KNKK-SAUFT,
          SKFOR LIKE KNKK-SKFOR,
          SSOBL LIKE KNKK-SSOBL,
          SBGRP LIKE KNKK-SBGRP,
          END OF I_KNKK.
    In first moment, i saw the table and SQL filter have the SBGRP field but the SQL fields selection has not this field. But, these same program works good with others selection parameters, in fact this SQL only terminates the program for the bigest company, wich causes the program make many BD access because all previous SQL.
    The dump log says:
    Runtime errors         DBIF_RSQL_INVALID_RSQL
    Exception              CX_SY_OPEN_SQL_DB
    Occurred on            23.05.2006 at   17:27:15
    Error in the module RSQL accessing the database interface.
    An exception occurred. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB',  neither caught nor passed along using a RAISING clause, in the procedure "(FORM)" . Since the caller of the procedure could not have expected this except to occur, the running program was terminated.
    The reason for the exception is:
    The SQL statement generated from the SAP Open SQL Statement violates restriction imposed by the database system used in R/3.
    Possible errors:
    o The maximum size of an SQL statement has been exceeded.
    o The statement contains too many input variables.
    o The space needed for the input data exceeds the   
        available memory.
    o ...
    How can i be sure the dump is for a lot of BD access for all the SQL commands ?
    If these is the error, does somebody knows how can i eliminate this error ?
    Please help ..
    Regards
    Frank

    I think the field discrepancy is a red herring here. Not guilty! I agree that using the 'CORRESPONDING FIELDS OF' is safer though.
    The error could be happening because your range variables have lots of entries in them which makes the generated sql huge.
    To break it up you could use the 'package size' option of the select. This will work it's way through the input in chunks (or packages) of the size you specify.
    You could change it to:
    SELECT KUNNR KKBER KLIMK SAUFT SKFOR SSOBL 
    INTO TABLE I_KNKK package size 2000 "or a variable value      
    FROM KNKK                                  
    WHERE KUNNR IN R_KUNNR                     
    AND KKBER IN R_KKBER                       
    AND SBGRP IN S_SBGRP.                      
    process current contents of i_knkk here                                           
    endselect.     
    or ,
    SELECT KUNNR KKBER KLIMK SAUFT SKFOR SSOBL 
    appending TABLE I_KNKK package size 2000       
    FROM KNKK                                  
    WHERE KUNNR IN R_KUNNR                     
    AND KKBER IN R_KKBER                       
    AND SBGRP IN S_SBGRP.                      
    endselect.

  • Runtime error at select statement in RFC_READ TABLE FM

    Dear All,
       I have copied the standard FM RFC_READ_TABLE to incorporate the customer needs. Below is the select query which I have written in this FM.
    SELECT (po_search_text-column_text) INTO <wa> FROM ekko
          INNER JOIN ekpo ON ekko~ebeln = ekpo~ebeln
          INNER JOIN eket ON ekpo~ebeln = eket~ebeln AND ekpo~ebelp = eket~ebelp
          INNER JOIN lfa1 ON ekko~lifnr = lfa1~lifnr
          INNER JOIN lfm1 ON ekko~lifnr = lfm1~lifnr AND ekko~ekorg = lfm1~ekorg
          INNER JOIN lfb1 ON ekko~lifnr = lfb1~lifnr AND ekko~bukrs = lfb1~bukrs
          INNER JOIN t024 ON ekko~ekgrp = t024~ekgrp
          INNER JOIN zatscsng_status ON eket~ebeln = zatscsng_status~po_number
          AND   eket~ebelp = zatscsng_status~po_line
          AND   eket~etenr = zatscsng_status~po_sched_line
          INNER JOIN adrc ON zatscsng_status~delivery_addr = adrc~addrnumber
          WHERE (po_search_text-cond_text)
          ORDER BY (po_search_text-sort_text).
    Here, posearch_text-column_text_ will have the fields to be selected at runtime and posearch_text-cond_text_ is the where condition. It is running fine in this case.
    But when I try to select Item Category ( EKPO-PSTYP), if data is present for this category, it is returning the values but if data is not there for the particular item category in the where clause, it is giving a RUNTIME ERROR at the select statement.
    Here is the ERROR ANALYSIS:
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
      not caught in
    procedure "ZATSCSNG_RFC_READ_TABLE" "(FUNCTION)", nor was it propagated by a
      RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    The current ABAP program has tried to execute an Open SQL statement
    which contains a WHERE, ON or HAVING condition with a dynamic part.
    The part of the WHERE, ON or HAVING condition specified at runtime in
    a field or an internal table, contains the invalid value "<L_LINE>-PSTYP".
    Edited by: Rob Burbank on Mar 17, 2010 5:09 PM

    Now that's what I call a join statement...
    You probably have a bug in how you build po_search_text-cond_text, the content must be a syntactically correct where clause. It seems that in your example there is just "<L_LINE>-PSTYP" without a condition, so try omitting it altogether.
    Debug the content of po_search_text-cond_text before it hits the select statement.
    Thomas

  • Performance Tuning 'Runtime Error' on Select statement

    Hi Experts,
    Good Day!
    I would like to ask some help regarding a custom program that will encounter 'Runtime Error' on the below codes on how to perform performance tunning especially number 1.
    1.
    SELECT A~VBELN A~ERDAT A~AUART A~VKORG A~VTWEG A~SPART A~VDATU
             A~KUNNR B~POSNR B~MATNR B~ARKTX B~ABGRU B~KWMENG B~VRKME
             B~WERKS B~VSTEL B~ROUTE
          FROM VBAK AS A INNER JOIN VBAP AS B ON A~VBELN EQ B~VBELN
                         INNER JOIN VBEP AS C ON A~VBELN EQ C~VBELN
                           AND B~POSNR EQ C~POSNR
            INTO CORRESPONDING FIELDS OF TABLE I_DATA_TAB
              WHERE A~VBELN  IN S_VBELN
                AND A~VKORG  IN S_VKORG
                AND A~AUART  IN S_AUART
                AND A~VTWEG  IN S_VTWEG
                AND A~SPART  IN S_SPART
                AND A~VDATU  IN S_VDATU
                AND A~KUNNR  IN S_KUNNRD
                AND B~MATNR  IN S_MATNR
                AND B~KWMENG IN S_KWMENG
                AND B~VRKME  IN S_VRKME
                AND B~WERKS  IN S_WERKS
                AND C~EDATU  IN S_VDATU.
    2.
    SELECT VBELN FROM LIKP INTO LIKP-VBELN
                  WHERE LFDAT IN S_VDATU
                    AND VKORG IN S_VKORG
                    AND LFART EQ 'YSTD'
                    AND KUNNR IN S_KUNNRP
                    AND KUNAG IN S_KUNNRD
        SELECT VBELN POSNR LFIMG MATNR WERKS
           FROM LIPS INTO (LIPS-VBELN, LIPS-POSNR, DISPLAY_TAB-DEL_QTY,
                           LIPS-MATNR, LIPS-WERKS)
                 WHERE VBELN EQ LIKP-VBELN
                   AND MATNR IN S_MATNR
                   AND VTWEG IN S_VTWEG
                   AND SPART IN S_SPART
                   AND WERKS IN S_WERKS.   
         ENDSELECT.
      ENDSELECT.
    4.
    SELECT DELIVERY POSNR MATNR PODLFIMG FROM T9YPODI INTO
        (T9YPODI-DELIVERY, T9YPODI-POSNR, T9YPODI-MATNR, T9YPODI-PODLFIMG)
                           WHERE MATNR   IN S_MATNR
                             AND PODDATE IN S_VDATU.
    Answer's will be a great help.
    ~Thank You,
      Lourd
    Edited by: Lourd06 on Oct 23, 2009 10:32 AM
    Moderator message - Welcome to SCN.
    Moderator message - Please see Please Read before Posting in the Performance and Tuning Forum before posting. You're in the driver's seat here. It's up to you to do some analysis before expecting that people can halp you. - post locked
    And please use code tags.
    Edited by: Rob Burbank on Oct 23, 2009 9:13 AM

    Hi All,
    We've checked the transaction ST22 it is TIME OUT. I really need your help on this the program will dump in number 1 Select statement. Can you help me perform a performance tunning.
    In transaction ST22
    Runtime Errors         TIME_OUT
    Date and Time          21.10.2009 08:51:33
    Short text
         Time limit exceeded.
    What happened?
         The program "ZV0PSR10" has exceeded the maximum permitted runtime without
         interruption and has therefore been terminated.
    What can you do?
         Note down which actions and inputs caused the error.
         To process the problem further, contact you SAP system
         administrator.
         Using Transaction ST22 for ABAP Dump Analysis, you can look
         at and manage termination messages, and you can also
         keep them for a long time.
    Error analysis
         After a specific time, the program is terminated to make the work area
         available to other users who may be waiting.
         This is to prevent a work area being blocked unnecessarily long by, for
         example:
         - Endless loops (DO, WHILE, ...),
         - Database accesses with a large result set
         - Database accesses without a suitable index (full table scan)
         The maximum runtime of a program is limited by the system profile
         parameter "rdisp/max_wprun_time". The current setting is 1200 seconds. If this
          time limit is
         exceeded, the system attempts to cancel any running SQL statement or
         signals the ABAP processor to stop the running program. Then the system
         waits another 60 seconds maximum. If the program is then still active,
         the work process is restarted.
    ~Thank you
    Lourd
    Edited by: Lourd06 on Oct 23, 2009 11:22 AM
    Edited by: Lourd06 on Oct 23, 2009 11:33 AM

  • Error: PL/SQL statement ignored

    In the code below i am getting 3 errors:
    a. PL/SQL statement ignored
    b. PLS-00201
    c. PL/SQL: ORA-00904 : invalid identifier
    please help. thank you
    =========================================
    Package body:
    =========================================
    create or replace package BODY manage_students
    as
         procedure find_sname
         (i_student_id IN student.student_id%TYPE,
         o_first_name OUT student.first_name%TYPE,
         o_last_name OUT student.last_name%TYPE)
         IS
         v_student_id student.student_id%TYPE;
         BEGIN
              select first_name, last_name
                   into o_first_name, o_last_name
                   from student
                   where student_id = i_student_id;
         exception
              when others
              then
                   DBMS_OUTPUT.PUT_LINE('Error in finding student_id: '||v_student_id);
         end find_sname;
         function id_is_good
         (i_student_id in student.student_id%TYPE)
              return BOOLEAN
         IS
              v_id_cnt number;
         begin
              select count(*)
                   into v_in_cnt
                   from student
                   where student_id = i_student_id;
              return 1 = v_id_cnt;
         EXCEPTION
         when others then
              return FALSE;
         end id_is_good;
    END manage_students;
    =========================
    Package specification:
    =========================
    set serveroutput on
    create or replace package manage_students
    as
         procedure find_sname
              (i_student_id IN student.student_id%TYPE,
              o_first_name OUT student.first_name%TYPE,
              o_last_name OUT student.last_name%TYPE
         function id_is_good
         (i_student_id IN student.student_id%TYPE)
              RETURN BOOLEAN;
    END manage_students;
    Edited by: [email protected] on Mar 19, 2009 6:03 AM
    Edited by: [email protected] on Mar 19, 2009 6:03 AM

    Congrats, someonElse! ;-)
    And about the when others: read about it on asktom why it's a bad practice, here's an example:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1509245700346768268#1535781400346575552
    I've spent myself way too much time on finding and fixing bugs caused by 'when others', so I always comment about it too ;-)
    Edited by: hoek on Mar 19, 2009 2:14 PM
    Edited by: hoek on Mar 19, 2009 2:18 PM

Maybe you are looking for

  • Enabling the java plugin of a browser

    how to enable the java plugin of a browser. It says go to control panel of the windows, but there is no such icon..how to enable it???

  • ADF Faces - showOneTab PPR problem in Internet Explorer

    Hoping someone has some insight into this that may help. This is causing us a lot of problems for us and could end up causing us to drop ADF faces from our project. Basically we are using af:showOneTab in our application and the first time we change

  • My Mac is unable to mount any external drive which is compatible with windows.

    It read the drives but doesn't mount them so they are pretty much useless. It tells me to repair it but the repair option is never available. This only happens for drives which are supposed to be compatible with both windows and macintosh. Plz Help

  • PRKO-2015 : Error in checking condition of instance on node:

    I am using Oracle 10.2.0.4 2 node RAC on Solaris 10 x86_86. I have renamed our test database using nid and have restarted the RAC instance. The cluster is not able to identify the database eventhough I've tried adding the database and instances manua

  • Replacing Cracked Screen for Ideacenter A720

    Hi All, I have managed to severely crack the screen on my A720 All-in-one (touchscreen, Windows 8). Any suggestions on where to buy a replacement screen or get it repaired without going to Lenovo. I look forward to your responses.