Getting "Unexpected end of formula" error in user-defined function

I created a user-defined function and registered it successfully in Discoverer Admin (10g), and it shows up in Discoverer Plus. However, when I call the function, I get this error:
"Error in formula -- unexpected end of formula"
If I hard-code in parameters, I can successfully run the function as such from Oracle SQL Developer:
SELECT PAYLINETOT('2324', '111', to_date('01-Sep-2010'), to_date('31-Oct-2010'))
FROM DUAL;
But I still get the same error if I enter this in the calculation dialog in Discoverer:
PAYLINETOT('2324', '111', to_date('01-Sep-2010'), to_date('31-Oct-2010'))
Any idea what's going on and how to get this to work?

Michael,
I tried your suggestion, and this time I got a different error message that said that the function had not been registered with the EUL. I thought I had registered it, but when I checked, the return data type was wrong. I corrected it, and the function is "valid" in Discoverer Admin. Yet, when I go back to Discoverer Plus and attempt to use the function (and yes, I logged out and logged back in), I get the same error message:
"Error in formula - unexpected end of formula - Error: Function PAYLINETOT has not been registered with the EUL."
Any idea where the disconnect is? Are these two separate errors? How could Discoverer Admin tell me that the function is registered and Discoverer Plus tell me otherwise? And yes, I've made sure that the "Available in Desktop/Plus" checkbox is checked.

Similar Messages

  • Error in User defined function for dynamic file naming

    Hi,
    While creating User Defined function with this following code for dynamic fieldname
    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;
    which options should i select for cache Value, Context, Queue
    for Augument , what name shd i mention.
    Regards,
    Varun

    Hi Varun,
    I guess I have answered a similar question just a few minutes before on very similar post from you. Just pasting the same here .................
    Are you trying to access the ASMA values from the SOAP header of the XI message for the source file name?
    First of all you need to Set the Sender File Adapter for Set ASMA and then file name. So it will work fine when you actually run the scenario end to end.
    But in the mapping tool when you test the mapping - there is not message header updated with the actual source filename - and whenever you try to read the FileName attribute in the message header from the UDF - it cannot find the object and returns a NullPointerException.
    I would suuggest for your mapping tool testing to be successful, have a check in the java code for null values,
    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);
    If (ourSourceFileName != null)
       Return ourSourceFileName;
    Return "NoFileName.txt";
    Let us know if this works.
    Regards,
    Suddha

  • Error in User defined function

    I have created a user defined function to make a call to SAP using JCo.
    But I am getting an error "package com.sap.mw.jco does not exist"
    Do we need to install JCo on our server?
    Thanks in advance

    Hallo Vijaya Kumari,
    if you use XI3.0 then you should check csn note 753294: 
    Symptom                                                                         
    A message mapping contains a user-defined function that uses a class            
    from the "com.sap.mw.jco", "sapxmltoolkit" or "com.sap.tc.Logging"              
    library. An error stating that the source code contains syntax errors           
    occurs when you test or activate the message mapping. When you use a            
    class from "com.sap.mw.jco", the system reports, for example, "package          
    com.sap.mw.jco does not exist".                                                 
    This error only occurs in systems containing a Support Package lower            
    than 5.                                                                               
    Solution                                                                        
    Import Support Package 5 or higher.                                             
    You can use the following workaround as a short-term solution: Upload           
    the library that is referenced in the message mapping into the software         
    component of the message mapping as an "imported archive". Do not               
    activate the "imported archive" with the library since it is not needed         
    for the runtime. The only purpose of the archive is to allow the message        
    mapping to be compiled. To avoid version conflicts with newer libraries,        
    you should delete the archive again after you import Support Package 5          
    or higher.
    In your case you will find the relevant jar file in the path
    [sap_j2ee_engine_installaltion_path]\cluster\server0\bin\ext\com.sap.mw.jco\jrfc.jar
    Regards Franz

  • Error in User defined function for jdbc lookup

    I am getting th error as follows "Method TestJDBCAPI$ with 2 arguments not found in class com.sap.xi.tf._JLU_MM_" when i a m testing in message mapping

    //write your code here
    String Query = " ";
    Channel channel = null;
    DataBaseAccessor accessor = null;
    DataBaseResult resultSet = null;
    //Build the Query String
    Query = "Select role from login where username = " + username[0] + " and password = " + password[0] ;
    try{
    //Determine a channel as created in the configuration
    channel = LookupService.getChannel("JLU_BUSS","JLU_chan");
    //  Get a system accessor for a channel.As the call is being made to the database an database accessor is obtained.
    accessor = LookupService.getDataBaseAccessor(channel);
    // Execute the Query and get the values in the resultSet.
    resultSet = accessor.execute(Query);
    for(Iterator rows = resultSet.getRows();rows.hasNext();)
    Map rowMap = (Map)rows.next();
    result.addValue((String)rowMap.get("role"));
    catch(Exception ex){
    result.addValue(ex.getMessage());
    Above is my udf.My logic is that for the given username and password it should select the corresponding role from the database.

  • HELP! 'unexpected end of file' error-Is there a fix?! OS 10.4.11

    Getting 'Unexpected end of file' error when trying to open a file (that's a rush job) in QuarkXpress 6.5.  I attributed it to lack of memory, so I immediately backed up all files and HD to an external drive to free up space. Restarted and prayed... Quark launched, but file won't open. Same error.
    Have: 2.1 GHz PPC G5, 1.5 GB DDR2 SDRAM  OS 10.4.11 (pre Intel)
    Capacity: 232.8GB, Available: 163GB, Used 69.6GB
    Have been searching help site for 5 hours looking for answer and am DESPERATE!  I saved changes regularly, but can't access this file at all... I've lost 2 full days & nights working on this project that has to be done in 2 days.
    Ran Disk Utility, but no success opening this specific Quark file (Quark will launch- it's just this file that's affected).  Have tried to down load Applejack, etc. but keep finding out they only support OS 10.5 or higher.  (Haven't been able to afford upgraded system since Intel requires purchase of full verions of graphics software instead of upgrades to the tune of $6k).
    PLEASE, I only know enough to be dangerous, so ANY help is GREATLY APPRECIATED! 
    Savvy folks- if I'm in the wrong place, please send me a link where I can solve this personal catastrophy.
    Many thanks-in-advance

    I think you best do over your work from scratch.  You need to make backup copies of the files regularly.  You need to have copies on multiple disks or flash drives.
    I saved changes regularly
    You should know that this isn't sufficient. You need to have multiplte copies of the file.  Backup anyone?  Could be the file structure got messed up.  Could be Quark messed up the file.
    You need to get a newer machine.  G5's are not reliable any more.  Need to see if Quark will run in compatiblity mode on an intel machine.  You should at least get an external firewire drive from owc.  Old hd's are not reliable.
    Boot in safe mode. Hold down the shift key when powering on the machine. This will run a disk repair program. Boot up will take longer as the harddrive is scanned and repaired.
    See this article:
    http://docs.info.apple.com/article.html?artnum=107393
    Or from:
        mrtotes article  :
        Boot from the OS X Install disk and from the Menu Bar choose Disk Utility. Then run "Repair Disk" and "Repair Disk Permissions" on your hard disk.
        a brody:
        https://discussions.apple.com/docs/DOC-1689
    Here the apple article on booting single user mode and using fsck. See the section on Use fsck:
    http://docs.info.apple.com/article.html?artnum=106214
    I suspect not but Perhaps Disk Warrior will be of some help:
    http://www.alsoft.com/DiskWarrior/
    Robert

  • Need user define function for the message  mapping structure

    Hi All
    I am new to XI.I need the java code for Udf for the following structure.
    i have two input and one out put as error.
    order_nos----
    user define function-------error message
    order_details----
    num of orders---- i.e. 10
    order_details------ i.e. whole order records details
    1.i have to compare the 1st  input with 2nd one means if the ist input contain 10 means there are 10 orders in 2nd input.if not then i have to give error message .
    2.then i have to check the fields in 2nd input has no null values.if no values the output will be error message.
    Edited by: Rohit Kumar on Dec 18, 2008 4:43 PM

    Hi Sudhir
    thanks for your continues help.i need some help so that i can fulfill my requirmrnt
    this is my message mapping xml.
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns0:methodCall_MT xmlns:ns0="http://www.dfdsf">
      <num_orders>10</num_orders>
      <test_mode />
    - <order_x>                        ( which is order details)
      <order_id>t78tyu8t</order_id>
      <order_date />
      <mfg_id />
      <catalog_id />
      <first_name />
      <last_name />
      <recipient />
      <message />
      <address1 />
      <address2 />
      <address3 />
      <city />
      <state />
      <zip />
      <country />
      <country_code />
      <phone />
      <subtotal />
      <tax />
      <shipping />
      <total />
      <shopatron_total />
      <fulfiller_total />
      <shipment_id />
    - <additional_info>
      <in_store_pickup />
    - <express_shipping>
      <express_shipping_flag />
      <express_shipping_text />
      <express_shipping_arrival />
      </express_shipping>
      </additional_info>
    - <discount>
      <discount_description />
      <discount_percentage />
      <discount_total />
      </discount>
      <lang_id />
      <currency_id />
      <packing_list />
      <num_items />
    - <items>
      <item_id />
      <quantity />
      <price />
      <part_number />
      <fulfiller_total />
      <shopatron_total />
    - <options>
      <option_x />
      </options>
      </items>
      </order_x>
      </ns0:methodCall_MT>
    this my mapping where under one element number elements are there.when i am excuting the code to check the null value its always giving the there is null val but i have filled evrything.its due to first its checking the order_x and which will be always null.uder this all data will be filled.please suggest what to change in the udf.the code  given by u is working fine but its failing in this scenario because it getting the parent filed is null.

  • What causes 'Unexpected end-of-file' error?

    Hi,
    I am a photographer and an avid Lightroom user. I have two camera's (Nikon D700 and D300) and two computers, a desktop PC and a MacbookPro. Lightroom is installed on both computers.
    For the last three photoshoots I have had this problem where 1 in 3 to 1 in 5 images in Lightroom on my desktop PC suddenly gives a 'Unexpected end-of-file' error. First I thought it was my camera. But then I loaded the images onto my MacbookPro and they worked fine. Then I took some images with my other camera, loaded them on to my Desktop PC, and, voila, same problem.
    The problem specified: the image stops rendering a preview. A dull preview appears. At the top of the screen the message appears: "An unexpected end-of-file occurred." The histogram window stays empty and the image can not be developed.
    I have browsed through this forum some looking for the cause and the fix. There are some mentions of it, but they all date back to 2007.
    I run LR 2.2 on Windows XP SP2 and on a MacbookPro with OS X, version 10.5.8.
    Please help me understand the cause of this problem, and help me find a fix?
    Thanks,
    Rogier
    Rotterdam, The Netherlands
    www.rogierbos.com

    While the corruption in your .NEF file could come from any one of a number of sources, here is a way to recover at least some of the information if you own Adobe Acrobat.  Your .NEF file should contain a smaller JPEG file created by your Nikon camera when the picture was taken.  Even if the .NEF file is corrupt, the JPEG may well be intact, and you can tell that's the case if a preview is visible in Lightroom or Bridge. 
    If you try to print it from Bridge or Lightroom, though, you will get an error.  You can get around this by loading up a CODEC that will let you preview the files in Windows Photo Gallery.  Nikon has one available for download to use with Vista x32 at http://www.nikonimglib.com/nefcodec/index.html.en, but it doesn't support Vista x64, so if you're running that (as I am) you'll need a second party CODEC such as the one available from http://www.ardfry.com/Products.htm with a 15-day trial download available.  They also have a DNG CODEC which I have not tried.
    With that CODEC installed and your system rebooted, preview the damaged NEF file in Windows Photo Gallery.  Choose the "Print" option and select the "Adobe PDF" printer.  Choose the "Postscript Custom Paper Size" option, and set the dpi resolution to the highest available (4000).
    Go to the "Options" link on the bottom right of the window and uncheck the "Sharpen For Printing" box, as you can do this yourself with later processing.  Then go to the "Printer Properties" link to see the Adobe PDF settings.
    Go to the Adobe PDF Settings tab and choose Default Settings: High Quality Print, which will set the resolution to 2400 dpi. 
    You want to have Acrobat interfere as little as possible with the output, so select "Edit" from the Default Settings tab, which will bring up the "High Quality Print - Adobe PDF Settings" dialog.  Here, turn off the "Optimize for fast web view" check box, then go to the "Images" folder and set the "Downsample" setting to Off and the pixels per inch to 2400.  Also, set "Compression" to Off.
    If you're going to do this in the future, you can also "Save As ..." your settings for future use with a name like "Fix Bad NEF Files."
    Print the file to a designated folder.  It won't be quite as good as the NEF file would have been, but at least you haven't lost the shot.

  • How to resolve Unexpected End of file error in Web Crawling

    how to resolve Unexpected End of file error in Web Crawling....
    I am getting java.net.SocketException :Unexpected End of file error in Web Crawling.
    How to get rid of this error.
    Please help anybody ASAP.

    1. Handle this exception - not recommended since you will be creating an exception handling overhead unnecessarily.
    2. Check for EOF using available() method in InputStream. It returns 0 if there are no bytes to read.

  • There was an unexpected end of file error

    I am currently using DNG Converter 8.1 and converting NEF files from a Nikon D600.
    Occacionally I get an error message on some of the files. 
    "The was an unexpected end of file error"  It only happens on some of the ffiles but I can not figure out what is wrong or how to fix the problem.

    plasticAnimal wrote:
    my solution to the problem was to re-copy the problem files from the card.
    Consider checking your disk drive, or just getting a new one.
    If known good (on disk) files go bad, problem is usually disk (or ram).
    If files known to be good on card, are bad after transfer, problem is usually with the transfer hardware.
    If files bad on card, problem is usually camera or card, but may be reader...
    Problem is not likely due to DNG Converter software (nor OS) - sorry Jeff if not worded strongly enough for you.
    R

  • Oraclejsp unexpected end of file error

    I am getting an OracleJsp Unexpected End of File error when I use the <logic:present name="add"> <html:form action="myAction" /> </logic:present> tag. "add" is referring to something that was set in a struts action (ie: request.setAttribute("add", "present")). I've even tried a scriplet that checks request.setAttribute and I get the same error. Any ideas? Thanks.

    Often, file headers get smurfed. Photoshop is very critical of these headers.
    JPEG's seem to be very sensitive to these errors. My trick is to open in a more liberal program, like ThumbsPlus, IrfanView, or PhotoImpact, and then just do a Save, keeping the JPEG compression levels low. This nearly always clears things up for PS.
    Good luck,
    Hunt

  • Unexpected End of File Error

    I am getting a Could not open due to unexpected end of file error messages on a bunch of jpg's I am receiving via email. The files open in Microsoft Office Picture Manager.

    Often, file headers get smurfed. Photoshop is very critical of these headers.
    JPEG's seem to be very sensitive to these errors. My trick is to open in a more liberal program, like ThumbsPlus, IrfanView, or PhotoImpact, and then just do a Save, keeping the JPEG compression levels low. This nearly always clears things up for PS.
    Good luck,
    Hunt

  • 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

  • Unexpected End of File error in LR 1.3

    Using the computer's built-in SD card reader, I imported NEF files taken on my Nikon D80. The previews showed up in the Library window of LR, but when I tried to open the files in Loupe view, I received an "Unexpected End of File" error on most of the images.
    Thinking it might be a card issue, I took some test shots using JPG format instead of NEF, and all images imported and opened properly.
    I then took some other photos in NEF format, imported them thru the card reader, and none of the new files would open in loupe view. I deleted all the files from the computer and library, and tried the following.
    I then hooked the camera directly to the computer's USB port and imported the problem NEF files from the camera (SD card in the camera). Everything worked fine -- all the NEF files opened properly.
    Not being a technical type, I don't know if this is a software or hardware issue -- does anybody have a clue?
    I have used this card before and have used the card reader to inport RAW files from a different camera (Panasonic LUMIX) with no problem.
    I hesitate to use RAW format on my Nikon D80 until I can figure out what the problem is.

    I believe the problem is related to Edit > Catalog Settings... > Metadata > EXIF > Write date or time changes into proprietary raw files.  If this is selected and you change the capture time on your images then around 1 in 256 photos will become corrupted.  The problem is one in 256 files will end with character 26 (or character 1A in Hex).  When updating the files Lightroom removes the trailing character 26.  First of all turn off this switch.  Secondly if you don't have a good original copy you can download and use HEdit to append the trailing character 26 to your file. 
    I first posted this problem in September 2007 on the forum.  It is still an issue in the 3.2 RC.  I have reported the bug through adobe labs (correct channel rather than this forum) and they are looking into the problem.
    http://forums.adobe.com/message/1399193#1399193

  • In Ref cursor, user defined functions give "invalid column" error in EJB.

    Hello,
    I have written PL/SQL stored procedures/functions in Oracle 8i. They return the result set as a ref cursor.
    These procedures are accessed by EJB (weblogic) using Type 4 (100% Java) JDBC Driver.
    My problem is - if I use a user defined function to fetch a value in the select statement of the reference cursor, the EJB gives an error msg - invalid column name.
    If instead of using the function I get the value directly from the table, it works fine. Refer the code below :
    //In the PL/SQL function -
    //instead of writing :
    Open rc for
    Select empcode, empname
    from emp ;
    //If I write :
    Open rc for
    Select empcode, mypack.getempname(empcode)
    from emp ;
    //getempname(empcode) is a function in
    //in a package named 'mypack'
    //and returns name for empcode.
    //The java code gives error
    //error : invalid column name
    //While both are working fine and
    //returning currect result in SQL Navigator.
    Help me solve this mystery ?
    Thanks in advance.
    Swati.
    null

    Hi:
    When use inline Function to simplify the SQL statements, there is one thing that one should conside--Purity Level.
    if you create standalone stored pl/sql function. Oracle implicitly determines the PURITY level during compilation of the stored objects or at execution of an anonymous pl/sql block.
    if you implement Package inline Function( in your case),unlike standalone stored pl/sql functions, the PL?SQL Engine does not determine the purity level of package functions. Therefore, you must explicity assign the correct purity levels for the function to be called inline.
    the code like:
    create or replace package mypack is
    function getempname(empcode emp%empid%type)
    return varchar2;
    PRAGMA RESTRICT_REFERENCES(getempname,WNDS,WNPS,RNPS);
    end mypack;
    I think it can solve your problem if you use enough "pure"to be called inline function. Or you can create the standalone function to do it.
    good luck!
    Yali
    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Swati Agrawal ([email protected]):
    Hello,
    I have written PL/SQL stored procedures/functions in Oracle 8i. They return the result set as a ref cursor.
    These procedures are accessed by EJB (weblogic) using Type 4 (100% Java) JDBC Driver.
    My problem is - if I use a user defined function to fetch a value in the select statement of the reference cursor, the EJB gives an error msg - invalid column name.
    If instead of using the function I get the value directly from the table, it works fine. Refer the code below :
    //In the PL/SQL function -
    //instead of writing :
    Open rc for
    Select empcode, empname
    from emp ;
    //If I write :
    Open rc for
    Select empcode, mypack.getempname(empcode)
    from emp ;
    //getempname(empcode) is a function in
    //in a package named 'mypack'
    //and returns name for empcode.
    //The java code gives error
    //error : invalid column name
    //While both are working fine and
    //returning currect result in SQL Navigator.
    Help me solve this mystery ?
    Thanks in advance.
    Swati.
    <HR></BLOCKQUOTE>
    null

  • 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

Maybe you are looking for

  • Crash report for message below re updting iweb/crashes/iphoto also crashes

    Here is the crash report for the 'problem' with iweb & iphoto - under question below this one..... updating iweb/crashes/iphoto also crashes.... Date/Time: 2007-05-03 16:07:41.295 +0100 OS Version: 10.4.9 (Build 8P135) Report Version: 4 Command: iWeb

  • IPAD/IPOD playing music to a Airport Express - No Sound?

    I have an IPAD and an IPOD.  IPAD is 4th gen, IOS7.  IPOD is 4th gen, IOS6. Airport express is the new one second generation.  Airport Express is wired to my home network, and its in bridged mode with wireless off.  Its purpose is only to play music

  • SAP Crypto SNC PSE SSO from AIX daemon

    Summary We're trying to setup SNC with the SAP Crypto library on AIX, but we're getting inconsistent SSO access to the PSE depending on whether we run from the command line or from a daemon process that runs with the exact same user account. Put diff

  • Thunderbird will not keep new contacts in address book

    I have added new contacts to my address book. When I go back a day later to use them they are gone. I have to recreate them to send an e-mail. Also I create a group contact and the same thing. I can use it the day I create it but the next day it is g

  • My dvd/cd player/burner is not working...

    My dvd/cd player/burner is not working, and I don't want to spend $$$ to fix it. What dvd/cd is available at a good price?