Strange errors when using user defined function in where clause

Hello,
I am having trouble with a function that, when used in the where clause of a select will cause an error if the first column selected is of type INTEGER. Not sure whether I am doing something wrong or whether this is a bug.
Here is a very simple test case:
create table test(
col1 integer not null,
col2 varchar(20) ascii default ''
insert into test values(1,'2011-03-15 05:00:00')
insert into test values(2,'2011-03-15 07:00:00')
CREATE FUNCTION BTR_TAG  RETURNS VARCHAR AS
    VAR ret VARCHAR(20);
  SET ret='2011-03-15 06:00:00';
  RETURN ret;
Select * from test where col2 >= BTR_TAG()
Select col1,col2 from test where col2 >= BTR_TAG()
=>  Error in assignment;-3016 POS(1) Invalid numeric constant
Select '',* from test where col2 >= BTR_TAG()
Select col2,col1 from test where col2 >= BTR_TAG()
=> works as it should
MaxDB V 7.7.07.16 running on Windows Server 2003
I can replicated the test case above with Sql Studio and other ODBC based tools.
Thanks in advance,
Silke Arnswald

Hello Siva,
sorry, but I don't understand your reply:
This is not right forum to posting this question.
You are from which module or working any 3rd party application.
MaxDB 7.7.07.16 is the community version of MaxDb,
we are not using it for SAP
and no 3rd party software is required to reproduce my problem,
Sql Studio or Database Studio will do.
Regards,
Silke Arnswald

Similar Messages

  • Error when use User-Defined Function

    I just create User defined function "getfilename" and I put there:
    "DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return ourSourceFileName; ".
    But In test mapping I have worning:
    "Runtime exception during processing target field mapping /ns1:Z_KBFI_INPUT_FILE/IS_IFILE/FILE_NAME. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._KBFIMsgMapping_ method get_fname$[com.sap.aii.mappingtool.tf3.rt.Context@37d4662c] com.sap.aii.mappingtool.tf3.MessageMappingException: Runtime exception during processing target field mapping /ns1:Z_KBFI_INPUT_FILE/IS_IFILE/FILE_NAME. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._KBFIMsgMapping_ method get_fname$[com.sap.aii.mappingtool.tf3.rt.Context@37d4662c] at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:284) at com.sap.aii.mappingtool.tf3.AMappingProgram.processNode(AMappingProgram.java:238)...."
    And in RWB in Communication Channel Monitoring I can not see file name in the payload.
    Maby I do something wrong, please tell me.

    my source file 200610.txt is like this:
    HR 0610 061030 061021
    DR 03 C 0610 820114 00010111 0000015000 PLN descr...
    DR 03 D 0610 403201 00010111 0000015000 PLN descr..
    TR 0000000002
    Then in sxmb_moni in inbound message (payload) I have:
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:KBFIMsgTypeSource xmlns:ns="http://p4.org/xi/KBFI/Interface">
    - <FIRecordset>
    - <HeaderLine>
      <LineKey>HR</LineKey>
      <PostingPeriod>0610</PostingPeriod>
      <PostingEndDate>061030</PostingEndDate>
      <PostingDate>061021</PostingDate>
      </HeaderLine>
    - <PostingLine>
      <LineKey>DR</LineKey>
      <ServerID>03</ServerID>
      <DCFlag>C</DCFlag>
      <PostingPeriod>0610</PostingPeriod>
      <GLAccount>820114</GLAccount>
      <SubAccount>00010111</SubAccount>
      <NetValue>0000015000</NetValue>
      <Currency>PLN</Currency>
      <Description>descr...</Description>
      </PostingLine>
    - <PostingLine>
      <LineKey>DR</LineKey>
      <ServerID>03</ServerID>
      <DCFlag>D</DCFlag>
      <PostingPeriod>0610</PostingPeriod>
      <GLAccount>403201</GLAccount>
      <SubAccount>00010111</SubAccount>
      <NetValue>0000015000</NetValue>
      <Currency>PLN</Currency>
      <Description>descr..</Description>
      </PostingLine>
      </FIRecordset>
      </ns:KBFIMsgTypeSource>
    But I don't have payload for Response (black and white flag).
    In DynamicConfiguration i have:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Response
      -->
    - <SAP:DynamicConfiguration xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">141</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">txt</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileTimestamp">20061212T121622Z</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileEncoding">ISO646-US</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">200610.txt</SAP:Record>
      <SAP:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">/usr/sap/PXD/put/archive</SAP:Record>
      </SAP:DynamicConfiguration>

  • Using user defined function in where clause

    Hi,
    I have defined function to get maximum date before passed date on the table 'A' and I'm using the same function to get details on that date from the same table 'A' in where clause.
    for ex:
    SELECT x,y,z
    FROM A
    WHREE a.date = max_date;
    But on one database instance it is running fine and on other it is going in a infinite loop.
    Pls help me out
    Thanks in advance,
    Prashant

    Hello Siva,
    sorry, but I don't understand your reply:
    This is not right forum to posting this question.
    You are from which module or working any 3rd party application.
    MaxDB 7.7.07.16 is the community version of MaxDb,
    we are not using it for SAP
    and no 3rd party software is required to reproduce my problem,
    Sql Studio or Database Studio will do.
    Regards,
    Silke Arnswald

  • How to resolve the error while using user defined function.

    EPN Assembly file
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:osgi="http://www.springframework.org/schema/osgi"
    xmlns:wlevs="http://www.bea.com/ns/wlevs/spring"
    xmlns:jdbc="http://www.oracle.com/ns/ocep/jdbc"
    xmlns:spatial="http://www.oracle.com/ns/ocep/spatial"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/osgi
    http://www.springframework.org/schema/osgi/spring-osgi.xsd
    http://www.bea.com/ns/wlevs/spring
    http://www.bea.com/ns/wlevs/spring/spring-wlevs-v11_1_1_3.xsd
    http://www.oracle.com/ns/ocep/jdbc
    http://www.oracle.com/ns/ocep/jdbc/ocep-jdbc.xsd
    http://www.oracle.com/ns/ocep/spatial
    http://www.oracle.com/ns/ocep/spatial/ocep-spatial.xsd">
         <wlevs:event-type-repository>
              <wlevs:event-type type-name="TestEvent">
                   <wlevs:class>com.bea.wlevs.event.example.FunctionCEP.TestEvent</wlevs:class>
              </wlevs:event-type>
         </wlevs:event-type-repository>
         <wlevs:adapter id="InputAdapter"
              class="com.bea.wlevs.adapter.example.FunctionCEP.InputAdapter">
              <wlevs:listener ref="inputStream" />
         </wlevs:adapter>
         <wlevs:channel id="inputStream" event-type="TestEvent">
              <wlevs:listener ref="processor" />
         </wlevs:channel>
         <wlevs:processor id="processor">
              <wlevs:listener ref="outputStream" />
              <wlevs:function function-name="sum_fxn" exec-method="execute">
              <bean>com.bea.wlevs.example.FunctionCEP.TestFunction</bean>
              </wlevs:function>
         </wlevs:processor>
         <wlevs:channel id="outputStream" event-type="TestEvent">
              <wlevs:listener ref="bean" />
         </wlevs:channel>
         <bean id="bean" class="com.bea.wlevs.example.FunctionCEP.OutputBean">
         </bean>
    </beans>
    Event class
    package com.bea.wlevs.event.example.FunctionCEP;
    public class TestEvent {
         private int num_1;
         private int num_2;
         private int sum_num;
         public int getSum_num() {
              return sum_num;
         public void setSum_num(int sumNum) {
              sum_num = sumNum;
         public int getNum_1() {
              return num_1;
         public void setNum_1(int num_1) {
              this.num_1 = num_1;
         public int getNum_2() {
              return num_2;
         public void setNum_2(int num_2) {
              this.num_2 = num_2;
    Adapter class
    package com.bea.wlevs.adapter.example.FunctionCEP;
    import com.bea.wlevs.ede.api.RunnableBean;
    import com.bea.wlevs.ede.api.StreamSender;
    import com.bea.wlevs.ede.api.StreamSource;
    import com.bea.wlevs.event.example.FunctionCEP.TestEvent;
    public class InputAdapter implements RunnableBean, StreamSource {
    private StreamSender eventSender;
    public InputAdapter() {
    super();
    public void run() {
         generateMessage();
    private void generateMessage() {
         TestEvent event = new TestEvent();
         event.setNum_1(10);
         event.setNum_2(20);
         eventSender.sendInsertEvent(event);
    public void setEventSender(StreamSender sender) {
    eventSender = sender;
    public synchronized void suspend() {
    Output Bean class
    package com.bea.wlevs.example.FunctionCEP;
    import com.bea.wlevs.ede.api.StreamSink;
    import com.bea.wlevs.event.example.FunctionCEP.TestEvent;
    import com.bea.wlevs.util.Service;
    public class OutputBean implements StreamSink {
         public void onInsertEvent(Object event) {
              System.out.println("In Output Bean");
              TestEvent event1 = new TestEvent();
              System.out.println("Num_1 is :: " + event1.getNum_1());
              System.out.println("Num_2 is :: " +event1.getNum_2());
              System.out.println("Sum of the numbers is :: " +event1.getSum_num());
    Function Class
    package com.bea.wlevs.example.FunctionCEP;
    public class TestFunction {
         public Object execute(int num_1, int num_2)
              return (num_1 + num_2);
    config.xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <wlevs:config xmlns:wlevs="http://www.bea.com/ns/wlevs/config/application"
    xmlns:jdbc="http://www.oracle.com/ns/ocep/config/jdbc">
         <processor>
              <name>processor</name>
                   <rules>
                   <view id="v1" schema="num_1 num_2">
                        <![CDATA[
                             select num_1, num_2 from inputStream     
                        ]]>
                   </view>
                   <view id="v2" schema="num_1 num_2">
                   <![CDATA[
                   select sum_fxn(num_1,num_2), num_2 from inputStream // I am getting error when i am trying to call this function
                   ]]>
                   </view>
                   <query id="q1">
                        <![CDATA[
                             select from v2[now] as num_2*     // Showing error while accessing the view also               ]]>
                   </query>
              </rules>
         </processor>
    </wlevs:config>
    Error I am getting is :
    Invalid statement: "select >>sum_fxn<<(num_1,num_2),age from inputStream"
    Description: Invalid call to function or constructor: sum_fxn
    Cause: Probable causes are: Function name sum_fxn(int,int) provided is invalid, or arguments are of
    the wrong type., or Error while handling member access to complex type. Constructor sum_fxn of type
    sum_fxn not found. or Probable causes are: Function name sum_fxn(int,int) provided is invalid, or
    arguments are of the wrong type., or Error while handling member access to complex type.
    Constructor sum_fxn of type sum_fxn not found.
    Action: Verify function or constructor for complex type exists, is not ambiguous, and has the correct
    number of parameters.
    I have made a user defined function in a java class and configured this function in the EPN assembly file under the processor tag.
    But when i am trying to access the function in the config.xml file , it is giving me an error in the query.
    Please provide urgent help that how to write the exact query.

    Hi,
    In the EPN Assembly file use
    <bean class="com.bea.wlevs.example.FunctionCEP.TestFunction"/>
    instead of
    <bean>com.bea.wlevs.example.FunctionCEP.TestFunction</bean>
    Best Regards,
    Sandeep

  • Error while using user defined function in reports

    Hi,
    When I use the below user defined function in oracle reports I got the wrong number of arguments error
    select test_function(id,a_number,v_date-14,b_number) from dual;
    If I remove -14 from the argument it works. But iIneed to subtract 14 days from the date.
    Thanks for your help.

    select test_function(id,a_number,v_date-14,b_number) from dual;
    you have to give the command like this to_date(v_date,'dd-mon-yyyy')-14
    because the v_Date you choose in the parameter form is not having the corrent date format
    the format dd-mon-yyyy is the format in which v_date is passed by the user.

  • Getting error while using user-defined function in transform activity

    Hi
    I designed one user-defined function to add 2 nos following the
    link:http://docs.oracle.com/cd/E16764_01/integration.1111/e10224/bp_xslt_mpr.htm .
    Under this i followed the portion creating user-defined function.
    After deploying,i'm getting an error stating:"<summary>
    An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc("xsl/Transformation_1.xsl", $inputVariable.payload).
    </summary>
    <detail>
    XPath expression failed to execute.
    An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc("xsl/Transformation_1.xsl", $inputVariable.payload).
    The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: oramds:/deployed-composites/PO/HelloWorld_rev1.0/xsl/Transformation_1.xsl<Line 6, Column 104>: XML-22045: (Error) Extension function error: Class not found '
         Missing class: addition.add
    can anybody help me in this regard     
    Thanks
    Avinash

    Did you copy the jar file of your java classes to MIDDLEWARE_Home/user_projects/domains/soa_domain/lib?
    http://georgie-soablog.blogspot.com/2010/06/soasuite-11g-implement-user-defined.html
    hope this helps

  • User Defined function in Where clause

    DB:- 11.2
    Input:- 'ACCOUNTING,SALES'
    Output:- ('ACCOUNTING','SALES')
    WITH T AS (select 'ACCOUNTING,SALES' str from dual)
    select '('||regexp_replace(str,'([[:alpha:]]+)','''\1''')||')' from t /*this works*/I've created a function to use this in a where clause
    create or replace function ss(dname varchar2)
    return varchar2 is
    begin
      RETURN '('||regexp_replace(dname,'([[:alpha:]]+)','''\1''')||')';
    end; 
    select ss('ACCOUNTING,SALES') from dual --this worksBut when I am using this function in a where clause result is not coming..any thing i am missing?
    select * from dept where dname in ss('ACCOUNTING,SALES') --no rows

    940838 wrote:
    Output:- ('ACCOUNTING','SALES')Wrong. ('ACCOUNTING','SALES') is a list of two strings 'ACCOUNTING' and 'SALES' while your function returns a single string '(''ACCOUNTING'',''SALES'')'.
    IN clause requires a comma-separated list of values while your function, again, returns just one value. So query is comparing 'SALES' whith '(''ACCOUNTING'',''SALES'')', not with ('ACCOUNTING','SALES') and obviously no match. What you are trying to do is called dynamic SQL. There are plenty examples on how to use it. But you don't need it. Use nested table or varray. I'll use Oracle supplied varray type sys.OdciVarchar2List:
    select  *
      from  dept
      where dname in (
                      select  *
                        from  table(sys.OdciVarchar2List('ACCOUNTING','SALES'))
        DEPTNO DNAME          LOC
            10 ACCOUNTING     NEW YORK
            30 SALES          CHICAGO
    SQL>SY.

  • Multi mapping question using user defined function

    Hi,
    I have a message with multiple occuring nodes (i.e. one message with multiple orders (header + detail)) that I need to map to a idoc. I need to filter out of the source based on order type (in header) from creating an idoc.. How do I do it using user defined function + message mappping ?
    mad

    All - Thanks much.. Here is my requirement that is no solved by regular mapping
    <Root>
    <Recordset>
      <Ordheader>
        <ord>
        <ord_type>
      </Ordheader>
       <Ord_line>
         <ord>
         <Linnum>
       </Ord_line>
      </Recordset>
    <Recordset>
      <Ordheader>
        <ord>
        <ord_type>
      </Ordheader>
       <Ord_line>
         <ord>
         <Linnum>
       </Ord_line>
    </Recordset>
    <Root>
    As you see above, each recordset has order transaction. One Root message can contain multiple of these. So, when I map to the IDOC, I want to filter out any ord_type <> XX.
    If I use regular graphical map, it only looks at first recordset and accepts all or rejects all.
    I need to use UDF. In the UDF, what comes in as input ? Resultset is output -correct ? Now how do I usse graphical mapping with UDF to generate the correct target info

  • Using User Defined Function is SQL

    Hi
    I did the following test to see how expensive it is to use user defined functions in SQL queries, and found that it is really expensive.
    Calling SQRT in SQL costs less than calling a dummy function that just returns
    the parameter value; this has to do with context switchings, but how can we have
    a decent performance compared to Oracle provided functions?
    Any comments are welcome, specially regarding the performance of UDF in sql
    and for solutions.
    create or replace function f(i in number) return number is
    begin
      return i;
    end;
    declare
      l_start   number;
      l_elapsed number;
      n number;
    begin
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(rownum)
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('first: '||l_elapsed);
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(sqrt(rownum))
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('second: '||l_elapsed);
      select to_char(sysdate, 'sssssss')
        into l_start
        from dual;
      for i in 1 .. 20 loop
        select max(f(rownum))
          into n
          from t_tdz12_a0090;
      end loop;
      select to_char(sysdate, 'sssssss') - l_start
        into l_elapsed
        from dual;
      dbms_output.put_line('third: '||l_elapsed);
    end;
    Results:
       first: 303
       second: 1051
       third: 1515
    Kind regards
    Taoufik

    I find that inline SQL is bad for performance but
    good to simplify SQL. I keep thinking that it should
    be possible somehow to use a function to improve
    performance but have never seen that happen.inline SQL is only bad for performance if the database design (table structure, indexes etc.) is poor or the way the SQL is written is poor.
    Context switching between SQL and PL/SQL for a User defined function is definitely a way to slow down performance.
    Obviously built-in Oracle functions are going to be quicker than User-defined functions because they are written into the SQL and PL/SQL engines and are optimized for the internals of those engines.
    There are a few things you can do to improve function
    performance, shaving microseconds off execution time.
    Consider using the NOCOPY hints for your parameters
    to use pointers instead of copying values. NOCOPY
    is a hint rather than a directive so it may or may
    not work. Optimize any SQL in the called function.
    Don't do anything in loops that does not have to be
    done inside a loop.Well, yes, but it's even better to keep all processing in SQL where possible and only resort to PL/SQL when absolutely necessary.
    The on-line documentation has suggested that using a
    DETERMINISTIC function can improve performance but I
    have not been able to demonstrate this and there are
    notes in Metalink suggesting that this does not
    happen. My experience is that DETERMINISTIC
    functions always get executed. There's supposed to
    be a feature in 11g that acually caches function
    return values.Deterministic functions will work well if used in conjunction with a function based index. That can improve access times when querying data on the function results.
    You can use DBMS_PROFILER to get run-time statistics
    for each line of your function as it is executed to
    help tune it.Or code it as SQL. ;)

  • Multivalue error when using the previous() function

    I am getting a multivalue error when using the previous() function on a dimension object in the report.  I thought that the previous function was supposed to look at the current report and then look at the previous record's contents.  How could this possibly give me a multivalue error when the value is clearly output in the previous row?  Anyone have any ideas?
    By the way, this is a valuable function for the types of reports that I design.  The next() function would be even more valuable.
    Thanks for your help.

    Hi Michael,
    Could you please test the following solutions it might help you to resolve the issue.
    Solution1:
    Use slice and dice to reset all the tables that have #multivalue in it. The only problem with this workaround is they have to do the formatting manually.
    Solution2:
    Also, test the issue by changing the object to dimension if it is a measure or to measure if it is a dimension.
    Regards,
    Sarbhjeet Kaur

  • User defined function in where IN clause

    Hi,
    I have a Function who returns in priview:
    (1,2,3,4)
    Now i am using this function in SQL where clause
    Select from debug where id in debug.debug_process()
    On execute select i am getiing ORA-01722 invalid number , i understand that functions return not only numbers but  character symbols too '(,)'
    Are it posible to use user defined function who do not return NUMBER in Where clause IN statement ?  If not what tips can sugest me for getting list of values for use in IN Clause?
    ID.
    Thanks!

    Hi,
    Please try:
    You can use SYS REFCURSOR for return your data.
    create or replace function get_debug return sys_refcursor is
         v_rc sys_refcursor;
       begin
         open v_rc for 'select * from debug where id in '|| debug.debug_process();
         return v_rc;
       end;
    Function created.
    Now, if we look at using this through SQL*Plus we first create ourselves a ref cursor variable to accept the results of the function, and then call the function to get the ref cursor back..
    SQL> var rc refcursor
    SQL> exec :rc := get_debug ;
    SQL> print rc;
    Regards
    Mahir M. Quluzade

  • Using round off function in where clause

    Hi All,
    I'm trying to use round off function in where clause, I seek help in completing this script.
    WITH CR_Details AS
    (Select
    request_id,
    parent_request_id,
    fcpt.user_concurrent_program_name Request_Name, phase_code, status_code,
    round((fcr.actual_completion_date - fcr.actual_start_date),3) * 24 * 60 as Run_Time,
    round(avg(round(to_number(actual_start_date - fcr.requested_start_date),3) * 1440),2) wait_time,
    fu.User_Name Requestor,
    fcr.argument_text parameters,
    to_char (fcr.requested_start_date, 'MM/DD HH24:mi:SS') requested_start,
    to_char(actual_start_date, 'MM/DD/YY HH24:mi:SS') ACT_START,
    to_char(actual_completion_date, 'MM/DD/YY HH24:mi:SS') ACT_COMP,
    fcr.completion_text
    From
    apps.fnd_concurrent_requests fcr,
    apps.fnd_concurrent_programs fcp,
    apps.fnd_concurrent_programs_tl fcpt,
    apps.fnd_user fu
    Where 1=1
    and fcr.concurrent_program_id = fcp.concurrent_program_id
    and fcp.concurrent_program_id = fcpt.concurrent_program_id
    and fcr.program_application_id = fcp.application_id
    and fcp.application_id = fcpt.application_id
    and fcr.requested_by = fu.user_id
    and fcpt.language = 'US'
    and fcr.actual_start_date like sysdate )
         select crd.*
         from CR_Details crd
         where Run_time <> '0'
         AND wait_time <> '0'
    GROUP BY
    crd.request_id,
    crd.parent_request_id,
    crd.fcpt.user_concurrent_program_name,
    crd.requested_start_date,
    crd.User_Name,
    crd.argument_text,
    crd.actual_completion_date,
    crd.actual_start_date,
    crd.phase_code,
    crd.status_code,
    crd.resubmit_interval,
    crd.completion_text,
    crd.resubmit_interval,
    crd.resubmit_interval_unit_code,
    crd.description
    Not sure about the GROUPBY function referencing the "crd." .

    Hi,
    The best thing for you to do is start over. Start as small as possible, then take baby steps.
    Pick one of the tables; fcr perhaps, and write a query that just uses that table, like this:
    SELECT    *
    FROM       apps.fnd_concurrent_requests     fcr
    WHERE       fcr.actual_start_date          >= TRUNC (SYSDATE)
    AND       fcr.actual_start_dt          <  TRUNC (SYSDATE) + 1
    ;(I think this is what you meant to do when you said "... LIKE SYSDATE".)
    Make sure this little query gets credible results. When that tiny query is working perfectly, add another line or two. You can cut and paste code from what you posted, if that helps you.
    If you get stuck, post the last version of your code that worked perfectly, and the latest version (only a line or two bigger) that has the problem. Describe what the problem is. If you get an error, post the complete error message. In any event, post CREATE TABLE and INSERT statements for all the tables and columns needed to run the query, and the results you want to get from that query.
    When you post any code, format it, so that how the code looks on the screen gives some clues about how it is working.
    When you post any formatted text on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing.
    If you going to use the AVG function in the sub-query, then you probably need to do a GROUP BY in the sub-query.
    If you're not using any aggregate functions (like AVG) in the main query, then you probably don't want to do a GROUP BY in the main query.
    I know this is a lot of work.  I'm sorry.  If there was an easier way, I wouldn't ask you to do all this.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error in conditional map using User Defined Function

    All,
    In my mapping I basically have a user defined function that returns the filename of my inbound file from the adapter-specific message attributes (file adapter).  I know this is coded properly because if I simply assign this function to my destination field I can see the filename in the payload XML.
    However if I conditionally check that returned value using if,then,else I get an error message stating:
    "During the application mapping com/sap/xi/tf/_MaterialData2ZcustProdMastMulti_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformation"
    Essentially in my if I'm checking if the value returned by my user defined function is equal to the constant "SOMECONSTANT" then I'm setting my destination field to some other constant value.  Otherwise it's equal to a different constant value.
    Any thoughts?

    Claus,
    Thanks for the help.  I actually had figured the problem out on my own.  Sorry for not updating the thread sooner.  What happened was this (as I suspected it wasn't related to my user defined function).  For the newbies out there (of which I'm one) the problem was I was comparing strings in the graphical mapping tool using the Boolean "EQUALS" rather than the Text "EQUALSS".
    Can you give yourself points for solving

  • Matscript node void ouputs when calling user-defined functions

    Hi,
    I have a (for most of you, probably simple) problem with calling user defined function within a mathscript node.
    I have a script inside a MathScript node which calls three UD functions. When I try to output variables, LabView sets their type to void, so I cannot use them further. this would imply, that the script is nondeterministic, (since the types would get set at runtime). However, if I replace the call to the UD function with the actual contents of the function, the variable becomes deterministic. Now, since I have several call to these functions, I have no desire in writing all of them many time, introducing many variables etc. What would you advise me to do?
    Find attached my scripts and functions.
    I need this script running on a RT Target, and have been battling this for weeks, with almost no success!
    Thanks, Regards,
    Luka
    Attachments:
    Scripts.zip ‏2 KB

    MArtin, hello!
    As far as I know, LabView checks the syntax as you write in the MS Node, and since there is no X mark next to the line number, it indicates, that the syntax is correct. Since i have set the path to the UDF in both the VI options and in the general MAthScript setting, how does adding the path command help? even if I add path('directory') command, a yellow exclamation mark appears, saying the command is slowing down performance.
    (this is the original help explanation:
    The warning glyph indicates that LabVIEW operates with reduced error checking at edit time and slower run-time performance for the MathScript Node. The following conditions cause the warning glyph to appear. To remove the warning glyph from the MathScript Node and improve run-time performance, modify your script as follows to resolve the condition in your script:
    Your script calls addpath or pathremove (legacy name rmpath), or calls cd, path, or userpath with one or more inputs, which change the MathScript search path list at run time. Remove these functions and use the MathScript page to configure the default search path)
     Could you please post a screenshot of your VI, just to see, if you've got anything different set up?
    I am running LV2012.
    Luka

  • Error in simple user defined function

    Hi all,
    I have seen one simple user defined function on scenario. Now it is working fine. Same code I have used another place. But it is giving some errors
    D:/usr/sap/C08/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Mapc6fa0c70297511dbaf7e00c09f4504e7/source/com/sap/xi/tf/_ST_MM_.java:3: package javax.mail.internet does not exist
    import com.sap.aii.mappingtool.tf3.;import com.sap.aii.mappingtool.tf3.rt.;import java.util.;import java.io.; import java.lang.reflect.;import javax.mail.internet.;import javax.mail.;import java.util.;import java.util.Date;import javax.activation.;import java.lang.reflect.;import javax.mail.event.*;
    Like that it has shown 13 errors. I have given the package names in imports field what previous function has.

    Hi,
    Please see this from SAP help
    <i>a.      You can import Java packages to your methods from the Imports input field, by specifying them separated by a comma or semi-colon:
    You do not need to import the packages java.lang., java.util., java.io., and java.lang.reflect. since all message mappings require these packages and therefore import them. You should be able to access standard JDK and J2EE packages of the SAP Web Application Server by simply specifying the package under Import. In other words, you do not have to import it as an archive into the Integration Repository. You can also access classes of the SAP XML Toolkit, the SAP Java Connector, and the SAP Logging Service (see also: Runtime Environment (Java-Mappings)).
    In addition to the standard packages, you can also specify Java packages that you have imported as archives and that are located in the same, or in an underlying software component version as the message mapping.
    b.      Create your Java source text in the editor window or copy source text from another editor.</i>
    http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
    Regards
    Vijaya

Maybe you are looking for

  • SDN not working in Firefox 1.5.0.4

    hello sdn people, i would love to use SDN in my favourite browser, however this is what happens in mozilla firefox 1.5.0.4: SDN seems to be loaded, i even get the SDN icon in the adress bar, but then it gets trapped in an endless loop and reloads the

  • Remote and Universal Dock

    Hi guys, There's been a few discussion already on the remote and universal dock. Is it difficult for Apple to enable the display of the Ipod screen to the TV-out? You can gain a huge amount of functionality on the Ipod if you can actually see where y

  • My Extensions are not listed in extensions

    I installed Firefox 13 on a brand new PC with vista home basic , I proceeded to install some extensions, for example add block plus and speed dial, then I restarted like it told me to do, and when fire fox started up I could use the extensions as per

  • Change Build Status From PL/SQL

    Apex 3.2 Please see my previous thread Change Build Status From PL/SQL We tried this code CREATE OR REPLACE procedure APEX_030200.pr_sup_unfreeze_apex as begin   for l_app in (select id                       ,security_group_id                 from AP

  • Library Gone After Updating to LR 1.2

    I'm just starting with this product. Had images in a version 1.1 Library. Got prompted as to availability of version 1.2 for download and did so. To experiment and learn a bit more, I imported one RAW file from my hard drive. Now it's the only image