Validation of recursive function call fails

We want to use a call to a recursive function from a HTMLDB application. It should be used in a page region to generate a query string ("PL/SQL function body returning SQL query"). Everything works fine with a call to a non-recursive function. The recursive function also works fine when called from SQL+.
After pressing "Apply changes" on "HTML DB Home>Builder - Application 148>Page Definition>Edit Page Region"-page I get the following error message after a long delay:
Function returning SQL query: Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing
(ORA-00600: internal error code, arguments: [kohdtf048], [], [], [], [], [], [], [])
I assume that the validation routine follows the recursion until the memory limit is reached.
Please give me a hint how to solve this problem.
DB version: 10.1.0.2.0
HTMLDB version: 1.5.0.00.33
running on Win2000 server

Since the original function is confidential, I have created a simple one showing the same behavior (and the same error). Termination does not depend on session state:
Called function (to replace spaces with #):
create or replace function MF_Test
     p_querystring     varchar2     
     return varchar2 is
     v_position integer;
begin
     v_position:=instr(p_querystring,' ');
     if v_position=0 then     /* termination condition */
          return p_querystring;
     else
          return substr(p_querystring,1,v_position-1)||'#'||MF_Test(substr(p_querystring,v_position+1));
     end if;
end MF_Test;
calling function (from the page region, to generate a query string):
declare
q varchar2(500);
begin
q:='select * from hardware where model=''';
q:=q||mf_test(:P3_SEARCH);
q:=q||'''';
end
Validation seems not to terminate in case of recursive function calls.
Thanks for your input.

Similar Messages

  • Help!! recursive function call

        *   The function which build the category tree
        public String categoryTree(Statement stat, boolean isMore, int id) {
            if(!isMore) {
                return "";
            else
               String sql = " select t_category_relation.category_relation_id, t_category_relation.level_in, " +
                            " t_category_item.category_item_id, t_category_item.category_name_jpn_NV from " +
                            " t_category_item, t_category_relation " +
                            " where " +
                            " t_category_item.category_item_id = t_category_relation.category_item_id and " +
                            " t_category_relation.parent_id = " + id + " and t_category_relation.parent_id<>0";
    //           return sql;
               try{
                   ResultSet res = stat.executeQuery(sql);
                   String spacer = "";
                   String input = "";
                   while(res.next()) {
                        int level = res.getInt(2);
                         id = res.getInt(1);
                         for(int i = 0; i < level; i ++) {
                            spacer +="   ";
                         input ="+ id: " +id + " NAME  " + res.getString(4) + "\n</td>\n<td align=center>\n<input type=checkbox value=" +String.valueOf(id) + " name=categoryid>\n</td>\n</tr>\n";
                         return "\t\t<TR>\n\t\t\t<TD>" + spacer + input + categoryTree(stat, true, id);
                   if(spacer.equals("")){
                        return input+categoryTree(stat, false, id);
                }catch(SQLException e) {
                        return "SQL Exception";
                return categoryTree(stat, false, id);
        }I am writing a menu generated base on a tree like relation ship that is store in a database. assume
    vegetable has two child and one of the child has another child and so forth.
    But I am getting a result like this:
    vegetable-->
    <1>childe
    <1.1>childe
    but missing <2>child
    because the while loop doesn't continous looping after the 1.1.
    please help me out
    thanx in advance

    >
    Re: help!! recursive function call
    Author: DrClap Aug 3, 2001 1:15 PM
    When you call the method recursively, the second call makes a second query to the database, before you have finished using the ResultSet from the first query. Since you are using the same Statement, executing the second query causes the first query to, um, disappear.
    The API documentation for java.sql.Statement says this: "Only one ResultSet object per Statement object can be open at any point in time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All statement execute methods implicitly close a statment's current ResultSet object if an open one exists."
    thanx for your reply!
        public String categoryTree(int id) {
               String sql = " select t_category_relation.category_relation_id, t_category_relation.level_in, " +
                            " t_category_item.category_item_id, t_category_item.category_name_jpn_NV from " +
                            " t_category_item, t_category_relation " +
                            " where " +
                            " t_category_item.category_item_id = t_category_relation.category_item_id and " +
                            " t_category_relation.parent_id = " + id;
               try{
                   Connection con = DataSourceUtil.getConnection("name");
                   Statement stat = con.createStatement();
                   ResultSet res = stat.executeQuery(sql);
                   String spacer = "";
                   String row = "";
                   while(res.next()) {
                        int level = res.getInt(2);
                         id = res.getInt(1);
                         for(int i = 0; i < level; i++) {
                            spacer +="   ";
                        row = " \t\t<tr>\n " +
                              " \t\t\t<td colspan='2'>" + spacer + " <a href=inventory_edit_product.jsp?categoryid=" + id +">" + res.getString(4) + "</a></td>\n" +
                              " \t\t</tr>\n ";
                         return (row + categoryTree(id));
                   con.close();
                }catch(SQLException e) {
                        return "<tr><td colspan=2>SQL Exception</td></tr>";
                return "";
        }New I think every recursive call will have it's own statement and resultSet but I am still getting same problem. The while loop stopped when calls reached first base case. Does anybody know why. I expect, assume that while loop will go next when a call reaches the base case which will return "".
    Thanx for help

  • RFC call ended with "Communication Failure" exception (Function call failed; could not find the function

    Hi All,
    I am getting error while executing oDATA service from SAP Netweaver Gateway
    Error details:
    RFC call ended with "Communication Failure" exception (Function call failed; could not find the function
    I am using SAP NG 740
    Project is created in Gateway system using SEGW having Map to Datasource option used.
    in SPRO manage alias, I had seleted Local App option. Screen attached
    I had tried all troubleshooting like delete and add service and alias in "/IWFND_MAINT_SERVICE".
    but still getting same error for all service.
    Kindly advise.
    Regards
    Vivek

    Hello Vivek,
    Service builder would have also generated code for RFC Exception handling to catch exceptions raised when communication fails between your GW and BE for some reasons.
    Handling is done for 1. System Failure 2. Communication Failure & 3. Business Failure;
    Put a BP in your DPC or DP_EXT class where exception code is written to check what exactly is has caused communication failure.
    Check if that RFC is existing in that destination or not.
    For your reference  : Code would be something like this. Put BP here and check the problem.
    * Error and exception handling
    IF lv_subrc <> 0.
    * Execute the RFC exception handling process
       me->/iwbep/if_sb_dpc_comm_services~rfc_exception_handling(
         EXPORTING
           iv_subrc            = lv_subrc
           iv_exp_message_text = lv_exc_msg ).
    ENDIF.
    Go inside this method and check to get info on what has to be done to resolve issue.
    Check carefully what has gone wrong and fix it accordingly.
    No need of adding service & deleting as problem is not because of that.
    Regards,
    Ashwin

  • How to collect returns from recursive function calls without a global var?

    Usually global variables shouldnt be used, I was told. Ok. But:
    How can I avoid using a global var when recursively using a function, when the function returns an object and when I want to have the collection of all these objects as the result?
    For example, I think of determine the users of a group including group nesting. I would write a function that adds the direct group members to a collection as a global var and call itself recusively if a member is another group. This recursively called function
    would do as well: Update the global var and if needed call itself.
    I'm afraid this is no good programming style. What algorithm would be better, prettier? Please dont focus on the example, it is a more general question of how to do.
    Thanks
    Walter

    I rarely needed to create/use recursive functions. Here's one example I did:
    function New-SBSeed {
    <#
    .Synopsis
    Function to create files for disk performance testing. Files will have random numbers as content.
    File name will have 'Seed' prefix and .txt extension.
    .Description
    Function will start with the smallest seed file of 10KB, and end with the Seed file specified in the -SeedSize parameter.
    Function will create seed files in order of magnitude starting with 10KB and ending with 'SeedSize'.
    Files will be created in the current folder.
    .Parameter SeedSize
    Size of the largest seed file generated. Accepted values are:
    10KB
    100KB
    1MB
    10MB
    100MB
    1GB
    10GB
    100GB
    1TB
    .Example
    New-SBSeed -SeedSize 10MB -Verbose
    This example creates seed files starting from the smallest seed 10KB to the seed size specified in the -SeedSize parameter 10MB.
    To see the output you can type in:
    Get-ChildItem -Path .\ -Filter *Seed*
    Sample output:
    Mode LastWriteTime Length Name
    -a--- 8/6/2014 8:26 AM 102544 Seed100KB.txt
    -a--- 8/6/2014 8:26 AM 10254 Seed10KB.txt
    -a--- 8/6/2014 8:39 AM 10254444 Seed10MB.txt
    -a--- 8/6/2014 8:26 AM 1025444 Seed1MB.txt
    .Link
    https://superwidgets.wordpress.com/category/powershell/
    .Notes
    Function by Sam Boutros
    v1.0 - 08/01/2014
    #>
    [CmdletBinding(SupportsShouldProcess=$true,ConfirmImpact='Low')]
    Param(
    [Parameter(Mandatory=$true,
    ValueFromPipeLine=$true,
    ValueFromPipeLineByPropertyName=$true,
    Position=0)]
    [Alias('Seed')]
    [ValidateSet(10KB,100KB,1MB,10MB,100MB,1GB,10GB,100GB,1TB)]
    [Int64]$SeedSize
    $Acceptable = @(10KB,100KB,1MB,10MB,100MB,1GB,10GB,100GB,1TB)
    $Strings = @("10KB","100KB","1MB","10MB","100MB","1GB","10GB","100GB","1TB")
    for ($i=0; $i -lt $Acceptable.Count; $i++) {
    if ($SeedSize -eq $Acceptable[$i]) { $Seed = $i }
    $SeedName = "Seed" + $Strings[$Seed] + ".txt"
    if ($Acceptable[$Seed] -eq 10KB) { # Smallest seed starts from scratch
    $Duration = Measure-Command {
    do {Get-Random -Minimum 100000000 -Maximum 999999999 |
    out-file -Filepath $SeedName -append} while ((Get-Item $SeedName).length -lt $Acceptable[$Seed])
    } else { # Each subsequent seed depends on the prior one
    $PriorSeed = "Seed" + $Strings[$Seed-1] + ".txt"
    if ( -not (Test-Path $PriorSeed)) { New-SBSeed $Acceptable[$Seed-1] } # Recursive function :)
    $Duration = Measure-Command {
    $command = @'
    cmd.exe /C copy $PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed $SeedName /y
    Invoke-Expression -Command:$command
    Get-Random -Minimum 100000000 -Maximum 999999999 | out-file -Filepath $SeedName -append
    Write-Verbose ("Created " + $Strings[$Seed] + " seed $SeedName file in " + $Duration.TotalSeconds + " seconds")
    This is part of the SBTools module and is used by the
    Test-SBDisk function. 
    Example use:
    New-SBSeed 10GB -Verbose
    Test-SBDisk is a multi-threaded function that puts IO load on target disk subsystem and can be used to simulate workloads from multiple machines hitting the same SAN at the same time, and measure disk IO and performance.
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • Recursive function call 'CABM_READ_BOM'

    Hi,
    I need to do a recursive call to 'CABM_READ_BOM' using different matnr each time.  Data will be stored in i_exp_bom_head and i_exp_bom_item.  Since this is a recursive call to the same routine and iterations depend on the level of BOM how can I keep track of the internal tables returned by its level? 
    FORM READ_BOM using p_matnr.
    CALL FUNCTION 'CABM_READ_BOM'
        EXPORTING
          i_matnr         = p_matnr
          i_werks         = i_bom_select-werks
          i_vbeln         = i_bom_select-vbeln
          i_vbpos         = i_bom_select-posnr
          i_stlal         = i_bom_select-stlal
          i_stlan         = i_bom_select-stlan
          i_datuv         = i_bom_select-erdat
        TABLES
          exp_bom_data    = i_exp_bom_head
          exp_itm_data    = i_exp_bom_item
        EXCEPTIONS
          no_record_found = 1
          OTHERS          = 2.
      LOOP AT i_exp_bom_item WHERE postp = 'N'.
        PERFORM READ_BOM using i_exp_bom_item-idnrk.
      ENDLOOP.
    ENDFORM.
    Points will be awarded.
    Thanks!

    Hi Subramanian,
    Thank you for your prompt reply.
    I'm trying to create master BOM and sub BOM depending on how many levels it is.
    IF i_exp_bom_item-POSTP = 'N' then I call the function module again to create sub BOM.  I will call the function module recursively until  i_exp_bom_item-POSTP <> 'N'.  That will be the lowest level.
    Message was edited by:
            Alex Nguyen

  • Please help me on recursive function call

        *   The function which build the category tree
        public String categoryTree(Statement stat, boolean isMore, int id) {
            if(!isMore) {
                return "";
            else
               String sql = " select t_category_relation.category_relation_id, t_category_relation.level_in, " +
                            " t_category_item.category_item_id, t_category_item.category_name_jpn_NV from " +
                            " t_category_item, t_category_relation " +
                            " where " +
                            " t_category_item.category_item_id = t_category_relation.category_item_id and " +
                            " t_category_relation.parent_id = " + id + " and t_category_relation.parent_id<>0";
    //           return sql;
               try{
                   ResultSet res = stat.executeQuery(sql);
                   String spacer = "";
                   String input = "";
                   while(res.next()) {
                        int level = res.getInt(2);
                         id = res.getInt(1);
                         for(int i = 0; i < level; i ++) {
                            spacer +="   ";
                         input ="+ id: " +id + " NAME  " + res.getString(4) + "\n</td>\n<td align=center>\n<input type=checkbox value=" +String.valueOf(id) + " name=categoryid>\n</td>\n</tr>\n";
                         return "\t\t<TR>\n\t\t\t<TD>" + spacer + input + categoryTree(stat, true, id);
                   if(spacer.equals("")){
                        return input+categoryTree(stat, false, id);
                }catch(SQLException e) {
                        return "SQL Exception";
                return categoryTree(stat, false, id);
        } I am writing a recusive function which can generate a tree like category tree for customer navigation purpose.I don't know why my will loop only return once which means if category "vegetable" has two child and one of child has another child but the result will only display vegetable-->child-->grand child instead of vegetable-> 2 child -> one grand child of one of the child.Please help exam the codethax in

    Didn't I already answer this?

  • The Cluster Service function call 'ClusterResourceControl' failed with error code '1008(An attempt was made to reference a token that does not exist.)' while verifying the file path. Verify that your failover cluster is configured properly.

    I am experiencing this error with one of our cluster environment. Can anyone help me in this issue.
    The Cluster Service function call 'ClusterResourceControl' failed with error code '1008(An attempt was made to reference a token that does not exist.)' while verifying the file path. Verify that your failover cluster is configured properly.
    Thanks,
    Venu S.
    Venugopal S ----------------------------------------------------------- Please click the Mark as Answer button if a post solves your problem!

    Hi Venu S,
    Based on my research, you might encounter a known issue, please try the hotfix in this KB:
    http://support.microsoft.com/kb/928385
    Meanwhile since there is less information about this issue, before further investigation, please provide us the following information:
    The version of Windows Server you are using
    The result of SELECT @@VERSION
    The scenario when you get this error
    If anything is unclear, please let me know.
    Regards,
    Tom Li

  • RFC call failed: JCO.Server could not find server function 'SET_SLD_DATA'

    Hi, All
    the system is PI 7.0 EHP1 oraclei Win2003 server, I configured SLD but I run RZ70, having error "RFC call failed: JCO.Server could not find server function 'SET_SLD_DATA' ". I know there are lot of tread about this error, but none of themsolve my problem. all JCO, RFC connections and SDL DATA supplier(VA) seem OK. error message in SM21 is "Could not send SLD data"
    detail from SM21
    The system could not send the data that has been collected automatical
    for the System Landscape Directory (SLD). Check whether the gateway
    configured in transaction RZ70 has been started and whether the SLD
    bridge has been registered with this gateway.
    You can use transaction SM59 to check this in the sending system for t
    implemented RFC destinations. The RFC destinations have the standard
    names "SLD_UC" for Unicode sending systems and "SLD_NUC" for non-Unico
    sending systems. If a different RFC destination has been entered in
    RZ70, check this destination instead.
    You can use the Gateway Monitor to check the target gateways. In ABAP
    systems, this monitor is started with transaction SMGW, or you can use
    the external SAP program "gwmon". Check whether the specified gateway
    has an active registration.
    OF COURSE I checked  RFC of  SLD_UC and SMGW
    any different ideas
    Regards
    ABH

    Hi
    Please check the following notes are implemented
    Note 906454                           
    Note 907729
    You may be aware but if you are not --->RZ70 creates the required SLD* RFCs during runtime - therefore if you have defined these RFCs manually first using the same namespace you can get RFC conflicts which result in a failed submission    
    Please also check the user in the RFC is known to both systems and has required authorization to write to SLD
    Generally with SLD you have to install or select a suitable gateway to handle incoming data supply traffic
    Also the gateway you are using has be known to SLD and reflected in RZ70 - i.e these defintions have to be the same
    It is also recommended to delete all references to SLD_* RFCs in data supplier and target SLD
    after a failed submission attempt to allow RZ70 to recreate these consistently once the above has been checked
    Best wishes
    Stuart

  • Calling Recursive function in a transaction

    Hello All
    I have a requirement calling Recursive function in Transaction.Means inside a transaction, i want to call the same transaction.Is it possible to do like this?
    Because when i am calling like this,transaction is running contineously without stop.
    Any help would be highly appreciated.
    Thanks,
    Manisha

    Manisha,
    take a look on this thread:
    Does xMII support recursive Business Logic Modules
    Hope Ricks solution can help you.
    Regards
    Pedro
    Edited by: Pedro Iglesias on Dec 19, 2008 9:56 AM

  • Function call SALI_MT_GET_TID_BY_NAME failed

    All,
    We have the Central System Monitoring set up on the SOM to monitor Red Alerts. There is a current Red Alert associated with Log Attributes under the following path:
    SOM\CCMS database self-monitoring\...
        Database self-monitoring
            SQL Server 
    Red Alert:
    create_mss_space_mgmt: function call SALI_MT_GET_TID_BY_NAME failed with exception NAME_NOT_FOUND. Affected MTE: ., Red 28.04.2007 , 10:02:18 ( No value has yet been reported )
    I would greatly appreciate if you can provide me a solution to correct this Red Alert.
    Thank you very much in advance.

    Dear Dilanka,
    Kindly reset the node using RZ20 :
    Transaction code RZ20
    ====>  SAP CCMS Technical Expert Monitors
       ====>System / All Monitoring Segments / All Monitoring Contexts
         ====>CCMS database self-monitoring
           ====>Database self-monitoring
    ********check the box for Oracle with a tick*********
    **********Go to Extras on the Menu bar *******
       ====>Activate maintenance function
             ====>Edit  ====>  Nodes Reset  <===
    This should normally resolve the issue.
    Regards
    Amit Devale

  • What does this Adobe Muse error message mean: MuseJSAssert: Error calling slector function:SecurityError: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with orign "null" from accessing a cross-origin frame.

    So what is up with this error message in Muse?
    MuseJSAssert: Error calling slector function:SecurityError: Failed to read the ‘contentDocument’ property from ‘HTMLIFrameElement’: Blocked a frame with orign “null” from accessing a cross-origin frame.

    This is a genuine security error generated by the browser when viewing a page with iFrame content locally.
    Please refer to Zak's reply in the following thread: https://forums.adobe.com/message/6496180#6496180
    Cheers,
    Vikas

  • Help with recursive function to print number patterns

    I'm sorry for having to ask for homework help - I'm badly stuck on this! Can someone give me a kick in the right direction with this?
    need a recursive function with a single positive int parameter n. the function should write (2^n - 1) integers and should be in the following pattern...
    n = 1, Output: 1
    n = 2, Output: 1 2 1
    n = 3, Output: 1 2 1 3 1 2 1
    n = 4, Output: 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1
    n = 5, Output: 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1 5 1 2 1 3 1 2 1 4 1 2 1 3 1 2 1
    function should valid for all positive integer values of n
    This was tagged as a 'short' problem...so it shouldnt take too much code...I am hung on on the following:
    *Do I keep track of the numbers printed, if so how?  I only have a single parameter to call with so I am confused as to how I could get an entire pattern without keeping track of the history
    *I had initially thought it would be necessary to cut it in half and do the 2nd half backwards (ie: for n=3, I would take care of the 1 2 1 - then 3 - then 1 2 1...but even then it seems like I could cut 1 2 1 in half the same way and therefor I should be able to do ALL of it in single parts...
    Can someone veer me in the right direction here? I'm really lost with this.

    This was tagged as a 'short' problem...so it shouldnt
    take too much code...Yeah, the method body could be done in a few lines.
    I am hung on on the following:
    *Do I keep track of the numbers printed, if so how?Not explicitly. Use the call stack. That is, use the fact that when you're recursing, the previous values of numbers are preserved in the previous method invocation.
    I only have a single parameter to call with so I am
    confused as to how I could get an entire pattern
    without keeping track of the historyYou don't have to store anything across method invocations.
    I had initially thought it would be necessary to cut
    it in half and do the 2nd half backwards (ie: for
    n=3, I would take care of the 1 2 1 - then 3 - then 1
    2 1...but even then it seems like I could cut 1 2 1
    in half the same way and therefor I should be able to
    do ALL of it in single parts...No, it's MUCH simpler than that. It's easier than yo uthink.
    Can someone veer me in the right direction here? I'm
    really lost with this.Try this simpler version of the problem:
    Write a recursive method that creates this output:
    n = 1: 1
    n = 2: 1 2
    n = 3: 1 2 3
    And try this simpler version:
    n = 1: 1
    n = 2: 2 1
    n = 3: 3 2 1

  • Finder can't continue recursive function

    I'm trying to write a recursive function that returns a nested list representing the directory structure (including files) below a starting path. When I run my function, I get an error: "Applescript Error: Finder got an error: Can't continue getDirectoryStructure." This error appears at the first subfolder encountered.
    This is one of those "spot my mistake" kind of posts, because I am completely lost. I don't see why it shouldn't be able to continue with my recursive function. Here's the code:
    on getDirectoryStructure(startPath)
    tell application "Finder"
    set dirList to {}
    set tempDirList to (get items of folder startPath)
    repeat with curItem in tempDirList
    if (class of curItem is folder) then
    set end of dirList to getDirectoryStructure(startPath & ":" & name of curItem)
    else
    set end of dirList to curItem
    end if
    end repeat
    end tell
    return dirList
    end getDirectoryStructure
    getDirectoryStructure("Filibuster II:Users:ryos:Documents")

    I didn't realize I could display this a little better, I'm new to the list, and slowly getting it figured out.
    This is a re-post of my previous message...
    on script_title()
       Filename : minimaldirtraversal.scpt (Script Debugger)
       Author : Bill Hernandez
       Version : 1.0.0
       Updated : Saturday, December 16, 2006 ( 3:18 PM )
    end script_title
    -- ---------+---------+---------+------------------
    on script_notes()
       I took one of my directory traversal routines, and took a bunch of stuff
       out of it, to create this for you...
       Hope it helps,
       Bill Hernandez
    end script_notes
    -- ---------+---------+---------+------------------
    property gtimestart : ""
    property gtimeend : ""
    -- ---------+---------+---------+------------------
    -- PROPERTIES REQUIRED FOR PROCESSING TRAVERSAL
    -- ---------+---------+---------+------------------
    property aFound : {}
    property aIgnored : {}
    property aFileTypes : {"TEXT"}
    property aExtensions : {"txt", "text", "applescript", "html", "php"}
    -- ---------+---------+---------+------------------
    -- SYSTEM PATHS
    -- ---------+---------+---------+------------------
    property gdirpathhome : ""
    property gdirpathdesktop : ""
    property gdirpathdocs : ""
    property gdirpathprefs : ""
    property gdirpathtemp : ""
    -- ---------+---------+---------+------------------
    property gtextdelim : ":"
    property g_Divider : "--------------------------------------------------" & return
    -- ---------+---------+---------+------------------
    property aErrors : {} -- list of errors
    property gshow_errormessages : true -- set to false to prevent error messages from displaying
    property gsend_error_messages_tolog : true
    property g_continue : true -- use this instead of [if (not(g_abort)) then]
    -- ---------+---------+---------+------------------
    on run
       set w_props to {contents:""}
       --set w_id to my bb_CkWindowExists("Dummy Work Document", "", w_props) -- REMOVE THIS LINE, USED FOR TESTING
       tell me
          InitGlobals()
          set which to "selectchoosefolder" -- aChoices -> { "selectcurrentdocument", "selectopendocuments", "selectchoosefolder"}
          main(which) -- place your code in [main]
       end tell
    end run
    -- ---------+---------+---------+------------------
    on main(whichAction) -- This is the [main handler] called by [on run]
       -- THIS IS A BASIC SHELL FOR ANY SCRIPT
       my ProcessRequest(whichAction)
       if (g_continue) then
          set str to "" -- If this set to "", the following will be used "Would you like to continue processing now?"
          -- REMOVE NEXT LINE, USED FOR TESTING
          set str to str & "Found : ( " & (count items in aFound) & " ) files..." & return & "Time to process : " & (gtimeend - gtimestart) & " seconds..." & return & return
          if (my ConfirmRequest(str)) then
             repeat with thisItem in aFound
                -- PROCESS EACH (FILE, WINDOW, or DOCUMENT) HERE
                -- ******* DO THE WORK HERE
             end repeat
          end if
       end if
       set error_title to "Problem Found:" & return & "NOTIFY APPLE COMPUTER"
       my error_HandleErrors(aErrors, error_title, gshow_errormessages, gsend_error_messages_tolog)
       tell application "BBEdit" to activate
    end main
    -- ---------+---------+---------+------------------
    on ProcessRequest(whichAction)
       -- Having "if (whichAction..." here is redundant, instead of having it below, but makes it easier not having to repeat "set gtimestart..." several times
       if (whichAction = "selectchoosefolder") then
          set startFolder to my ChooseFolder("Select the folder where the files you want to combine are stored?")
       end if
       -- MAKE SURE "set gtimestart..." COMES AFTER "ChooseFolder(...)"
       set gtimestart to (current date) -- REMOVE THIS LINE, USED FOR TESTING
       if (g_continue) then
          if (whichAction = "selectopendocuments") then
          else if (whichAction = "selectchoosefolder") then
             my processDirectory(startFolder)
          else if (whichAction = "selectcurrentdocument") then
          else
             set aFound to {}
          end if
       end if
       set gtimeend to (current date) -- REMOVE THIS LINE, USED FOR TESTING
    end ProcessRequest
    -- ---------+---------+---------+------------------
    on InitGlobals()
       set aErrors to {} -- list of errors
       set gdirpathhome to (path to home folder from user domain as text)
       set gdirpathdesktop to (path to desktop from user domain as text)
       set gdirpathdocs to (path to documents folder from user domain as text)
       set gdirpathprefs to (path to preferences folder from user domain as text)
       set gdirpathtemp to (path to temporary items folder from user domain as text)
       set g_continue to true
       set aFound to {}
       set aIgnored to {}
    end InitGlobals
    -- ---------+---------+---------+------------------
    on ChooseFolder(s)
       tell application "Finder"
          activate
          if (s = "") then
             set str to "Select the folder you wish to traverse?"
          else
             set str to s
          end if
          try
             return choose folder with prompt str
          on error
             set g_continue to false
             tell application "BBEdit" to activate
          end try
       end tell
    end ChooseFolder
    -- ---------+---------+---------+------------------
    on ConfirmRequest(s)
       tell application "BBEdit"
          activate
          set b1 to "Go Ahead..."
          set b2 to "Forget It!"
          set str to s & "Would you like to continue processing now?"
          set aResult to display dialog str buttons {b1, b2} default button {b1}
          if ((button returned of aResult) = b1) then
             return true
          else
             return false
          end if
       end tell
    end ConfirmRequest
    -- ---------+---------+---------+------------------
    on date_GetFullDate(theDate)
       set ds to date string of (theDate)
       set TS to time string of (theDate)
       tell application "Finder"
          set TS to ((get characters 1 thru -7 of TS) & (get characters -3 thru -1 of TS)) as string
       end tell
       set FD to (ds & " (" & TS & ")")
       return FD
    end date_GetFullDate
    -- ---------+---------+---------+------------------
    on processDirectory(thisFolder)
       tell application "Finder"
          set aItems to (get every item of folder thisFolder)
       end tell
       repeat with I from 1 to the count of aItems
          set thisItem to (item I of aItems as alias)
          set itemInfo to info for thisItem
          set itemName to (name of itemInfo)
          if ((folder of itemInfo) is true) then
             my processDirectory(thisItem) -- It is a FOLDER
          else if ((visible of itemInfo is true) and (alias of itemInfo is false)) then
             if (((file type) of itemInfo) is in aFileTypes) then
                set aFound to aFound & thisItem -- It is a valid file
             else if (((name extension) of itemInfo) is in aExtensions) then
                set aFound to aFound & thisItem -- It is a valid file
             else
                set aIgnored to aIgnored & thisItem -- It is NOT a valid file
             end if
          else
             set aIgnored to aIgnored & thisItem -- It is NOT a valid file
          end if
       end repeat
    end processDirectory
    -- ---------+---------+---------+------------------
    on error_HandleErrors(aErrorList, header_str, display_error, send2log)
       if (header_str = "") then
          set myheaderstr to "Errors were encountered during script execution..."
       else
          set myheaderstr to header_str
       end if
       if ((count of aErrorList) > 0) then
          set s to ""
          repeat with my_error in aErrorList
             set s to s & my_error & return & return
          end repeat
          set s to header_str & return & return & s
          if (display_error) then
             display dialog s buttons {"OK"} default button {"OK"} with icon stop giving up after 15
          end if
          if (send2log) then
             -- NEED TO INCLUDE ROUTINE TO SEND ERRORS TO THE LOG
             -- next line is normally enabled
             -- my writetofile(s, gfilepathlog, true) -- { (true -> append_data), (false -> overwrite) }
          end if
       end if
    end error_HandleErrors
    -- ---------+---------+---------+------------------

  • Error during installation of ECC6- system call failed

    Dear all,
    i encounter the error as below during sap installation. its looks like the ID issue, but this id (fbqadm) is using by me to log into the windows. please help me.
    thank
    ERROR      2009-03-17 10:07:25.583 [syxxsyshlp.cpp:78]
               syslib::printOSError(const iastring &, int, DWORD, const iastring &, CMessage::eLogMessage)
    FSL-00001  System call failed. Error 1326 (Logon failure: unknown user name or bad password.
    ) in execution of system call 'LogonUser' with parameter (fbqadm, SAPFBWDEV01, *******, LOGON32_LOGON_INTERACTIVE,LOGON32_PROVIDER_DEFAULT,&hUserToken), line (1014) in file (synxccuren.cpp).
    TRACE      2009-03-17 10:07:25.813 [iaxxejsbas.hpp:408]
               handleException<ESyException>()
    Converting exception into JS Exception ESyException.
    TRACE      2009-03-17 10:07:25.813
    Function setMessageIdOfExceptionMessage: modlib.jslib.caughtException

    problem fix after reboot the server

  • Is there a way to avoid the function call ?

    Given the following test case
    CREATE USER TESTER
      IDENTIFIED BY "tester"
      DEFAULT TABLESPACE USERS
      TEMPORARY TABLESPACE TEMP
    GRANT CONNECT, RESOURCE TO TESTER
    GRANT CREATE TYPE TO TESTER
    GRANT CREATE SESSION TO TESTER
    GRANT CREATE PROCEDURE TO TESTER
    GRANT CREATE TABLE TO TESTER
    GRANT UNLIMITED TABLESPACE TO TESTER
    ALTER USER TESTER QUOTA UNLIMITED ON USERS
    COMMIT
    CONNECT TESTER/tester
    CREATE OR REPLACE TYPE TESTER.PATTERN_LIST AS TABLE OF VARCHAR2(1023 CHAR)
    SHOW ERRORS
    CREATE TABLE TESTER.PARENT_TABLE
       FIELD_ID     NUMBER(10)          NOT NULL,
       FIELD_NAME   VARCHAR2( 255 CHAR) NOT NULL,
       FIELD_PATH   VARCHAR2(1023 CHAR) NOT NULL,
       FIELD_VALUE  VARCHAR2( 255 CHAR)
    CREATE TABLE TESTER.CHILD_TABLE
      FIELD_PATH    VARCHAR2(1023 CHAR) NOT NULL,
      MIN_STR_LEN   NUMBER(10),
      MAX_STR_LEN   NUMBER(10),
      PATTERNS      TESTER.PATTERN_LIST
    NESTED TABLE PATTERNS STORE AS PATTERN_TABLE RETURN AS VALUE
    ALTER TABLE TESTER.PARENT_TABLE ADD (
      CONSTRAINT PARENT_TABLE_PK
    PRIMARY KEY
    (FIELD_ID))
    INSERT ALL
      INTO TESTER.PARENT_TABLE
    VALUES (1, 'FIELD_A', '/A', NULL)
      INTO TESTER.PARENT_TABLE
    VALUES (2, 'FIELD_AB', '/A/B', '20090731')
      INTO TESTER.PARENT_TABLE
    VALUES (3, 'FIELD_AC', '/A/C', '2167')
      INTO TESTER.PARENT_TABLE
    VALUES (4, 'FIELD_AC', '/A/C', '1144')
      INTO TESTER.PARENT_TABLE
    VALUES (5, 'FIELD_AD', '/A/D', 'XS10')
      INTO TESTER.PARENT_TABLE
    VALUES (6, 'FIELD_AB', '/A/B', '20090229')
      INTO TESTER.PARENT_TABLE
    VALUES (7, 'FIELD_AD', '/A/D', 'ART')
      INTO TESTER.PARENT_TABLE
    VALUES (8, 'FIELD_AD', '/A/D', 'TESTED')
      INTO TESTER.CHILD_TABLE
    VALUES ('/A', NULL, NULL, PATTERN_LIST())
      INTO TESTER.CHILD_TABLE
    VALUES ('/A/B',   NULL, NULL, PATTERN_LIST(   '[12][0-9]{3}[0][13578]([0][1-9]|[12][0-9]|[3][01])'
                                                , '[12][0-9]{3}[0][469]([0][1-9]|[12][0-9]|[3][0])'
                                                , '[12][0-9]{3}[1][02][3][1]'
                                                , '[12][0-9]{3}[1][1][3][0]'
                                                , '[12][0-9]{3}[0][2][2][8]'
                                                , '([2][048]|[1][26])([02468][048]|[13579][26])[0][2][2][9]'))
      INTO TESTER.CHILD_TABLE
    VALUES ('/A/C',   NULL, NULL, PATTERN_LIST(  '[0-1][0-9][0-5][0-9]'
                                               , '[2][0-3][0-5][0-9]'))
      INTO TESTER.CHILD_TABLE
    VALUES ('/A/D',   3, 4, PATTERN_LIST('[^0-9]*'))
    SELECT * FROM DUAL
    CREATE OR REPLACE FUNCTION TESTER.MATCH_PATTERN(p_value IN VARCHAR2, p_patterns IN TESTER.PATTERN_LIST) RETURN NUMBER
    AS
    v_count NUMBER := 0;
    BEGIN
       SELECT COUNT(*)
         INTO v_count
         FROM TABLE(p_patterns)
        WHERE REGEXP_SUBSTR(p_value, COLUMN_VALUE) = p_value;
        RETURN v_count;
    END MATCH_PATTERN;
    SHOW ERRORS
    COMMIT
    /the query
    SELECT   FIELD_ID
           , FIELD_PATH
           , ERRINDEX
           , FIELD_VALUE
      FROM (
               SELECT   a.FIELD_ID
                      , a.FIELD_PATH
                      , b.PATTERNS
                      , CASE
                           WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
                        END AS ERRINDEX_1
                      , CASE
                           WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
                        END AS ERRINDEX_2
                      , CASE
                           WHEN ((b.PATTERNS IS NOT EMPTY) AND ((SELECT COUNT(*) FROM TABLE(b.PATTERNS) WHERE REGEXP_SUBSTR(a.FIELD_VALUE, COLUMN_VALUE) = a.FIELD_VALUE) = 0)) THEN 4
                        END AS ERRINDEX_4
                      , a.FIELD_VALUE
                 FROM            TESTER.PARENT_TABLE a
                      INNER JOIN TESTER.CHILD_TABLE  b ON a.FIELD_PATH = b.FIELD_PATH
              UNPIVOT
                 ERRINDEX
                 FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
           )gives me ORA-03113: end-of-file on communication channel
    If on the other hand, I replace the nested single-row SELECT with the function call like this
    SELECT   FIELD_ID
           , FIELD_PATH
           , ERRINDEX
           , FIELD_VALUE
      FROM (
               SELECT   a.FIELD_ID
                      , a.FIELD_PATH
                      , b.PATTERNS
                      , CASE
                           WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
                        END AS ERRINDEX_1
                      , CASE
                           WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
                        END AS ERRINDEX_2
                      , CASE
                           WHEN ((b.PATTERNS IS NOT EMPTY) AND (TESTER.MATCH_PATTERN(a.FIELD_VALUE, b.PATTERNS) = 0)) THEN 4
                        END AS ERRINDEX_4
                      , a.FIELD_VALUE
                 FROM            TESTER.PARENT_TABLE a
                      INNER JOIN TESTER.CHILD_TABLE  b ON a.FIELD_PATH = b.FIELD_PATH
              UNPIVOT
                 ERRINDEX
                 FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
           )the query gives the correct results which should be
    FIELD_ID    FIELD_PATH    ERRINDEX    FIELD_VALUE
    6           /A/B          4           20090229
    3           /A/C          4           2167
    5           /A/D          4           XS10
    8           /A/D          2           TESTEDIs there a way to do this without the PL/SQL function call and at the same time avoid the ORA-03113 ? Or, have I hit a bug on 11.1.0.7 ?
    Many thanks in advance
    Best Regards
    Philip

    I found the Oracle Bug on my own in the end, in the most unlikely of places !
    The following code
    SELECT   FIELD_ID
           , FIELD_PATH
           , ERRINDEX
           , FIELD_VALUE
      FROM (
               SELECT   a.FIELD_ID
                      , a.FIELD_PATH
                      , CASE
                           WHEN ((b.MIN_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) < b.MIN_STR_LEN))) THEN 1
                        END AS ERRINDEX_1
                      , CASE
                           WHEN ((b.MAX_STR_LEN IS NOT NULL) AND ((a.FIELD_VALUE IS NULL) OR (LENGTH(a.FIELD_VALUE) > b.MAX_STR_LEN))) THEN 2
                        END AS ERRINDEX_2
                      , CASE
                           WHEN ((b.PATTERNS IS NOT EMPTY) AND ((SELECT COUNT(*) FROM TABLE(b.PATTERNS) WHERE REGEXP_SUBSTR(a.FIELD_VALUE, COLUMN_VALUE) = a.FIELD_VALUE) = 0)) THEN 4
                        END AS ERRINDEX_4
                      , a.FIELD_VALUE
                 FROM            TESTER.PARENT_TABLE a, TESTER.CHILD_TABLE b
                WHERE a.FIELD_PATH = b.FIELD_PATH
              UNPIVOT
                 ERRINDEX
                 FOR COL IN (ERRINDEX_1, ERRINDEX_2, ERRINDEX_4)
           )works as intended i.e. like a charm !
    The only difference between the one that gives the ORA-03113 and the above is the way the join is written. The ANSI way (INNER JOIN) fails, the old way (WHERE clause) succeeds.
    I will open a SR with Oracle so that it may be recorded and fixed.
    Best Regards
    Philip

Maybe you are looking for

  • How to upload the Cycle Count Indicator from ERP into EWM

    Hello Gurus, Can someone tell me what the transaction is to upload the Cycle Count Indicator from the ERP into EWM?  I am currently researching the cycle count functionality of EWM for a roll-out at our facility, and this information would be most he

  • How to test and develop the HTML/Backbone custom content viewer on IPad?

    Hi I have been tasked with developing and amending the HTML/Backbone custom content viewer as nicely detailed and explained by Derek Lu here: https://www.adobe.com/devnet/digitalpublishingsuite/articles/html-default-library.html# I can see that by re

  • PPR event getting previous value

    Hi There is a PPR event on a standard text box. I am handling PPR event in my custom CO. Whenever I change the value abd tab out of the text box I get the previous value not the current(changed) value. ExpenseReportLinesVORowImpl expensereportlinesvo

  • Leaving the front panel displayed on a subpanel after stopping

    I have a tab control. Each tab control has a subpanel. Each subpanel has a static vi reference attached to it for launching. I would like the image of the front panel displayed in the subpanel after the program has finished running so that any inform

  • NetBeans 6.1----Woodstock component : Bubble Help

    Hi All, I recently came across the new Woodstock component : Bubble help. I have used it in the Onclick event of an image hyperlink which is in a table Column. Now if i select the image hyperlink in first row of the table, the bubble appears half and