Problem with user-defined functions in XQuery String

hello
i've a problem with user-defined functions in XQuery String
details are here (the code is not Human-readable via forum's embedded editor ?? strange)
http://docs.google.com/Doc?id=ddqwddsr_21c96d9x
thanks !!

See
michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                    return {$inputtype}
                 local:test_function("1","2")' returning content) o from dual
Error at line 5
ORA-19114: error during parsing the XQuery expression:
LPX-00801: XQuery syntax error at '{'
3                       return {$inputtype}
-                              ^
michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                    $inputtype
                 local:test_function("1","2")' returning content) o from dual
O   
2   
1 row selected.

Similar Messages

  • Problem with user defined function in XQUERY

    Hi,
    I have a file in which I store XQUERY. My java program reads this file and executes the xquery
    and output the result. I have a working XQUERY in a file, which is something like :
    <feed>
    let $entries := for $x in collection('/path/to/atomStore.bdbxml')/entry[matches(id,'
    .entry')]
    order by $x/updated descending
    return <entry xmlns="http://www.w3.org/2005/Atom">{$x/id,$x/title,$x/published,$x/updated,$x/link}
    </entry>
    let $latest := fn:subsequence($entries, 1, 10)
    for $f in $latest return $f
    </feed>
    After adding the following simple function(I'm not calling it anywhere for the time being),
    I'm getting an error
    com.sleepycat.dbxml.XmlException: Error: Error in XQuery expression:
    Unrecognized character 'a' (0x61) [err:XPST0003], line 33, column 2, errcode = XPATH_PARSER_ERROR
    declare function xml:convertdate($date as xs:integer) as xs:string
    let $months := ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec")
    let $month := $months[$date]
    return $month
    I couldn't find any error with the function syntax. Anyone has any idea?
    Regards,
    Anoop

    Hi Anoop,
    The query and function work fine for me. What does the line and column information in the error point to?
    John

  • Problem with User-defined function

    Does anyone know how to make the user-efined functionto return a object. We know how to run a java class within cal script and pass the result to that java class. However, what we need is to be able to return the result in the form of a java class within the calling class. This is because we are calling the calscript within ejb and the ejb that executes the calscript needs to be able to get the result back.In our case, we are using webLogic EJB to execute a EDS calScript function. We don't know how to have the object created by EDS to be passed back to the EJB.Any insight will be greatly appreciated.Thanks,Anne

    Hi Anoop,
    The query and function work fine for me. What does the line and column information in the error point to?
    John

  • Need help with user defined function

    Hello SDN,
    I need some help with a user-defined function. My source message contains multiple
    generic records (1000 char string), and my target message is 1 header record,
    then multiple generic records.  See description of source and target messages below:
    Source:
      GenericRecordTable 1..unbounded
        Row (1000 char string)
    Target:
      Field1 (char5)
      Field2 (char5)
      Field3 (char5)
      IT_Data
        GenericRecordTable 1..unbounded
          Row (1000 char string)
    Basically, what I need to do in my user defined funtion is to map the first record
    in my source record to the 3 header fields, then map all of the rest of the records
    (starting from line 2) into the GenericRecordTable.
    Can someone please help me with the code for the user defined function(s) for this
    mapping?
    Thank you.

    hi,
    Activities
    1. To create a new user-defined function, in the data-flow editor, choose Create New Function (This
    graphic is explained in the accompanying text), which is located on the lower left-hand side of the
    screen. In the menu, choose Simple Function or Advanced Function.
    2. In the window that appears, specify the attributes of the new function:
    Name
    Technical name of the function. The name is displayed in the function chooser and on the data-flow
    object.
    Description
    Description of how the function is used.
    Cache
    Function type (see above)
    Argument Count
    In this table, you specify the number of input values the function can process, and name them. All
    functions are of type String.
    3. In the window that appears, you can create Java source code:
    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.
    4. Confirm with Save and Close.
    5. User-defined functions are limited to the message mapping in which you created the function. To
    save the new function, save the message mapping.
    6. To test the function, use the test environment.
    The new function is now visible in the User-Defined function category. When you select this category,
    a corresponding button is displayed in the function chooser pushbutton bar. To edit, delete, or add the
    function to the data-flow editor, choose the arrow next to the button and select from the list box
    displayed.
    http://help.sap.com/saphelp_nw04/helpdata/en/d9/718e40496f6f1de10000000a1550b0/content.htm
    http://java.sun.com/j2se/1.5.0/docs/api/
    /people/krishna.moorthyp/blog/2006/07/29/documentation-html-editor-in-xi
    /people/sap.user72/blog/2006/02/06/xi-mapping-tool-exports
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    UDF -
    http://help.sap.com/saphelp_nw04/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm
    Regards

  • Urgent Help Needed - Associating Statistics with User-Defined Functions

    Hello,
    We have an appication uses cost-based optimizer and uses a lot of TO_DATE and SYSDATE calls in FROM and WHERE clauses. For certain reasons, every call to TO_DATE and SYSDATE has been replaced by MY_TO_DATE and MY_SYSDATE respectively (which in turn call built-in functions). However, cost based optimizer is behaving strangely, which is understanble, based on the lack of user-defined functions statistics. I am under the impression that I should use something like:
    ASSOCIATE STATISTICS WITH FUNCTIONS my_to_date DEFAULT SELECTIVITY ?;
    ASSOCIATE STATISTICS WITH FUNCTIONS my_to_date COST (?,?,?);
    ASSOCIATE STATISTICS WITH FUNCTIONS my_sysdate DEFAULT SELECTIVITY ?;
    ASSOCIATE STATISTICS WITH FUNCTIONS my_sysdate COST (?,?,?);
    but what should the values (?) be?. I guess I want to replicate TO_DATE and SYSDATE values, but how would I find out what they are? Thanks in advance...
    P.S. I am also looking for workarounds (I cannot create a synonym for TO_DATE right?), so any help is welcome!!!

    Hi emmalou69 ,
    You told your actual parameter is
    5, 5, 7.3 and 'z'
    so change your method like
    public static int test(int x, int y, double d, char ch)
    because 5 - int; 7.3- float or double; z is char.
    your method returns
    public static int.
    so you should return only int variable. but in your code you mentioned double. it's not correct.
    The original code should look like
    public class rubbish
         public static void main(String args[]){
              rubbish f = new rubbish();
              f.test(5, 5, 7.3 ,'z');
         public static int test(int x, int y, double d, char ch)
              int value;
              x = 5;
              y = 5;
              d= 7.3;
              ch = 'z';
              value =((int) d + x + y + ch);
              System.out.println( x + ch + d + y);
              return value;
    }//here int value of z is 122.
    and int(7.3) is 7
    so 7+5+5+122 = 139.3
    but value =((int) d + x + y + ch); returns 139. because you convert double to int that is 7.3 to 7
    If it is useful, rate me duke dollars,
    Thanks

  • ALV view : Problem with user defined views

    Dear Experts,
    We are facing a problem pertaining to user defined views for a ALV table that we have in SAP eRecruiting application in webdynpro ABAP. The problem is as follows.
    There is a candidate application ABC & only ONE person can edit this at a time.In this application ABC there is a ALV table.
    If the user clicks on this application & navigates to the ALV,this ABC application is in normal/edit mode(no one else has opened this ). So, the user can make changes in ABC. In the ALV, he can click on the 'settings 'button and save the STANDARD view as his own user defined view(by adding or removing columns).
    If the user opens the application ABC in display mode(implying that someone else has alraedy opened ABC for editing), when i navigate to the same ALV,the user CANNOT see the views which were saved in the edit mode.Only the standard view is displayed. The user however has the option to again freshly save a view.
    The views created by a user for this ALV should be seen irrespective of the application being opened in normal or display mode.
    To add to the confusion, this problem is occuring only in some systems & not in others. There is atleast one system where the views are displayed correctly to the user.
    On debugging, the table wdy_conf_user has config ids as different where the user views are stored separately for display & edit mode.
    In systems where the user views are displayed correctly, the config id is one & the same ensuring that the user can see all his views irrespective of the mode of the application.
    Any thoughts on how we can rectify this?
    sorry for the long & tedious explanation
    Thanks in advance,
    Sowmya

    See
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        return {$inputtype}
                     local:test_function("1","2")' returning content) o from dual
    Error at line 5
    ORA-19114: error during parsing the XQuery expression:
    LPX-00801: XQuery syntax error at '{'
    3                       return {$inputtype}
    -                              ^
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        $inputtype
                     local:test_function("1","2")' returning content) o from dual
    O   
    2   
    1 row selected.

  • Problems with User Defines Mapping Objects - Dynamic Configuration

    We have a mapping object that takes data passed in from R3 and does an HTTP Post to another system using a URL and file name that is passed from the header record. We had a consultant set this up for us last year and in creating the new one we just pretty much copied what he did. The problem is, it is not working for us. We have the url and file name, we pass it to the user defined code that is supposed to pass it to the url and file name in the configuration. The java code looks like this:
    public String getPcurlOut(String pcurl,Container container){
    String ourSourceFileName = "START";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    if (conf != null) {
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
    conf.put(key, pcurl + ".xml");
    ourSourceFileName = conf.get(key);
    } else {
    ourSourceFileName = "conf == null";
    Basically we want to pass a url and file name to our communication channel based on values that come from our file in R3
    It is almost exactly like the one that works. Can anyone help with this?
    Thanks
    Mike
    Message was edited by:
            Michael Curtis

    Hi Michael
    <i>Basically we want to pass a url and file name to our communication channel based on values that come <b>from our file in R3</b></i>
    --> This means you have file as a sender adapter.
    Check adapter specific message properties in sender adapter.
    Please refer this blog , it is really worth.
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Also
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory")
    Try writing this as
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","<b>FileName</b>")
    Regards

  • Problem with user defined methods

    Hello,
    I have created a user-defined method using the constructer and a number of sub-methods. The toString method is supposed to return the maximum, minimum, average, and median for an input data set. This program compiles with no problem, but doesn't seem to calculate the statistics. The max, min, med, and mean are all 0. Any help would be appreciated. Thanks a lot.
    import java.util.*;
    public class SO{
    private String id;
    private int N;
    private double[] data;
    private double average;
    private double minimum;
    private double maximum;
    private double med;
         public SO(){
         public void readData(){
              Scanner keyBoard = new Scanner(System.in);
              System.out.println("Enter the id: ");
              id = keyBoard.nextLine();
              System.out.println("Enter the amount of data values in the id: ");
              N = keyBoard.nextInt();
              data = new double[N];
              System.out.println("Enter the values one line at a time: ");
              int j = 0;
              for(int h=0; h<=N-1; h++){
                   data[h] = keyBoard.nextDouble();
              Arrays.sort(data);
         public void setDataValue(int k, double v){
              data[k] = v;
              System.out.printf("Changing data[%d] to %f", k, v);     
         public double getDataValue(int k){
              double get = data[k];
              return get;
         private double mean(){
              double sum = 0;
              for(int k = 0; k<=N-1; k++){
                   sum = sum + data[k];
              average = sum/N;
              return average;
         private double min(){
              minimum = data[0];
              return minimum;
         private double max(){
              maximum = data[N-1];
              return maximum;
         private double median(){
              if(N%2 != 0){
                   med = data[N/2];
              else if(N%2 == 0){
                   med = (data[N/2] + data[N/2-1])/2.;
              return med;
         public void displayData(){
              System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
         public void sortData(){
              Arrays.sort(data);
              System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
         public void analyzeData(){
              System.out.println(this);     
         public String toString(){
              return id +"\n" + "minimum = " + minimum + "\n" + "maximum = " + maximum + "\n" + "median = " + med + "\n" + "mean = " + average;
         public static void main(String[] args){
              SO v = new SO();
              System.out.println("Read Data");
              v.readData();
              System.out.println("Display Data");
              v.displayData();
              System.out.println("Analyze Data");
              v.analyzeData();
              System.out.println("Set Data\n");
              v.setDataValue(0,98.75);
              v.displayData();
              System.out.println("Sort Data");
              v.sortData();
              System.out.println("Access Data\n");
              System.out.println("data[0] = " + v.getDataValue(0));
              System.out.println("\nDisplay v");
              System.out.println(v);
    }

    Sorry
    import java.util.*;
    public class SO{
       private String id;      
       private int N;          
       private double[] data;
       private double average;
       private double minimum;
       private double maximum;
       private double med;
         public SO(){
            public void readData(){
                 Scanner keyBoard = new Scanner(System.in);
              System.out.println("Enter the id: ");
              id = keyBoard.nextLine();
              System.out.println("Enter the amount of data values in the id: ");
              N = keyBoard.nextInt();
              data = new double[N];
              System.out.println("Enter the values one line at a time: ");
              int j = 0;
              for(int h=0; h<=N-1; h++){
                   data[h] = keyBoard.nextDouble();
              Arrays.sort(data);
            public void setDataValue(int k, double v){
                 data[k] = v;
              System.out.printf("Changing data[%d] to %f", k, v);     
            public double getDataValue(int k){
                 double get = data[k];
              return get;
            private double mean(){
                 double sum = 0;
              for(int k = 0; k<=N-1; k++){
                   sum = sum + data[k];
              average = sum/N;
              return average;
            private double min(){
                 minimum = data[0];
              return minimum;
            private double max(){
                 maximum = data[N-1];
              return maximum;
            private double median(){
                 if(N%2 != 0){
                   med = data[N/2];
              else if(N%2 == 0){
                   med = (data[N/2] + data[N/2-1])/2.;
              return med;
            public void displayData(){
                 System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
            public void sortData(){
                 Arrays.sort(data);
              System.out.printf("[");
              for(int k = 0; k<=N-1; k++){
                   System.out.printf("%.2f", data[k]);
                   if(k != N-1){
                        System.out.printf(", ");
              System.out.printf("]");
            public void analyzeData(){
                 System.out.println(this);       
            public String toString(){
                 return id +"\n" + "minimum = " + minimum + "\n" + "maximum = " + maximum + "\n" + "median = " + med + "\n" + "mean = " + average;
         public static void main(String[] args){
              SO v = new SO();
              System.out.println("Read Data");
                     v.readData();
                     System.out.println("Display Data");
                     v.displayData();
                     System.out.println("Analyze Data");
                     v.analyzeData();
                     System.out.println("Set Data\n");
                     v.setDataValue(0,98.75);
                     v.displayData();
                     System.out.println("Sort Data");
                     v.sortData();
                     System.out.println("Access Data\n");
                     System.out.println("data[0] = " + v.getDataValue(0));
                     System.out.println("\nDisplay v");
                     System.out.println(v);
    }

  • Problem with User Defined Second Selection Screen

    Hi Gurus,
                       I have a problem with the selection  screen selections. My requirement is that , User when he selects a check box on the main selection screen ( which is 1000) then at the at-selection event, another screen (whose number is 2000) will be called and it has some parameters to enter values. My problem is that how to get the values from this second screen and use them in the in my program. There is an execute button on the second selection screen and when i click that, nothing is happening.
                       Can anybody suggest me how to get the values from this screen which we called, and entered values in that screen. How to use these values and is there any way that we can do this.
    Thanks in advance for helping me out.
    Regards,
    Srinivas.

    Use <b>DYNP_VALUES_READ</b> FM to read the values from your dynpro screen...
    Like this...
    DATA: ls_dyname     TYPE d020s-prog,
            ls_dynumb     TYPE d020s-dnum.
    gt_dynpfields TYPE STANDARD TABLE OF dynpread WITH HEADER LINE.
        ls_dynumb = '0112'.
        gt_dynpfields-fieldname = 'RF05A-NEWKO'.
        APPEND gt_dynpfields.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname               = ls_dyname
          dynumb               = ls_dynumb
        TABLES
          dynpfields           = gt_dynpfields
        EXCEPTIONS
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          invalid_parameter    = 7
          undefind_error       = 8
          double_conversion    = 9
          stepl_not_found      = 10
          OTHERS               = 11.
    Greetings,
    Blag.

  • Problems with user-defined update-process

    Hi.
    I have a small problem in the right syntax in an user-defined updated process.
    The process is called by a button on the page and should update a record in a table.
    BEGIN
    UPDATE wam_mod_allocation SET
    alloc_assessment = V('P2120_ASSESSMENT'),
    last_update_date = LOCALTIMESTAMP,
    last_update_staff = V('APP_USER')
    WHERE username = V('P2120_USERNAME')
    AND module_id = V('P2120_MODULE_ID')
    END;
    This is the code of the process. The line with the problem is marked bold. P2120_USERNAME is a text field in the page and contains the username to be updated.
    The problem is, that the comparison doesn't work. the value "smith" is available in the table and is the same as in the text field. (both in lower case).
    If I replace the part V('P2120_USERNAME') with 'smith' (with single quotes), the update statement works properly.
    How do I have to compare the username with the item value that it works properly?

    1. Stephan
    2 + 3 Well. I enclosed both tags in the TRIM-Operator and it works. First, I thought, a whitespace caused the problems. To determine which value contains the whitespaces I removed the trim-tags on both sides. It works.
    It is quite funny, because,if I remove both tags, it works too? Well. Yesterday it didnt.
    To be on the safe side, I will include the trim-tags.
    Thanks very much.
    Stephan

  • 2.1.1 Problem with User Defined Reports with actions on the context menu

    I use the User Defined Reports quite a lot, and export and publish these to other members of the team as Shared Reports. I'm also quite disappointed that there seems to be no further development in this area of SQL Developer.
    One of the totally undocumented features of User Defined Reports is the ability to attach actions to a context menu, and pass data from the grid to a procedure, for example. Copying, then exporting the sessions report (from All Reports -> Data Dictionary Reports -> Database Administration -> Sessions) exposes the XML for adding actions to the context menu. The snippet for killing a session looks like this:
    <item  reload="true"  reloadparent="false" removeFromParent="false">
      <title>Kill Session</title>
      <prompt type="confirm" >     
        <label>Kill Session?</label>     
        <default><![CDATA[]]></default>     
        <value><![CDATA[]]></value>        
      </prompt>
      <sql><![CDATA[ALTER SYSTEM KILL SESSION '#SID#, #SERIAL#' IMMEDIATE]]></sql>
      <help>Kill the selected session.</help>
    </item>So to add this type of functionality to your own user defined reports, you need to export the report, edit the XML, and import it again. It seems to work fine to add this to the master reports, but if you add an <item> element to the child reports, the context menu items appear on the master report too, and they are duplicated many times. I'm not sure if the action of exporting the report adds to the number of times the context menu appears.
    Warning - if you edit a report using SQL Developer, all the <item> tags are removed. Once you've added actions to a context menu, you can only edit the report by exporting it, modifying the XML and importing it again.
    Has anyone else seen this behavior? Have you found a work-around?
    To the SQL Developer team: Are there any plans to allow the adding of user defined context menu items to reports using the GUI in the near future?

    You're right the context menu needs a GUI desperately. You can request this at the SQL Developer Exchange, so other users can vote and add weight for possible future implementation.
    Regards,
    K.

  • Problem with user defined selection-screens

    Hi,
    in my case, i have a default selection screen and a user defined selection screen. Now, after selecting a radio button in default selection screen, the user defined selection screen is called. after executing it report output is displayed. now if i press f3 (back) it is going to default selection screen. here my requirement is, when i press f3 it should go to the user defined selection.
    Can u plz help me solve this.
    bye n regards
    sree

    Any modifications to screen 1000 will be lost the next time the program is generated.
    When the user hits the back key from the report output, your ABAP is restarted just like when you originally started it.  That is why you are getting the default selection screen again.
    Use the AT USER-COMMAND event.  When BACK is hit from the report, use the SUBMIT command to re-execute the program, passing it the selections from the default selection screen.  Leave out the RETURN option.
    For help on filling the selection screen during SUBMIT, help is available at
    http://help.sap.com/saphelp_470/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm

  • Problem with user defined approval query

    Hi
    Sorry me for my english
    I have a problem with approval query
    DECLARE @DocDate DATETIME
    SET @DocDate = (SELECT $[OINV.DocDate])
    IF (DATEDIFF(DAY,@DocDate,GETDATE())) != 0
    BEGIN
    SELECT DISTINCT 'TRUE'
    END
    the query works with the previous invoices, but today's invoices show me a error colud not commit transaction
    Can Help me?
    Thanks
    Felipe Loyola

    Hi Felipe Loyola,
    Try this:
    SELECT DISTINCT 'TRUE' FROM OINV T0
    WHERE DATEDIFF(DD,T0.DocDate,GETDATE()) != 0 AND T0.DocNum = '$[$8.0.0\]'
    Thanks,
    Gordon

  • Problem with user defined OTD

    Hi,
    I can't quite figure out how to create an OTD to describe the following:
    [CMP DESC]
    field1=value1
    field2=value2
    field3=value3
    There are actually 41 fields in total in the file.
    Any suggestions on how to do this?
    Thanks,
    Richard

    See
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        return {$inputtype}
                     local:test_function("1","2")' returning content) o from dual
    Error at line 5
    ORA-19114: error during parsing the XQuery expression:
    LPX-00801: XQuery syntax error at '{'
    3                       return {$inputtype}
    -                              ^
    michaels>  select xmlquery('declare function local:test_function($namecmp as xs:string?, $inputtype as xs:string?) as xs:string?      
                        $inputtype
                     local:test_function("1","2")' returning content) o from dual
    O   
    2   
    1 row selected.

  • Help with User Defined Function

    Hi
    I want to code a UDF which comapres an array that contains "X" or empty values,with an array which contains only "X" and return a boolean array with boolean arguments (true/false)
    I tried using the exisiting functions but I didnt find something relevant
    Thx,Shai

    Func 1: public void ChkForX(String[] a,ResultList result,Container container){
    int flag = 0;
    int count = 0;
    for (int i = 0; i<a.length; i++)
    if(a<i>equals("X"))
    {flag = 0;     }
    else
    {flag = 1;
    count = count + 1;
    if(count > 0)
    result.addValue("1");
    else
    {result.addValue("0");
    Func 2:
    public void ChkSpaces(String[] a,ResultList result,Container container){
    int flag = 0;
    int count = 0;
    for (int i = 0; i<a.length; i++)
    if(a<i>equals(" "))
    {flag = 0;     }
    else
    {flag = 1;
    count = count + 1;
    if(count > 0)
    result.addValue("2");
    else
    {result.addValue("3");
    Kinda use both these functions with the same input then further build your logic ... but still i dont think you will get a array as output using UDF

Maybe you are looking for

  • Getting the name of the column using MDM API

    Hi I want to know the Column name from fieldId, can any one help me on this. I am using the following code to get the data but i nedd column name to which the data is refering ArrayList mdmData=new ArrayList(); RecordResultSet rs=(RecordResultSet)obj

  • Customised Planning functions in Integrated Planning

    Hi experts, i have a requirement in my project like this. i have 2 suppliers S1 ans S2 having data like S1             S2 100           50 if i change the value of S1 to 90 the difference of the value (100-90) needs to add to S2 i.e 5010.(the total o

  • UPDATE Statement executing for whole table even when WHERE Clause is presen

    Hi Friends, I have a problem in a stored procedure where i have written an update statement with a where clause. At a time only one row should get updated depending upon unique identifier in where clause. But whats happening is that Update statement

  • Abap HR basics

    Hi Team, Just started ABAP HR and need some help from you guys. Wanted to how to read, update, created and delete a  record in any infotype.    I have basic knowledge like to read any latest or first record we have macro RP_PROVIDE_FROM_First/Last   

  • V4 - Display the Version in the Banner

    Currently the top banner shows something like "Oracle SQL Developer - Databases.jws : IdeConnections%23DEV.jpr in V3 => Oracle SQL Developer : DEV DEV being my Connection Name I am sure there is a good reason for the jws and jpr information not that