Query Excetion not working for Charactristic restriction

Hi ,
I am trying to create one Exception in Query Designer.
The requirement is : Report should highlight the data cells where Material Group is "AAAA".
Now I created one exception and rectricted to Material Group " AAAA".
Now the issue is : It is working in Analyser But not in portal.
It is working in ABAP web( RSRT Transaction)  but not in JAVA web.
I created a new exception  only rectriction related to data cells( for example: Gross profit > 100) ..It is working ...
I dont know why my system is not working for exceptions  restricted to Characteristic.
There may be some setting , I am missing which is leading to this issue. As the exception is working in Analyser, I donot think there is any issue with Exception definition...
So please guide me ..... if you have already faced this type of issue and resolved the same...
Thanks

Hi ,
I am trying to create one Exception in Query Designer.
The requirement is : Report should highlight the data cells where Material Group is "AAAA".
Now I created one exception and rectricted to Material Group " AAAA".
Now the issue is : It is working in Analyser But not in portal.
It is working in ABAP web( RSRT Transaction)  but not in JAVA web.
I created a new exception  only rectriction related to data cells( for example: Gross profit > 100) ..It is working ...
I dont know why my system is not working for exceptions  restricted to Characteristic.
There may be some setting , I am missing which is leading to this issue. As the exception is working in Analyser, I donot think there is any issue with Exception definition...
So please guide me ..... if you have already faced this type of issue and resolved the same...
Thanks

Similar Messages

  • Select query in not working for Count(*)

    Hi,
    Our batch team running one query that is selecting one table TSFHEAD and this query is hanging. Below are diffrent shenario in which the select query is running on this table.
    select * from tsfhead where create_id = 'BATCH' and create_date = '26-OCT-12';
    --not returning any rows and hanging
    select * from tsfhead where create_id = 'BATCH' ---returning rows
    select * from tsfhead where create_date = '26-OCT-12'; --- returning rows
    select count(*) from tsfhead ----not returning rows and hanging
    This table TSFHEAD has 59000 rows.
    SQL> explain plan for select * from tsfhead where create_id = 'BATCH' and create_date = '26-OCT-12';
    Explained.
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 415503093
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 67 | 215 (1)| 00:00:03 |
    |* 1 | TABLE ACCESS FULL| TSFHEAD | 1 | 67 | 215 (1)| 00:00:03 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    1 - filter("CREATE_ID"='BATCH' AND "CREATE_DATE"='26-OCT-12')
    I don't know why this query behaving in this manner.Please help.

    RanVijai_dba wrote:
    Thanks for your reply. But +"select count(*) from tsfhead"+ is hanging and +"select * from tsfhead where create_date = '26-OCT-12' "+ is showing records.It might be showing records, but not necessarily the correct records.
    As sb points out, you are treating dates as strings rather than the DATE datatype. That means you could be querying the wrong data, and your query is also not safe in different environments. It could also effect the query execution plan. Also, as pointed out, you should be ideally using 4 digit years. There were many headaches caused by the use of 2 digit years that most companies corrected as part of the millenium bug fixes prior to the year 2000... well over a decade ago, and most good designs now ensure that 4 digit years are used as standard.
    So your query would be better written as:
    select * from tsfhead where create_date = TO_DATE('26-OCT-2012','DD-MON-YYYY')When you say:
    select count(*) from tsfhead... is hanging, you say the table has around 59000 rows in it, and in reality that's a small amount of records, so a count(*) shouldn't take long at all, even doing a full table scan.
    Post the explain plan for that simple count(*) query for us. (and ensure you use {noformat}{noformat} tags to keep the formatting on the forum, as described in {message:id=9360002})                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Af:query on not working for time in adf 11.6

    HI ,
    In af:query we have date field ,which displays on format of hh.:mm .
    When i try to search the field with HH:mm format the table records not filtering any records(Not getting any records )
    table column data type of field is Date (Table display field format is HH:mm)
    Appreciate if any pointers
    Thanks

    Hi,
    searches are on the date and not the display. So if you display the hour and only search on the hour, I am not sure this will find the data (suggest you try the ADF BC tester to verify if this at all works). You may then use JBO debug to see the query that is issued.
    Second, there is a difference between "HH" and "hh" as you can see here: SimpleDateFormat (Java 2 Platform SE v1.4.2)
    The meaning of the two are different
    Frank

  • Auto_lexer (stemming) not working for other languages(other than english)

    Hi All,
    We are planning to use AUTO_LEXER instead of MULTI_LEXER and observed that stemming is not working for German where as it is working for English when I use AUTO_LEXER. I even used query templates but of no use.
    But when i use MULTI_LEXER, creating sub lexers for German and Enlgish, Stemming is working for German also after changing the session language and setting stemmer of wod list to German (Which is expected).
    Following is the code for AUTO_LEXER creation:
    CREATE TABLE test_auto_lexer(pkey NUMBER(5,0),
    lang_index VARCHAR2(3),
    content_text CLOB,
    CONSTRAINT test_auto_lexer_pk primary key (pkey))
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (1,'eng','I drive a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (2,'eng','I drove a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (3,'eng','I have driven a bike')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (4,'eng','Just check for other things')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (5,'eng','always drive a car')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (6,'eng','it is nothing')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (7,'ger','Ich fahre ein Fahrrad')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (8,'ger','Ich fuhr ein Fahrrad')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (9,'ger','Ich habe ein Fahrrad gefahren')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (10,'ger','Aktivieren Sie einfach für andere Dinge')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (11,'ger','immer Auto fahren')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (12,'ger','es ist nichts')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (13,'ger','sprechen')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (14,'ger','sprach')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (15,'ger','gesprochen')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (16,'ger','tale')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (17,'ger','Indlæg')
    INSERT INTO test_auto_lexer(pkey,lang_index,content_text)
    VALUES (18,'ger','tales')
    BEGIN
    ctx_ddl.create_preference('auto_lexer1', 'auto_lexer');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','index_stems','yes');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','language','danish english german');
    END;
    BEGIN
    ctx_ddl.set_attribute('auto_lexer1','alternate_spelling','german');
    END;
    CREATE INDEX test_auto_lexer_ix1
    ON test_auto_lexer(content_text)
    INDEXTYPE IS ctxsys.context
    PARAMETERS ('datastore ctxsys.direct_datastore filter ctxsys.null_filter lexer auto_lexer1')
    select to_char(content_Text) from test_auto_lexer where contains(content_text,
    '<query>
    <textquery lang="ger" grammar="context">
    $fahren
    </textquery>
    <score datatype="integer"/>
    </query>') > 0
    this doesnt work even after changing the session language. My default Sesson language is AMERICAN.
    Could any one help me with this, in case I am missing something here. I would be really thankful.
    Edited by: Nagendra Prasad on Jan 23, 2010 12:05 AM

    In the future, please begin a new thread for a new question and provide a link to a related question.
    According to the online documentation, Oracle only supports stemming for English, Dutch, French, German, Italian, Spanish, and Japanese. Oracle does not support Russian stemming, although you may have gotten some accidental results, due to identifying it as a different language and applying stemming rules for that language. The following manual sections show the languages available for the index_stems attribute of the basic_lexer and stemmer attribute of the basic_wordlist:
    Basic_lexer attributes:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#CIHHBAAD
    Basic_wordlist attributes:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#g1019326
    Also, please see the following note:
    Features not available in 11.2.0.3:
    http://docs.oracle.com/cd/E11882_01/readmes.112/e22488/toc.htm#BABDGGDB
    "Certain Oracle Text functionality based on third-party technologies, including AUTO_LEXER and CTX_ENTITY, have been disabled in this release (reference Bug 12618046). For BASIC_LEXER, the usage of the INDEX_STEMS attribute values that depend on third-party technologies, is also affected. If this impacts an existing application, contact Oracle Support Services for guidance."
    Also, the auto_lexer has been replaced by the world_lexer, which only has one attribute:
    http://docs.oracle.com/cd/E11882_01/text.112/e24436/cdatadic.htm#BHCJEGFJ
    I don't work for Oracle, so I don't know why they do things the way they do.
    So, you need to stick with the basic_wordlist for stemming, not the lexers. However, you may get better performance by combining the multi_lexer with the basic_wordlist, as the multi_lexer eliminates time spent on automatic language detection. But, you need to remember not to use the index_stems with your lexer, since it will conflict with the wordlist. I am not experiencing any time problems as you have. Please see the demo below. I have provided the whole script below that, so that you can reproduce it on your system. If you still have problems, then it may be due to differences in versions.
    -- demo:
    SCOTT@orcl_11gR2> select * from v$version
      2  /
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    SCOTT@orcl_11gR2> select value from v$nls_parameters
      2  where  parameter = 'NLS_CHARACTERSET'
      3  /
    VALUE
    AL32UTF8
    1 row selected.
    SCOTT@orcl_11gR2> DROP TABLE news
      2  /
    Table dropped.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('my_wordlist')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('global_lexer')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('english_LEXER')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> EXEC CTX_DDL.DROP_PREFERENCE ('german_LEXER')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> CREATE TABLE news
      2    (pkey            NUMBER,
      3       lang            VARCHAR2 (2),
      4       short_content  CLOB)
      5  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO news (pkey, lang, short_content)
      3    VALUES  (1, 'en', 'I drive a bike.')
      4  INTO news (pkey, lang, short_content)
      5    VALUES  (2, 'en', 'I drove a bike.')
      6  INTO news (pkey, lang, short_content)
      7    VALUES  (3, 'en', 'I have driven a bike.')
      8  INTO news (pkey, lang, short_content)
      9    VALUES  (4, 'en', 'I always drive a car')
    10  INTO news (pkey, lang, short_content)
    11    VALUES  (5, 'en', 'This is nothing')
    12  INTO news (pkey, lang, short_content)
    13    VALUES  (6, 'de', 'Ich fahre ein Fahrrad.')
    14  INTO news (pkey, lang, short_content)
    15    VALUES  (7, 'de', 'Ich fuhr ein Fahrrad.')
    16  INTO news (pkey, lang, short_content)
    17    VALUES  (8, 'de', 'Ich habe ein Fahrrad gefahren.')
    18  INTO news (pkey, lang, short_content)
    19    VALUES  (9, 'de', 'Ich habe immer ein Auto fahren.')
    20  INTO news (pkey, lang, short_content)
    21    VALUES  (10, 'de', 'Es ist nichts.')
    22  SELECT * FROM DUAL
    23  /
    10 rows created.
    SCOTT@orcl_11gR2> BEGIN
      2    -- word list:
      3    ctx_ddl.create_preference ('my_wordlist',   'basic_wordlist');
      4    ctx_ddl.set_attribute      ('my_wordlist',   'stemmer',           'auto');
      5    -- english lexer:
      6    ctx_ddl.create_preference ('english_lexer', 'basic_lexer');
      7    -- german lexer:
      8    ctx_ddl.create_preference ('german_lexer',  'basic_lexer');
      9    ctx_ddl.set_attribute      ('german_lexer',  'composite',       'german');
    10    ctx_ddl.set_attribute      ('german_lexer',  'alternate_spelling', 'german');
    11    ctx_ddl.set_attribute      ('german_lexer',  'mixed_case',       'no');
    12    ctx_ddl.set_attribute      ('german_lexer',  'base_letter',       'yes');
    13    -- multi_lexer:
    14    ctx_ddl.create_preference ('global_lexer',  'multi_lexer');
    15    ctx_ddl.add_sub_lexer      ('global_lexer',  'default',            'english_lexer');
    16    ctx_ddl.add_sub_lexer      ('global_lexer',  'german',            'german_lexer');
    17  END;
    18  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> create index search_news
      2  on news (short_content)
      3  indextype is ctxsys.context
      4  parameters
      5    ('lexer            global_lexer
      6        language column  lang
      7        wordlist       my_wordlist')
      8  /
    Index created.
    SCOTT@orcl_11gR2> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'NEWS')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> COLUMN short_content FORMAT A30
    SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'
      2  /
    Session altered.
    SCOTT@orcl_11gR2> set timing on
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$drive') > 0
      3  /
          PKEY LA SHORT_CONTENT
             1 en I drive a bike.
             2 en I drove a bike.
             3 en I have driven a bike.
             4 en I always drive a car
    4 rows selected.
    Elapsed: 00:00:00.05
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$drove') > 0
      3  /
          PKEY LA SHORT_CONTENT
             1 en I drive a bike.
             2 en I drove a bike.
             3 en I have driven a bike.
             4 en I always drive a car
    4 rows selected.
    Elapsed: 00:00:00.05
    SCOTT@orcl_11gR2> ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'
      2  /
    Session altered.
    Elapsed: 00:00:00.01
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$fahr') > 0
      3  /
          PKEY LA SHORT_CONTENT
             6 de Ich fahre ein Fahrrad.
             7 de Ich fuhr ein Fahrrad.
             8 de Ich habe ein Fahrrad gefahren.
             9 de Ich habe immer ein Auto fahren
    4 rows selected.
    Elapsed: 00:00:00.07
    SCOTT@orcl_11gR2> select * from news
      2  where  contains (short_content, '$fuhr') > 0
      3  /
          PKEY LA SHORT_CONTENT
             6 de Ich fahre ein Fahrrad.
             7 de Ich fuhr ein Fahrrad.
             8 de Ich habe ein Fahrrad gefahren.
             9 de Ich habe immer ein Auto fahren
    4 rows selected.
    Elapsed: 00:00:00.16-- script for you to reproduce the demo on your system:
    select * from v$version
    select value from v$nls_parameters
    where  parameter = 'NLS_CHARACTERSET'
    DROP TABLE news
    EXEC CTX_DDL.DROP_PREFERENCE ('my_wordlist')
    EXEC CTX_DDL.DROP_PREFERENCE ('global_lexer')
    EXEC CTX_DDL.DROP_PREFERENCE ('english_LEXER')
    EXEC CTX_DDL.DROP_PREFERENCE ('german_LEXER')
    CREATE TABLE news
      (pkey           NUMBER,
       lang           VARCHAR2 (2),
       short_content  CLOB)
    INSERT ALL
    INTO news (pkey, lang, short_content)
      VALUES  (1, 'en', 'I drive a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (2, 'en', 'I drove a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (3, 'en', 'I have driven a bike.')
    INTO news (pkey, lang, short_content)
      VALUES  (4, 'en', 'I always drive a car')
    INTO news (pkey, lang, short_content)
      VALUES  (5, 'en', 'This is nothing')
    INTO news (pkey, lang, short_content)
      VALUES  (6, 'de', 'Ich fahre ein Fahrrad.')
    INTO news (pkey, lang, short_content)
      VALUES  (7, 'de', 'Ich fuhr ein Fahrrad.')
    INTO news (pkey, lang, short_content)
      VALUES  (8, 'de', 'Ich habe ein Fahrrad gefahren.')
    INTO news (pkey, lang, short_content)
      VALUES  (9, 'de', 'Ich habe immer ein Auto fahren.')
    INTO news (pkey, lang, short_content)
      VALUES  (10, 'de', 'Es ist nichts.')
    SELECT * FROM DUAL
    BEGIN
      -- word list:
      ctx_ddl.create_preference ('my_wordlist',   'basic_wordlist');
      ctx_ddl.set_attribute     ('my_wordlist',   'stemmer',            'auto');
      -- english lexer:
      ctx_ddl.create_preference ('english_lexer', 'basic_lexer');
      -- german lexer:
      ctx_ddl.create_preference ('german_lexer',  'basic_lexer');
      ctx_ddl.set_attribute     ('german_lexer',  'composite',          'german');
      ctx_ddl.set_attribute     ('german_lexer',  'alternate_spelling', 'german');
      ctx_ddl.set_attribute     ('german_lexer',  'mixed_case',          'no');
      ctx_ddl.set_attribute     ('german_lexer',  'base_letter',         'yes');
      -- multi_lexer:
      ctx_ddl.create_preference ('global_lexer',  'multi_lexer');
      ctx_ddl.add_sub_lexer     ('global_lexer',  'default',             'english_lexer');
      ctx_ddl.add_sub_lexer     ('global_lexer',  'german',              'german_lexer');
    END;
    create index search_news
    on news (short_content)
    indextype is ctxsys.context
    parameters
      ('lexer            global_lexer
        language column  lang
        wordlist         my_wordlist')
    EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'NEWS')
    COLUMN short_content FORMAT A30
    ALTER SESSION SET NLS_LANGUAGE = 'AMERICAN'
    set timing on
    select * from news
    where  contains (short_content, '$drive') > 0
    select * from news
    where  contains (short_content, '$drove') > 0
    ALTER SESSION SET NLS_LANGUAGE = 'GERMAN'
    select * from news
    where  contains (short_content, '$fahr') > 0
    select * from news
    where  contains (short_content, '$fuhr') > 0
    /

  • Bex Query is not working in portal

    Dear Experts,
    i have uploaded BI master role into portal, By default Bex Queries are assgined to Master Role. when I clcik on preview for particular Bex Query, it's working fine. but after assigning the master role to end user, that same Bex Query is not working. it's showing Below error..
    Portal runtime error.
    An exception occurred while processing your request. Send the exception ID to your portal administrator.
    Exception ID: 05:22_18/08/10_0002_7116150
    Refer to the log file for details about this exception.
    please give me suggetions...
    Regards,
    VENU

    Hi Venu ,
    Can you please check the logs for details -  http(s):<host>:<port>/nwa . This may be a permissions issue . Check if the iview has read permission for everyone group and then test . Also post the error details here .
    Regards
    Mayank

  • OC4J JSP Debugging not working for all the jsps

    Hi,
    Initially I was not able to debug jsps using Eclipse and OC4J. The jsp debugging started working once I made the below changes:
    1) global-web-application.xml is modified
    Changed the attribute development="true" in orion-web-app
    Added the below init param for the JspServlet
    <init-param>
    <param-name>debug</param-name>
    <param-value>class</param-value>
    </init-param>
    If the jsps are present in a sub directory under the webcontent none of the breakpoints are working. I am still be able to view the jsp pages on the browser.
    Tools: Oracle 10g Application Server Standalone version(10.1.3.5.0), JDK5, Windows XP, Eclipse Indigo
    Project Structure:
    Test (Eclipse Dynamic Web Project)
    -WebContent
    Sample.jsp ( Breakpoints are working)
    -subF (Folder)
    SubSample.jsp (Breakpoints are not working)
    -WEB-INF
    web.xml
    Debugging worked for http://localhost:8888/Test/Sample.jsp
    Debugging not working for http://localhost:8888/Test/subF/SubSample.jsp
    Any help is highly appreciated.
    Regards
    Danny

    This tells there is not enough main memory (not disk space) for the program to run.
    - You can look the dump in ST22, it will have suggestions on increasing the ROLLAREA??, you can forward that to Basis.
    - Most likely you will not have any more memory to assign so the above may not be feasible. Try to rework your query so it works with less data.

  • Temporary Table In SAP Query - Does not Work?

    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF OBJECT_ID('tempdb..##tab) IS NOT NULL DROP TABLE ##tab
    CREATE TABLE ##tab
    [Date] date,
    [Delivery Rows] varchar(40),
    [Delivery Total Units] varchar(40),
    [Receipts Rows] varchar(40),
    [Receipts Total Units] varchar(40),
    WHILE @a!=7
         BEGIN
         SET @date=DATEADD(day,-@a, getdate())
         SELECT @delrows=ISNULL(COUNT(DLN1.[LineNum]),0), @delquan=ISNULL(SUM(DLN1.[Quantity]),0)
         FROM ODLN
         INNER JOIN DLN1 ON ODLN.[DocEntry]=DLN1.[DocEntry]
         WHERE ODLN.[CreateDate] = @date
         SELECT @recrows=ISNULL(COUNT(PCH1.[LineNum]),0) , @recquan=ISNULL(SUM(PCH1.[Quantity]),0)
         FROM OPCH
         INNER JOIN PCH1 ON OPCH.[DocEntry]=PCH1.[DocEntry]
         WHERE OPCH.[DocDate]=@date
         SET @a=@a+1
              INSERT INTO ##tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM ##tab
    {/code}
    Can anyone explain why this query does not work in SAP? It works fine on SQL but gives me this message in SAP:
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near ')'.
    2). [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement 'Service Contracts' (OCTR) (s) could not be prepared.
    Edited by: Chris Candido on Feb 2, 2011 8:38 PM

    Chris,
    There are several areas in your code which needed changes. 
    1. On the field name for your temp table you had spaces.
    2. The SAP table name ODLN, OPCH, PCH1 had to be fully referenced like
    [dbo].[ODLN]
    3. You really need not have ## in front of your temp table, it could just be #
    The select at the end is actually what causes the most problem as for some reason from within SAP it does not produce the result.  I would suggest you put the whole code into a Stored Procedure and call the SP from SAP.  Corrected SQL below.  If you remove the Select line at the end the query would work with in SAP, but keep it give give you an error. SP is the best option for this.
    DECLARE @date DATE
    DECLARE @delrows INT
    DECLARE @delquan INT
    DECLARE @a INT
    DECLARE @recrows INT
    DECLARE @recquan INT
    SET @a=0
    IF object_id('tempdb..#tab') IS NOT NULL
    BEGIN
       DROP TABLE #tab
    END
    CREATE TABLE #tab
    [Date] date,
    DeliveryRows varchar(40),
    DeliveryTotalUnits varchar(40),
    ReceiptsRows varchar(40),
    ReceiptsTotalUnits varchar(40),
    WHILE @a!=7
    BEGIN
    SET @date=DATEADD(day,-@a, getdate())
    SELECT @delrows=ISNULL(COUNT(DLN1.LineNum),0), @delquan=ISNULL(SUM(DLN1.Quantity),0)
    FROM [dbo].[ODLN]
    INNER JOIN DLN1 ON [dbo].[ODLN].DocEntry=DLN1.DocEntry
    WHERE [dbo].[ODLN].CreateDate = @date
    SELECT @recrows=ISNULL(COUNT([dbo].[PCH1].LineNum),0) , @recquan=ISNULL(SUM([dbo].[PCH1].Quantity),0)
    FROM [dbo].[OPCH]
    INNER JOIN [dbo].[PCH1] ON [dbo].[OPCH].DocEntry=[dbo].[PCH1].DocEntry
    WHERE [dbo].[OPCH].DocDate=@date
    SET @a=@a+1
    INSERT INTO #tab VALUES(@date,@delrows,@delquan,@recrows,@recquan)
    END
    SELECT * FROM #tab
    Suda Sampath

  • Clob is not working for bulk data files in PL/SQL XML program

    Hi Odie,
    we took your help to fix the our issue before
    "https://forums.oracle.com/forums/thread.jspa?threadID=2238458&tstart=105"
    working fine for : program is working for smaller size data.
    Issue : now we have problem with the largr size data .
    getting the below error:
    Arguments
    P_dir_name='/tmp'
    P_file_name='CCBGO.COLO_CNG.RESPONSES.20120802.00054131826'
    Environment will now switch to UTF-8 code-set.
    Parts of this log file may not display correctly
    as a result. This is an expected behavior.
    XML_REPORTS_XENVIRONMENT is :
    /apps/applmgr/product/OFDEV/ofdevora/806/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    XENVIRONMENT is set to /apps/applmgr/product/OFDEV/ofdevora/806/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.UTF8
    stat_low = 8B
    stat_high = 0
    emsg:was terminated by signal 11
    Appreciated for your earlier support.
    Kindly suggest .
    Many Thanks,
    Ramesh.

    Thanks ALex,
    your are true it is concurrent program error ,
    but it is working for small amount of data and generating the output and it is not working for larger data.
    i have placed the code which i have used kindly suggest where i am going wrong.
    i am calling the .rdf through the concurrent program, i've used the below query in RDF
    select
    BATCHHEADER
    ,BATCHTRAILER
    ,RqUID
    ,Severity
    ,PmtRefId
    ,StatusDesc
    ,ErrorDesc
    ,AsOfDate
    ,AsOfTime
    ,RqUID1
    ,SPRefId
    from table(CL_CXFRFXFH_PKG.rcacknowledgments(:P_dir_name,:P_file_name));
    kindly find the below code for the package CL_CXFRFXFH_PKG.
    ==========================
    CREATE OR REPLACE package body APPS.CL_CXFRFXFH_PKG is
    function rcacknowledgments (p_directory in varchar2, p_filename in varchar2)
    return TRecordTable pipelined
    is
    nb_rec number := 1;
    tmp_xml clob;
    tmp_file clob;
    rec TRecord;
    begin
    dbms_lob.createtemporary(tmp_file, true);
    tmp_file := dbms_xslprocessor.read2clob(p_directory, p_filename);
    rec.BATCHHEADER := regexp_replace(tmp_file, '.*<BATCHHEADER>(.*)</BATCHHEADER>.*', '\1', 1, 1, 'n');
    rec.BATCHTRAILER := regexp_replace(tmp_file, '.*<BATCHTRAILER>(.*)</BATCHTRAILER>.*', '\1', 1, 1, 'n');
    loop
    tmp_xml := regexp_substr(tmp_file, '<\?xml[^?]+\?>\s*<([^>]+)>.*?</\1>', 1, nb_rec, 'n');
    exit when length(tmp_xml) = 0;
    --dbms_output.put_line(tmp_rec);
    nb_rec := nb_rec + 1;
    select RqUID, Severity, PmtRefId, StatusDesc, ErrorDesc, AsOfDate, AsOfTime, RqUID1, SPRefId
    into rec.RqUID
    , rec.Severity
    , rec.PmtRefId
    , rec.StatusDesc
    , rec.ErrorDesc
    , rec.AsOfDate
    , rec.AsOfTime
    , rec.RqUID1
    , rec.SPRefId
    from xmltable(
    '/CMA/BankSvcRq' passing xmltype(tmp_xml)
    columns RqUID varchar2(3000) path 'RqUID'
    , Severity varchar2(3000) path 'XferAddRs/Status/Severity'
    , PmtRefId varchar2(3000) path 'XferAddRs/Status/PmtRefId'
    , StatusDesc varchar2(3000) path 'XferAddRs/Status/StatusDesc'
    , ErrorDesc varchar2(3000) path 'XferAddRs/Status/ErrorDesc'
    , AsOfDate varchar2(3000) path 'XferAddRs/Status/AsOfDate'
    , AsOfTime varchar2(3000) path 'XferAddRs/Status/AsOfTime'
    , RqUID1 varchar2(3000) path 'XferAddRs/RqUID'
    , SPRefId varchar2(3000) path 'XferAddRs/SPRefId'
    pipe row ( rec );
    end loop;
    dbms_lob.freetemporary(tmp_file);
    return;
    end;
    end;
    ============================================
    Many Thanks,
    Ramesh.

  • Using parameters in a select query sometimes not working

    I use parameters throughout my code - usually without problem, but for some reason in one case it does not return a result. When I modify the querystring to contain the value instead of using parameters it works. Is it because I'm secting a clob? or is it because I'm using a 9i ODP.net dll against a 10g database? this is c# 2.0
    here's the source code that does not work for me - REQUEST_DATA is a clob:
        public String loadRequest(String PSRNumber)
            String returnVal = null;
            ConnectionStringSettings connectionInfo = System.Configuration.ConfigurationManager.ConnectionStrings["Scribe"];
            OracleConnection myConnection = new OracleConnection();
            String strSQL = "select PSR, REQUEST_DATA from stats.request where PSR = :PSR";
            try
                myConnection.ConnectionString = connectionInfo.ConnectionString;
                OracleCommand cmd = new OracleCommand(strSQL, myConnection);
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.Add("PSR", OracleDbType.Varchar2).Value = PSRNumber;
                myConnection.Open();
                OracleDataReader dr = cmd.ExecuteReader();
                if (dr.Read())
                    returnVal = dr.GetOracleString(dr.GetOrdinal("REQUEST_DATA")).ToString();
                else
                    returnVal = null;
                dr.Dispose();
                cmd.Dispose();
            catch (OracleException ex)
                printError(ex.Message);
            finally
                myConnection.Close();
                myConnection.Dispose();
            return returnVal;
        }when I replace the line generating the sql, and remove the lines pertaining to parameters it works:
    String strSQL = String.Format("select PSR, REQUEST_DATA from stats.request where PSR = {0}", PSRNumber);
    I'm fine just using this as a workaround, but I need an explanation why the other does not work - I prefer to use parameters.
    Message was edited by:
    user633546

    I figured it out. thank you for your help in pointing me in the right direction.
    the problem was there was a trailing space in the data.
    when the data for that table is numeric for every record, the query allows me to leave out the single quotes. Trailing spaces do not seem to cause the database to see it as non-numeric - leaving out the quote still finds the record even if there is a trailing space.
    but when I put in the quote, it is not an exact string match, so it could not find the record. sometimes this flexibility gets me into trouble :\

  • Select query is not working in BDC Program

    Hi,
    I am working in BDC for update valuation class for T-code mm01.Actually In this BDC i am using two recoding based on material type.
    i am using two internal table : I_DATA and ITAB
    Use I_DATA to hold excle data in which material No, plant , valuation type , valuation No. and ITAB for material No, material type Only.
    So, i am fetching material Type ( MARA-MTART ) through select query. But Select query is not working. and also i did check MARA table according that  Material Number then  material no. exit in Mara Table.
    Note : at run time  I_DATA have 1 row but ITAB have 0 row ....
    DATA: BEGIN OF I_DATA OCCURS 0,
    MATNR TYPE MARA-MATNR,
    WERKS TYPE MARC-WERKS,
    BWTAR TYPE RMMG1-BWTAR,
    VERPR TYPE BMMH1-VERPR,
    BKLAS TYPE MBEW-BKLAS,
    STATUS TYPE C,
    END OF I_DATA.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR LIKE MARA-MATNR,
    MTART LIKE MARA-MTART,
    END OF ITAB.
    Loop at I_DATA.
    select matnr mtart from mara into table itab where matnr = I_DATA-matnr.
    endloop.
    Guide me..........

    If you use your
    Loop at I_DATA.
      select matnr mtart from mara into table itab
        where matnr = I_DATA-matnr.
    endloop.
    At end of loop, itab will only contain the result of the last select, so use a
    Loop at I_DATA.
      select matnr mtart from mara APPENDING table itab
        where matnr = I_DATA-matnr.
    endloop.
    better
    if I_DATA[] is not initial.
      select matnr mtart from mara into table itab
        FOR ALL ENTRIES IN i_data where matnr = i_data-matnr.
    endif.
    Some Remarks
    - If actually required (where does I_DATA come from, is it an external format, you need the internal value to use in SELECT statement), check via SE11 the correct [conversion exit|http://help.sap.com/saphelp_nw04/helpdata/en/35/26b217afab52b9e10000009b38f974/content.htm] associated with domain MATNR (Is it truly ALPHA, and not something like MATN1, so [CONVERSION_EXIT_MATN1_INPUT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=conversion_exit_matn1_input])
    - You could try to use BAPI like [BAPI_MATERIAL_SAVEDATA|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata] and not BDC
    Regards,
    Raymond

  • Filtering not working for newly added child objects in master-detail table

    Hi,
    I am using Jdeveloper 11.1.1.4 version.
    Problem scenario:
    Filtering of records is not working for newly created child objects in a master-detail scenario.
    Steps to reproduce this issue using HR Schema (using LOCATIONS and DEPARTMENTS table ) :
    1. Create Business components (EO's & VO's ) for LOCATIONS & DEPARTMENTS table)
    1. Create a .jspx page and insert a readonly master table of Locations
    2. Insert a child table (inline-edit table) of Departments and enable filtering
    4. For the child table, drag and drop CreateInsert operation as a toolbar button .
    5. Create a new child record using the toolbar button and enter data .
    6. Filtering on the newly created child record's attributes does not work.
    Please note that the same filter works for existing child records.
    Any suggestions for resolving this issue?
    Thanks,
    Vikas

    Found from Fusion Developer's Guide the following snippet about QBE functionality :
    "+When you create data controls, all data collections will automatically include a Named Criteria node with an All Queriable Attributes criteria. This is the default view criteria that includes all the searchable attributes or columns of the data collection. You cannot edit or modify this view criteria+. "
    So, the question is if the implicit view criteria cannot be edited, how else to set the query execution mode to "Both" ?
    Shouldn't ADF BC support this by default? Is this a bug?
    Note:- If you create a maste-detail table using POJO datacontrols, filter works correctly for newly created child records also .
    This seems to be an issue with ADF-BC datacontrols only.
    Thanks,
    Vikas

  • Search suggestion not working for anonymous user in sharepoint 2013

    Hi ,
    Please help on this search suggestion not working for anonymous user in sharepoint 2013
    shaik

    You can create a search center site, and set the search center site to
    allow anonymous access.
    Also see this link - http://blog.mastykarz.nl/search-query-suggestions-anonymous-users-sharepoint-2013-mavention-query-suggestions/ 
     (As this is regarding a 3rd party tool, I suggest that you direct it to the  provider support.)
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Why select query is not working?

    CREATE OR REPLACE TYPE prod_type AS OBJECT (
    pid INT,
    pprice NUMBER,
    MEMBER PROCEDURE display(pid IN NUMBER));
    create table prod of prod_type (pid primary key);
    CREATE OR REPLACE TYPE deal_type UNDER prod_type (
    ctr NUMBER,
    OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
    insert into prod values(deal_type(101, 4, 1));
    insert into prod values(deal_type(102, 5, 0));
    ------below given select query is NOT WORKING ---------
    select ctr from prod p where p.pid=101;
    Thanks,
    -Nid

    ------below given select query is NOT WORKINGWondering how you inserted data ...
    SQL> CREATE OR REPLACE TYPE prod_type AS OBJECT (
      2  pid INT,
      3  pprice NUMBER,
      4  MEMBER PROCEDURE display(pid IN NUMBER));
      5  /
    Type created.
    SQL>
    SQL> create table prod of prod_type (pid primary key);
    Table created.
    SQL>
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER),
      4  );
      5  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    4/1      PLS-00103: Encountered the symbol ")" when expecting one of the
             following:
             , not pragma <an identifier>
             <a double-quoted delimited-identifier> final instantiable
             current order overriding static member constructor map
    SQL> CREATE OR REPLACE TYPE deal_type UNDER prod_type (
      2  ctr NUMBER,
      3  OVERRIDING MEMBER PROCEDURE display (pid IN NUMBER));
      4  /
    Warning: Type created with compilation errors.
    SQL> sho err
    Errors for TYPE DEAL_TYPE:
    LINE/COL ERROR
    1/1      PLS-00590: attempting to create a subtype UNDER a FINAL type
    SQL>You made an attempt to create a subtype UNDER a FINAL type - that the reason why can not work ...
    Avoid deriving a subtype from this FINAL type.
    HTH

  • Excel 2010 MS Query is not working

    Hi, I am in the process of upgrading all my Excel 2003 spreadsheets to Excel 2010.  I am running into problem with the MS Query.  Spreadsheets have MS Query linking to MS database.  However, when I open some of the spreadsheets, the MS Query
    is not working ie. the blue circle keeps turning and then not responding.  It is very weird that this MS Query is working fine with some spreadsheets but not couple and they are all linking to the same database except a small different in criteria.  I
    tried to re-create the Query in the spreadsheet in Excel 2010 by going to Data>From Other Sources>From Microsoft Query and select the database.  Once I set up the criteria and click Return data, the Query gets stuck.
    Please help! Any comments/suggestions will be appreciated.
    Thanks

    Hi,
    There are many possible causes that can crash MSQuery in Excel 2010.
    First, please make sure we have installed the latest Office 2010 and Windows patches.
    Second, Please read the Blog, it explains one typical crash scenario.
    =====
    AppName: msqry32.exe AppVer: 14.0.4750.1000 ModName: msvcr90.dll
    There are several possible resolution you can try to resolve the above crash:
    1. When you launch MS Query, just disable the option "Validate queries before saving or returning data", this is the fifth box in the options menu.
    The only problem is that if you have made any mistake in your query, you'll only be noticed when receiving the data in excel.
    2. Repair all the keys into registry at the following place:
    [HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC]
    For example:
    Windows Registry Editor Version 5.00
    [HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC]
    "TraceFile"="C:\\DOCUME~1\\...USERNAME...\\IMPOST~1\\Temp\\SQL.LOG"
    "TraceDll"="C:\\WINDOWS\\system32\\odbctrac.dll"
    http://blogs.technet.com/b/asiasupp/archive/2011/11/07/msquery-randomly-crashed.aspx
    =====
    Third, start the Excel 2010 with
    safe mode, it helps us confirm if some add-ins cause this issue.
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in
    Office programs.

  • Sql Monitor is not working for forms10g

    Hi All,
    Sql Monitor is not working for forms10g.How can i solve this problems.
    Regards
    Gopinath M

    using sqlmonitor i have traced the forms 6i (.fmx),in this case toad additional
    software sql monitor is automatically added the frmbld.exe in application.
    whatever i am doing in forms runtime the sqlmonitor provide the sql query.
    for examble i am opening the lov with the help of F9.Now the sqlmonitor trace
    the sql query for that lov item.so its very helpful to see the query without
    the source(.fmb).
    Now the problem is the sqlmonitor is not added the iexplore.exe in application.
    because it added frmbld.exe only not for iexplore.exe.but the 10g forms are
    running from the explorer.is there any other forms trace method is available
    pls kindly guide to me.

Maybe you are looking for

  • Connecting MacBook Pro to external monitor

    I want to connect my late 2011 MacBook Pro (Thunderbolt port) running OS X Ver 10.9.1 to an external monitor.  Am considering the HP ZR2740W 27 in LED IPS monitor.  Any issues or experience in community to do this?  Will I need a special cable? Any o

  • How to get the Oracle Data Mining

    Hi I downloaded Oracle Database 10g r2 on Oracle's download website, and I want the ODM, but it is said in the white paper that ODM is a priced option. I'd like to know how to get it.

  • Quick (hopefully​) RAM question

    We have a A105-S2071 and a A105-S4334.  I would like to upgrade the RAM in both.  My question: can I just put the two 1 GB RAM cards from the S4334 into the S2071?  Thanks ja

  • Firefighter on ABAP stack

    Hello All, I have a query regarding the Firefighter (GRC V5.2) component in the Access Control Suite of SAP GRC. I heard that Firefighter works only for ABAP stack and not for Java stack. Clearly what is ABAP stack & Java stack? And is this the same

  • Installing fastcgi support for php on Sun Java Web Server 6.1

    Can anyone help outline the processes i need to take to configure the web server 6.1 to process .php