Runtime error using range table in select query

I have to select tcodes from table tstc, based on the entries in ust12,
the entries in ust12-von and ust12-bis, these contains wild charcters also,  and i have to selct all the tcodes  from von to bis.
so ia m preparing a range table for the entries in ust12, and querying table tstc, then i am getting a runtime error with following description.
'If the problem occurred because an excessively large table was used
in an IN itab construct, you can use FOR ALL ENTRIES instead.'
but how can i use FOR ALL ENTRIES here, because if von = A* and bis = AB*,then i ahve to read all the entries from AAAA till ABZZ (may be something like this),
is there any way to write this query, with out runtime error.
there are total 15000 entries in ust12, i am preparing range table for 3000 entries each and querying tstc.
Thanks in advance
Best Regards
Amarender Reddy B

Hi,
first write a select on ust12 based on ust12-von and ust12-bis.
eg: select von bis from ust12 into table gt_ust12
                           where von LIKE 'A%'
                               and bis LIKE 'AB%'.
now write another select for tstc for all entries in gt_ust12...
Hope it helps
Regards,
Pavan

Similar Messages

  • Using plsql tables in select statement of report query

    Hi
    Anyone have experience to use plsql table to select statement to create a report. In otherwords, How to run report using flat file (xx.txt) information like 10 records in flat files and use this 10 records to the report and run pdf files.
    thanks in advance
    suresh

    hi,
    u can use the utl_file package to do that using a ref cursor query in the data model and u can have this code to read data from a flat file
    declare
    ur_file utl_file.file_type;
    my_result varchar2(250);
    begin
    ur_file := UTL_FILE.FOPEN ('&directory', '&filename', 'r') ;
    utl_file.get_line(ur_file, my_result);
    dbms_output.put_line(my_result);
    utl_file.fclose(ur_file);
    end;
    make sure u have an entry in ur init.ora saying that your
    utl_file_dir = '\your directory where ur files reside'
    cheers!
    [email protected]

  • Check Index used in an oracle select query

    Hi Friends,
    I have partitioned an oracle table and created Local Index for the Partitioned table .
    Now i want to make sure that the Local index is being used when i perform select query on the Table partition.
    How do i confirm that ?
    can i check the explain plan generted for the select query to confirm local index is being used ?
    Please let me know.
    Regards,
    DB

    Now i want to make sure that the Local index is being used when i perform select query on the Table partition.Why? Have you proven that using this local index is the "best" plan?
    How do i confirm that ?
    can i check the explain plan generted for the select query to confirm local index is being used ?When I asked Google "how to read an oracle explain plan," I found lots of information - what did you find?

  • Using varchar record in SELECT query

    Hi, from a VARCHAR field I get the string ",1,2,3,4,5,6,".
    I wish to use it in a SELECT query like:
    SELECT * FROM TABLE WHERE ID IN (1,2,3,4,5,6)
    Is there a way to obtain this in a tsql query ?
    Thank you
    Stefano

    CREATE TABLE t1
     col1 INT NOT NULL PRIMARY KEY,
     col2 VARCHAR(50) NOT NULL
    INSERT INTO t1 VALUES (1,'10,11,12')
    INSERT INTO t1 VALUES (2,'13')
    INSERT INTO t1 VALUES (3,'14,15')
    CREATE TABLE t2
     col1 INT NOT NULL PRIMARY KEY,
     col2 VARCHAR(50) NOT NULL
    INSERT INTO t2 VALUES (10,'A')
    INSERT INTO t2 VALUES (11,'B')
    INSERT INTO t2 VALUES (12,'C')
    INSERT INTO t2 VALUES (13,'D')
    INSERT INTO t2 VALUES (14,'E')
    INSERT INTO t2 VALUES (15,'F')
    SELECT DISTINCT O.col1, O.col2
    FROM t1 T
       INNER JOIN t2 O
          ON (PATINDEX('%,' + CAST(O.col1 AS varchar(10)) + ',%',
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How can i use SUM aggregate in select query?

    HI,
    GURUS,
    How can i use SUM function in Select Query and i want to store that value into itab.
    for ex:
    TABLES: vbap.
    types: begin of ty_vbap,
           incluse type vbap,
           sum type string,
          end of ty_vbap.
    data: i_vbap type TABLE OF ty_vbap,
          w_vbap type ty_vbap.
    SELECT sum(posnr) FROM vbap into table i_vbap up to 5 rows.
                            (or)
    SELECT sum(posnr) FROM vbap into table i_vbap group by vbeln.
      loop at i_vbap into w_vbap
    " which variable have to use to display summed value.
      endloop.
    if above code is not understandable pleas give ome sample code on  above query.
    Thank u,
    shabeer ahmed.

    Hi,
    Check this sample code.
    TABLES SBOOK.
    DATA:  COUNT TYPE I, SUM TYPE P DECIMALS 2, AVG TYPE F.
    DATA:  CONNID LIKE SBOOK-CONNID.
    SELECT CONNID COUNT( * ) SUM( LUGGWEIGHT ) AVG( LUGGWEIGHT )
           INTO (CONNID, COUNT, SUM, AVG)
           FROM SBOOK
           WHERE
             CARRID   = 'LH '      AND
             FLDATE   = '19950228'
           GROUP BY CONNID.
      WRITE: / CONNID, COUNT, SUM, AVG.
    ENDSELECT.
    Regards,
    Sravanthi

  • Using Internal table in select queries

    Hi All,
    In the below mentioned code, i am reading an internal table and using the GUID i am fetching values from the database table and populating another internal table.
    SELECT  BUT000~PARTNER AS RESP_GROUP
          FROM BUT000 INTO CORRESPONDING FIELDS OF TABLE itab_Partner
          FOR ALL ENTRIES IN itab_PartnerGUID
          WHERE BUT000~PARTNER_GUID = itab_PartnerGUID-GUID.
    This code statement doesn't give any syntax error. But if i have to return values say from the itab as well as database table... then should it be something like...
    SELECT  itab_PartnerGUID-GUID as GUID
                   BUT000~PARTNER AS RESP_GROUP
          FROM BUT000 INTO CORRESPONDING FIELDS OF TABLE itab_Partner
          FOR ALL ENTRIES IN itab_PartnerGUID
          WHERE BUT000~PARTNER_GUID = itab_PartnerGUID-GUID.
    This statement throws an error saying "Unknown column name itab_PartnerGUID-GUID; not determined until runtime' .... what is the issue? can't i use the internal table that way? what is the right syntax to get the results.... please help....
    Ramya G

    Wow.. Chandrashekar.... that was an amazing catch in the code... you are rite.. when i am equating itab_PartnerGUID-GUID to BUT000PARTNER_GUID, i can as well use the BUT000PARTNER_GUID.... makes complete sense.....
    but there's a problem, its a mistake in the query.... the query shd actuall be this:
    SELECT <b>itab_PartnerGUID-GUID as GUID</b> 
         BUT000~PARTNER AS RESP_GROUP
    FROM BUT000 INTO CORRESPONDING FIELDS OF TABLE itab_Partner
    FOR ALL ENTRIES IN itab_PartnerGUID
    WHERE BUT000~PARTNER_GUID = <b>itab_PartnerGUID-PARTNER_GUID.</b>
    the internal table itab_PartnerGUID has 2 fields GUID and PARTNERGUID... in the where condition of the query i need to use PARTNERGUID, but in select i need to return GUID... how shd i do it? please help...

  • Use of Indexes in select query

    Hello,
    This is on a 9i install.
    There is an index called form_id_idx on the form_id column.
    Why does this query use the index (autotrace indicates range scan on the index):
    select count(*) from table_name where form_id=123456;
    but this query does NOT use the index (autotrace indicates full table scan):
    select accepted from table_name where form_id=123456;
    This second query runs much faster when I use a hint on the index. Any help/suggestions?
    Thanks.

    The first query does NOT have to go to the Table it all. It can read the index to count the number of rows for "form_id=123456". An Index Range Scan would be fast.
    The second query has to go to the table to get the values for the "accepted" column for all the rows that have "form_id=123456". Remember that every get can require a read of 2 or more blocks -- at least one, probably 2 or 3, from the index and 1 from the table. If the number of rows is likely to be large then the number of block get operations would be high. In such cases, Oracle computes that it is faster to do a small set of multiblock reads to read the whole table (Table FullScan).
    Therefore, the optimzer weighs :
    a. how many rows it thinks will satisfy "form_id=123456"
    b. how many index + table block gets it would have to execute (all as single block read calls to the OS)
    versus
    x. how many multiblock read calls it thinks it has to execute to read the whole table
    If the available statistics on number of rows, cardinality or density and the size of the table indicate that operation "x" would be cheaper then operations "a" + "b", Oracle would prefer the latter.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Cost of using subquery vs using same table twice in query

    Hi all,
    In a current project, I was asked by my supervisor what is the cost difference between the following two methods. First method is using a subquery to get the name field from table2. A subquery is needed because it requires the field sa_id from table1. The second method is using table2 again under a different alias to obtain table2.name. The two table2 are not self-joined. The outcome of these two queries are the same.
    Using subquery:
    select a.sa_id R1, b.other_field R2,
    (select b.name from b
    where b.b_id = a.sa_id) R3
    from table1 a, table2 b
    where ...Using same table twice (table2 under 2 different aliases)
    select a.sa_id R1, b.other_field R2, c.name R3
    from table1 a, table2 b, table2 c
    where
    c.b_id = a.sa_id,
    and ....Can anyone tell me which version is better and why? (or under what circumstances, which version is better). And what are the costs involved? Many thanks.

    pl/sql novice wrote:
    Hi all,
    In a current project, I was asked by my supervisor what is the cost difference between the following two methods. First method is using a subquery to get the name field from table2. A subquery is needed because it requires the field sa_id from table1. The second method is using table2 again under a different alias to obtain table2.name. The two table2 are not self-joined. The outcome of these two queries are the same.
    Using subquery:
    Using same table twice (table2 under 2 different aliases)
    Can anyone tell me which version is better and why? (or under what circumstances, which version is better). And what are the costs involved? Many thanks.In theory, if you use the scalar "subquery" approach, the correlated subquery needs to be executed for each row of your result set. Depending on how efficient the subquery is performed this could require significant resources, since you have that recursive SQL that needs to be executed for each row.
    The "join" approach needs to read the table only twice, may be it can even use an indexed access path. So in theory the join approach should perform better in most cases.
    Now the Oracle runtime engine (since Version 8) introduces a feature called "filter optimization" that also applies to correlated scalar subqueries. Basically it works like an in-memory hash table that caches the (hashed) input values to the (deterministic) correlated subquery and the corresponding output values. The number of entries of the hash table is fixed until 9i (256 entries) whereas in 10g it is controlled by a internal parameter that determines the size of the table (and therefore can hold different number of entries depending on the size of each element).
    If the input value of the next row corresponds to the input value of the previous row then this optimization returns immediately the corresponding output value without any further action. If the input value can be found in the hash table, the corresponding output value is returned, otherwise execute the query and keep the result combination and eventually attempt to store this new combination in the hash table, but if a hash collision occurs the combination will be discarded.
    So the effectiveness of this clever optimization largely depends on three different factors: The order of the input values (because as long as the input value doesn't change the corresponding output value will be returned immediately without any further action required), the number of distinct input values and finally the rate of hash collisions that might occur when attempting to store a combination in the in-memory hash table.
    In summary unfortunately you can't really tell how good this optimization is going to work at runtime and therefore can't be properly reflected in the execution plan.
    You need to test both approaches individually because in the optimal case the optimization of the scalar subquery will be superior to the join approach, but it could also well be the other around, depending on the factors mentioned.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • ALV list -Runtime error using the Spreadsheet button(CTRL+SHIFT+F7)

    Hi,
    We are on ECC6.0.When ever I try to use the button 'Spreadsheet' (CTRLSHIFTF7) it gives me the following runtime error.It works fine if I use the export button.Also it works for ALV grid.Issue is only with ALV list.
    Can you pelase advise waht could be the issue.
    Thanks
    Venkat
    Runtime Errors         GETWA_NOT_ASSIGNED
    Date and Time          08.06.2009 16:02:22
    Short text
    Field symbol has not yet been assigned.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "CL_SALV_BS_TT_RESULT_TABLE====CP" had to be
    terminated because it has
    come across a statement that unfortunately cannot be executed.
    Error analysis
    You attempted to access an unassigned field symbol
    (data segment 32781).
    This error may occur if
    - You address a typed field symbol before it has been set with
    ASSIGN
    - You address a field symbol that pointed to the line of an
    internal table that was deleted
    - You address a field symbol that was previously reset using
    UNASSIGN or that pointed to a local field that no
    longer exists
    - You address a global function interface, although the
    respective function module is not active - that is, is
    not in the list of active calls. The list of active calls
    can be taken from this short dump.
    Trigger Location of Runtime Error
    Program                                 CL_SALV_BS_TT_RESULT_TABLE====CP
    Include                                 CL_SALV_BS_TT_RESULT_TABLE====CM00L
    Row                                     165
    Module type                             (METHOD)
    Module Name                             GET_CELL_VALUE
    Source Code Extract
    Line
    SourceCde
    135
    call method cl_alv_xslt_transform=>get_days_since_1900
    136
    exporting
    137
    i_date = l_date
    138
    receiving
    139
    e_num  = attribute01.
    140
    141
    elseif ls_attribute-s_dfies-inttype eq cl_abap_typedescr=>typekind_time. "Time
    142
    data:
    143
    l_time type t.
    144
    145
    l_time = <l_data>.
    146
    147
    call method cl_alv_xslt_transform=>get_isotime_from_inttime
    148
    exporting
    149
    i_value = l_time
    150
    receiving
    151
    e_value = value.
    152
    153
    *... fill attribute01 with percent value of actual day
    154
    call method cl_alv_xslt_transform=>get_percent_of_act_day
    155
    exporting
    156
    i_time = l_time
    157
    receiving
    158
    e_num  = attribute01.
    159
    160
    elseif ls_attribute-s_dfies-inttype ca if_salv_bs_log_exp_operand=>c_numeric and
    161
    ls_attribute-s_dfies-convexit is initial.
    162
    case ls_attribute-s_dfies-reference_field_type.
    163
    when if_salv_bs_c_data=>reffieldtype_curr.
    164
    *... get iso value for currency value
    >>>>>
    call method cl_alv_xslt_transform=>get_isonum_from_intnum
    166
    exporting
    167
    i_value    = <l_data>
    168
    i_currency = <l_reference>
    169
    i_decimals = ls_attribute-s_dfies-decimals
    170
    importing
    171
    e_value    = l_isovalue.
    172
    173
    when if_salv_bs_c_data=>reffieldtype_quan.
    174
    *... get iso value for quantity value
    175
    call method cl_alv_xslt_transform=>get_isonum_from_intnum
    176
    exporting
    177
    i_value    = <l_data>
    178
    i_unit     = <l_reference>
    179
    i_decimals = ls_attribute-s_dfies-decimals
    180
    importing
    181
    e_value    = l_isovalue.
    182
    183
    when others.
    184
    *... get iso value for value

    Hi Pinaki,
    Thanks for your reply.
    below is my code.
    data: t_fieldcat type slis_t_fieldcat_alv,
            w_fieldcat like line of t_fieldcat,
            w_layout   type slis_layout_alv,
            t_sort     type slis_t_sortinfo_alv,
            w_sort     like line of t_sort,
            t_events   type slis_t_event,
            w_events   like line of t_events.
      call function 'REUSE_ALV_FIELDCATALOG_MERGE'
           exporting
                i_structure_name   = 'ZSD_ORDERS'
                i_bypassing_buffer = 'X'
           changing
                ct_fieldcat        = t_fieldcat.
      data: l_lines_fieldcat type i.
      describe table t_fieldcat lines l_lines_fieldcat.
      clear: w_fieldcat.:
      w_fieldcat-col_pos = l_lines_fieldcat + 1.
      w_fieldcat-datatype = 'QUAN'.
      w_fieldcat-just = ' '.
      w_fieldcat-do_sum = ' '.
      w_fieldcat-fieldname = 'ZZSCLQTY'.
      w_fieldcat-tabname = 'T_DATA'.
      w_fieldcat-qfieldname = 'VRKME'.
      w_fieldcat-seltext_s = text-a01.
      w_fieldcat-seltext_m = text-a01.
      w_fieldcat-seltext_l = text-a01.
      append w_fieldcat to t_fieldcat.
    Modify column headings
      loop at t_fieldcat into w_fieldcat.
        case w_fieldcat-fieldname.
          when 'MATNR'.
            w_fieldcat-no_zero = 'X'.
          when 'ZZPRICECHECK'.
            w_fieldcat-reptext_ddic = text-l01.
          when 'KZWI5'.
            w_fieldcat-reptext_ddic = text-l02.
          when 'VBELN'.
            w_fieldcat-hotspot = 'X'.
          when 'BMENG'.
            w_fieldcat-do_sum = 'X'.
          when 'COUNTER'.
            w_fieldcat-do_sum = 'X'.
            w_fieldcat-reptext_ddic = text-l03.
          when 'OBJDE'.
            w_fieldcat-reptext_ddic = 'Obj ID'.
              endcase.
        modify t_fieldcat from w_fieldcat.
      endloop.
    Format output options
      clear w_layout.
      w_layout-colwidth_optimize    = 'X'.
      w_layout-zebra                = 'X'.
      w_layout-get_selinfos         = 'X'.
      w_layout-detail_initial_lines = 'X'.
      w_layout-group_change_edit    = 'X'.
    Specify list processing events
      w_events-name = 'TOP_OF_PAGE'.
      w_events-form = 'TOP_OF_PAGE'.
      append w_events to t_events.
    Fit Add List Variant from Selection Screen               "003
      clear: w_variant.
      w_variant-report  = sy-repid.
      w_variant-variant = sp_vari.
    end Fit02
      call function 'REUSE_ALV_LIST_DISPLAY'
           exporting
                i_callback_program      = w_repid
                is_layout               = w_layout
                it_sort                 = t_sort
                i_callback_user_command = 'USER_COMMAND'
                is_variant              = w_variant
                i_save                  = 'A'
                it_fieldcat             = t_fieldcat[]
                it_events               = t_events[]
           tables
                t_outtab                = t_data.
    endform.

  • Runtime Error using JDBC Driver in NetBeans IDE 6.9.1

    Hello,
    I receive a compiler error which reads as follows;
    java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
    java.sql.SQLSyntaxErrorException: Schema 'DEMO' does not exist
    Heres the main body of code i am trying to execute.
    public class Main {
    @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    try{
    Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
    }catch(ClassNotFoundException e){
    System.out.println(e);
    try{
    Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/SimpleDBDemo", "demo", "demo");
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT * FROM DEMO.Table1");
    while (rs.next()) {
    String s = rs.getString("Name");
    float n = rs.getFloat("Age");
    System.out.println(s " " n);
    }catch(SQLException e){
    System.err.println(e);
    I am using NetBeans IDE and have created a database under: Services->Databases-> Java DB->SimpleDBDemo.
    I have a database connection in which theres a simple table (called "TABLE1") created which contains the names and ages of two people. I am trying to access the data of these two people.
    From what i can figure out i am getting a runtime error. I have downloaded a folder called "Microsoft SQL Driver 2005 JDBC Driver" which contains the "sqljdbc.jar" executable file. I copied the jar file to the library in "Program files->Sun->javadb" and then added the file to the project libraries section i.e. "Project->properties->add JAR/Folder->sqljdbc.jar" in netbeans.
    I am still getting the same runtime error. Have i the sqljdbc.jar file added in the wrong place?
    Any help would be greatly appreciated.

    Microsoft SQL Driver 2005 JDBC Driver is not the Derby driver.
    You need the correct JDBC driver for the database you are using, you can't simply grab the first one you find.

  • Error ORA-01652 while running select query

    A select query returning millions of records is returning the following error.
    SQL Error [
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
    We requested DBA to increased the TEMP tablespace. He increased it to 20GB and also, changed to Autoextent.
    When we executed the query again, we got the same error ?
    What could be the reason of this issue and how it can be resolved ?

    All sort operations that don't fit into the SORT_AREA_SIZE will go to the temp tablespace (they can be seen as direct writes in the trace file).
    It can easy be the case, that your temp tablespace needs to be many GB in size [we have a table with millions of rows and for the loading/merging our temp is 80GB in size].
    May be you can change your process of loading i.e. with this select you fill a intermediate table (with CTAS) and do your processing there or even try to do the processing in SQL while building the table. You could also try to do the processing with a cursor and BULK COLLECT LIMIT 100 and then inserting into the target table with the FORALL statement.

  • Sample XML format that can be used to write a SELECT query

    Hello,
    I want to use and XML file in the scenario FILE to JDBC where i use the operation as SELECT in which i want to embbed an sql statemnet which is equivalent to
    SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO>1
    as in the form of XML format like,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
    <STATEMENT>
    <TABLENAME ACTION="SELECT">
    <TABLE>EMPTEST</TABLE>
    <ACCESS>
    <EMPNO></EMPNO>
    <NAME></NAME>
    </ACCESS>
    <KEY>
    <EMPNO compareOperation="GT">1</EMPNO>
    </KEY>
    </TABLENAME>
    </STATEMENT>
    </ns0:MT_JDBC_SELECT_JDBC_REQ>
    Can i do like this?
    PLease help me out in using various conditions in the XML file formats like the above.
    Thanks,
    Soorya.

    Hello raj,
    I would like to write the query in that format where i mentioned as,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
    <STATEMENT>
    <TABLENAME ACTION="SELECT">
    <TABLE>EMPTEST</TABLE>
    <ACCESS>
    <EMPNO></EMPNO>
    <NAME></NAME>
    </ACCESS>
    <KEY>
    <EMPNO compareOperation="GT">1</EMPNO>
    </KEY>
    </TABLENAME>
    </STATEMENT>
    </ns0:MT_JDBC_SELECT_JDBC_REQ>
    without giving clear SQL statement as you mentioned here like,
    <ns0:MT_JDBC_SELECT_JDBC_REQ xmlns:ns0="http://JDBC_SELECT">
    <STATEMENT>
    <TABLENAME ACTION="SQL_QUERY">
    <ACCESS>SELECT EMPNO, NAME FROM EMPLOYEE WHERE EMPNO > '$EMPNO$’</ACCESS>
    <KEY>
    <EMPNO>1</EMPNO>
    </KEY>
    </TABLENAME>
    </STATEMENT>
    </ns0:MT_JDBC_SELECT_JDBC_REQ>
    Thanks,
    Soorya

  • Runtime Error during Phase Start Data Selection

    Hello Forums,
    We are using TDMS (2006_1_700) to extract a year's worth data from one client into a new client on the same ERP EhP4 system.
    All the systems - central, sender and receiver are at the same DMIS levels(SP16) and all necessary notes have been applied.
    During the Step 'Start Data Selection' of the Data Transfer Phase, we see around 60 of the ~12000 sub tasks abort with the below error:
    Batch job for access plan calculation in sender system ended with errors
    Message no. DMC_UTIL_MSG021
    Diagnosis
    The access plan calculation was executed as a background job in the sender system. In this background job, an error occurred.
    Procedure
    Check if a short dump occurred in the sender system while the access plan was calculated. If existing, this short dump contains further information about the cause of the problem.
    A frequent error is that selection criteria for data reduction (for example selection groups) are wrongly defined which causes the database access that consideres these selection criteria to fail.
    The corresponding dump in the Sender system is as below:
    Runtime Errors         SAPSQL_WHERE_PARENTHESES
    Exception              CX_SY_DYNAMIC_OSQL_SYNTAX
    Error analysis                                                                                |
    |    An exception occurred that is explained in detail below.                                      |
    |    The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SYNTAX', was not                |
    |     caught in                                                                                |
    |    procedure "/1CADMC/DMCACS00P000000001" "(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 dynamic condition. The part of the condition specified                       |
    |    at runtime is incorrectly parenthesized.   
    Please suggest in case any of you have encountered similar error and possible resolution.
    Thanks in advance,
    Srikishan

    Hi Suman,
    Thanks a ton. I somehow missed this when searching on the SMP.
    I will implement the steps and post it back by tomorrow.
    Regards,
    Srikishan

  • Using buffering option in select query

    Hi All,
           Can anybody give me a brief idea on , where we will use the buffering and how we will write it in coding part.Similarly please tell me what will happen if we use  by passing buffering  addition in select query. Please explain  it with steps of sample code if possible.
    Thanks in advance.
    Regards,
    Rakesh.

    Hi Sharma,
    Buffer is used to hold large amount of data.
    if internla table is unable to hold data.. Buffer is used..this is mainly used in copy data from PRD to Quality as a part testung.
    see the sample code how the buffer is used..
    FUNCTION zzrfc_get_zcpeg_fg_related.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(PL_VERSION) LIKE  ZCPEG_FG_RELATED-PL_VERSION OPTIONAL
    *"     VALUE(BYPASS_BUFFER) LIKE  SY-FTYPE DEFAULT SPACE
    *"     VALUE(FROM_KEY) LIKE  SY-ENTRY DEFAULT SPACE
    *"     VALUE(GEN_KEY) LIKE  SY-ENTRY DEFAULT SPACE
    *"     VALUE(MAX_ENTRIES) LIKE  SY-TABIX DEFAULT 0
    *"     VALUE(TABLE_NAME) LIKE  X030L-TABNAME
    *"     VALUE(TO_KEY) LIKE  SY-ENTRY DEFAULT SPACE
    *"  EXPORTING
    *"     VALUE(NUMBER_OF_ENTRIES) LIKE  SY-INDEX
    *"  TABLES
    *"      ENTRIES STRUCTURE  ZCPEG_FG_RELATED
    *"  EXCEPTIONS
    *"      INTERNAL_ERROR
    *"      TABLE_EMPTY
    *"      TABLE_NOT_FOUND
      TABLES dd02l.
      DATA: BEGIN OF buf OCCURS 100,
                line(4100),
            END OF buf.
      DATA keyln TYPE i.
      DATA: l_tabname LIKE dd25v-viewname.
      DATA: l_len     TYPE i.
      DATA : w_plversion TYPE /sapapo/vrsioex.   "PJONNALA
      w_plversion =  pl_version.                 "PJONNALA
      l_tabname = table_name.
      CALL FUNCTION 'VIEW_AUTHORITY_CHECK'
        EXPORTING
          view_action                = 'S'
          view_name                  = l_tabname
          no_warning_for_clientindep = 'X'
        EXCEPTIONS
          OTHERS                     = 6.
      IF sy-subrc <> 0.
        RAISE internal_error.
      ENDIF.
      IF bypass_buffer NE ' ' AND bypass_buffer NE 'N'.
        bypass_buffer = 'Y'.
      ENDIF.
      IF gen_key CA ' '. ENDIF.
      keyln = sy-fdpos.
    * read client dependant tables always with client
      SELECT SINGLE * FROM dd02l WHERE tabname = table_name
                                  AND as4local =  'A'.
      IF dd02l-clidep = 'X'.
    *l_len = strlen( sy-mandt ) * cl_abap_char_utilities=>charsize.
    *  " ecwg. unicode
    *    move gen_key to gen_key+l_len.
    *    move sy-mandt to gen_key(l_len).
    *    add l_len to keyln.
        CONCATENATE sy-mandt gen_key INTO gen_key.
        keyln = STRLEN( gen_key ) * cl_abap_char_utilities=>charsize.
      ENDIF.
    *  endselect.
      IF keyln NE 0 OR from_key = space.
        CALL 'C_GET_TABLE' ID 'TABLNAME'  FIELD table_name
                           ID 'INTTAB'    FIELD buf-*sys*
                           ID 'GENKEY'    FIELD gen_key
                           ID 'GENKEY_LN' FIELD keyln
                           ID 'DBCNT'     FIELD number_of_entries
                           ID 'BYPASS'    FIELD bypass_buffer.
      ELSE.
        CALL 'C_GET_TABLE' ID 'TABLNAME'  FIELD table_name
                           ID 'INTTAB'    FIELD buf-*sys*
                           ID 'FROM_KEY'  FIELD from_key
                           ID 'TO_KEY'    FIELD to_key
                           ID 'DBCNT'     FIELD number_of_entries
                           ID 'BYPASS'    FIELD bypass_buffer.
      ENDIF.
      CASE sy-subrc.
        WHEN 4.  RAISE table_empty.
        WHEN 8.  RAISE table_not_found.
        WHEN 12. RAISE internal_error.
      ENDCASE.
      DESCRIBE TABLE buf LINES number_of_entries.
    ENDFUNCTION.
    Regards,
    Prabhudas

  • "Create Table from select Query" Vs "Insert into"

    Hi
    Schenaio:
    My Select Query returns more than 10 million records, these records needs to be inserted into another table.
    Approach 1:
    I created table called TABLE1, and inserted the records using INSERT statement as a batch (batch size is 5000).
    Approach 2:
    I create table like,
    CREATE TABLE TABLE1 AS <SELECT QUERY>
    Here Apporach-1 took almost 40 minutes to complete the insert but Approach-2 took only 6 minutes.
    If anybody knows why it is? And is there any way to improve the performance of Approach-1?.
    Thanks
    Nidhi

    Most "batch" methods execute the same query multiple times. Row filtering is done after the rows are fetched from the source. The process of fetching all the rows could be a FullTableScan.
    Therefore, a FullTableScan is executed for each batch of 5000 rows.
    However, your query and batch definitions may well be different. We haven't seen the query and the execution plan.
    Another point : How are you "filtering" the rows (i.e the second execution inserts rows 5001 to 10000 and does not attempt to reinsert rows 1 to 5000) ?
    What is the overhead imposed by the filter ? (does the third execution have to exclude rows 1 to 10000 and inserts rows 10001 to 15000 and so on)
    Hemant K Chitale

Maybe you are looking for

  • IMSS Min Normalized Measure not appearing in imsmanifest.xml file

    Hello, The IMSS Min Normalized Measure line is not appearing in my imsmanifest.xml file. It used to, but since I upgraded to Captivate 5.5, I don't see it anymore. I have thoroughly checked my settings: Reporting is enabled SCORM 2004/Manifest/Defaul

  • Problems with getting FM radio to work

    I have just purchased a Nokia 5800 Xpress music and cannot get the FM radio to work. The headphones that came with the phone are HS 47 and work well with the music player but won't allow the FM radio to pick up a signal. Are they the correct ones for

  • Internal Microphone not working ... never

    Hi I'm using a Macbook Pro Late 13'' 2011 and trying to use the internal microphone which does not work in any case unfortunately. It's not a problem with Skype or other software. It seems that it never works. I've tried to adjust settings in the aud

  • Variant Tables

    Hi All, Can anyone please explain what are variant tables and why is it used in Variant Configuration? What is the minimum uniqueness set and the naming standard in SAP for variant tables? I'll appreciate if you can explain rather than sending a help

  • Popup fields rendered behind video player applet

    Hi, We are embedding a video player using Windows media player. The code is like: <object id="MediaPlayer4" width="302" height="165" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="appli