Help needed in making a Recursive loop( loops into loops)

Hi i have a situation, i need to make loop into loop into loop....undecided loop.
i have a object list which are parent.........eg.
i query to get my 1st list is A, B and C....i loop it to display in table
while looping i query A to get its child AA, AB, and AC, i loop it in table..
while looping i query AA to get its child AAA, AAB and AAC...
i have to check for the child till it has child level donw level...but i dont know how can i make a dynamic loop...i cant write a loop it for 15 to 20 .
Is there any way to make a recursive loop so tht it checks for child into child.
thanks

my code is such......
Corres[] objCorresBean = correspondence.getCorrespondence(objectId);
for (int i = 0; i < objCorresBean.length; i++) {
CorrespondenceBean corresBean = objCorresBean;
String parent_object_id = corresBean.getObjectId();
childCorresBean = correspondence.getChildCorrespondence
(parent_object_id);
for (int j = 0; j < childCorresBean.length; j++) {
CorrespondenceBean childBean = childCorresBean[j];
String child_object_id = childBean.getChildObjectId();
may be child_object_id have some childrens.......i want to make it recursive

Similar Messages

  • Help Needed!! embeding a swf widget into a flash site

    Hi all.
    I am currently making a flash site for a band, and need to
    embed an external SWF widget into it.
    Its easy enough to embed it into HTML page, but idealy this
    site will endup a single SWF file, to make distribution onto the
    bands various pages (MYspace etc) easier.
    The code to embed in html is:
    <embed src="
    http://www.soundclick.com/player/V2/mp3player200.swf"
    width="200" height="140"
    flashvars="bandid=850463&playType=band&ext=1&testMode=0&autoplay=1"
    name="MP3PlayerBasic" type="application/x-shockwave-flash"
    wmode="transparent" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    />
    Some one told me it should be no probs to embed a swf with
    some sort of LoadMovie command, but he didnt have a qule about
    assigning flashvars to it.
    Any help here would ge greatly apreciated.
    Cheers.
    Sion

    I am listening to you and was letting you know that the code that I am trying to use is probably from an old forum. The code that Flash CS4 cranks out is about 10 pages long which seems a little much just to import an .swf with a transparent background. I don't imagine CS6 would be much shorter.
    From what I gathered, the html file checks to see what version of Flash you're using as well as what browser. The code for that is insane in my opinion and I am trying to keep my html file for my homepage rather small. I had no problem importing this in DW with a transparent background (when I was using DW) but am using Komodo Edit as my HTML editor now as it didn't come with Production Premium that I just got.
    If you know the correct (newer) code, that would import an .swf with a transparency, that would be most be useful. If not I guess I'll just wait for someone to reply that does.
    I will try to extract the code from the CS4 HTML file and use that, but did already try it once and it didn't work. If all else fails, I'll just download a trial version of DW and/or Flash CS6 and see if I can figure out how I did it on a website I developed a couple years ago (that I lost the files from in a HD crash).

  • Help needed in making table name and column name dynamic

    please check the below query? in the below message
    Message was edited by:
    460425
    Message was edited by:
    460425

    thanks Dmytro,
    below is the script i was looking for it got it..any way thanks.
    just need to replace dbms_output.put_line with utl_file.put_line
    to put the code on server directory.
    and execute as and when required.
    Reg.
    AAK
    CREATE OR REPLACE PROCEDURE p_ad_log
    IS
         CURSOR tbl_cursor IS
              SELECT table_name FROM user_tables WHERE table_name IN('EMP','EMP1') ;
         CURSOR col_cursor( cp_table_name varchar2) IS
              SELECT column_name FROM user_tab_columns WHERE table_name=cp_table_name;
         --v_file_handle      utl_file.file_type;
         --v_file_dir          varchar2(30)      :=     'DIRECTORY PATH'     ';
         --v_file_name     varchar2(30)       :=       'AD_TRIGGER_TEXT.TXT';
         tbl_cursor_value     tbl_cursor%ROWTYPE;
         col_cursor_value     col_cursor%ROWTYPE;
         v_string          varchar2(4000);
         v_string_val     varchar2(4000);
    BEGIN
         DELETE audit_triggers_status;
         COMMIT;
         --v_file_handle := utl_file.fopen(v_file_dir,v_file_name,'W',32000);
         OPEN tbl_cursor;
         LOOP
              FETCH tbl_cursor into tbl_cursor_value;
              EXIT WHEN tbl_cursor%NOTFOUND;
              OPEN col_cursor(tbl_cursor_value.table_name);
              DBMS_OUTPUT.PUT_LINE( 'CREATE OR REPLACE TRIGGER' ||' ad_'||tbl_cursor_value.table_name); -- short name for audit trigger coz table name will be appended to it and result should not exceed 30 char
              DBMS_OUTPUT.PUT_LINE( 'BEFORE INSERT OR UPDATE OR DELETE ON '||tbl_cursor_value.table_name);
              DBMS_OUTPUT.PUT_LINE( 'FOR EACH ROW');
              DBMS_OUTPUT.PUT_LINE( 'BEGIN');
              v_string:='INSERT INTO'||' ad_'||tbl_cursor_value.table_name||'(';
              v_string_val:='values(';
              INSERT INTO audit_triggers_status( table_name,trigger_name,audit_flag) VALUES (tbl_cursor_value.table_name,' ad_'||tbl_cursor_value.table_name,'Y');
                   LOOP
                        FETCH col_cursor into col_cursor_value;
                        EXIT WHEN col_cursor%NOTFOUND;
                        v_string:=v_string||col_cursor_value.column_name||',';
                        v_string_val:=v_string_val||':new.'||col_cursor_value.column_name||',';
                   END LOOP;
                   CLOSE COL_CURSOR;
              v_string:=substr(v_string,1,length(v_string)-1);
              v_string_val:=substr(v_string_val,1,length(v_string_val)-1);
              v_string:=v_string||') ';
              v_string_val:=v_string_val||');';
              --DBMS_OUTPUT.PUT_LINE(v_string||v_string_val);
              DBMS_OUTPUT.PUT_LINE('IF INSERTING THEN');
              DBMS_OUTPUT.PUT_LINE('     '||v_string||v_string_val);
              DBMS_OUTPUT.PUT_LINE('END IF;');
              DBMS_OUTPUT.PUT_LINE('IF UPDATING THEN');
              DBMS_OUTPUT.PUT_LINE('     '||v_string||v_string_val);
              DBMS_OUTPUT.PUT_LINE('END IF;');
              DBMS_OUTPUT.PUT_LINE('IF DELETING THEN');
              --DBMS_OUTPUT.PUT_LINE('     '||v_string||REPLACE(v_string_val,':new.',':old.');
              V_STRING_VAL:=REPLACE(v_string_val,':new.',':old.');
              DBMS_OUTPUT.PUT_LINE('     '||v_string||v_string_val);
              DBMS_OUTPUT.PUT_LINE('END IF;');
              DBMS_OUTPUT.PUT_LINE('END '||' ad_'||tbl_cursor_value.table_name||';');
              DBMS_OUTPUT.PUT_LINE(' ');
         END LOOP;
         CLOSE TBL_CURSOR;
         COMMIT;
    END;

  • Help needed in making a login screen

    hi all,
    i need to make a login screen in flash in which a user enters
    a password and username and both are checked from an xml file. i
    need your help in making it. could anyone redirect me to some
    tutorial or if anyone can post the code here, i would really be
    grateful to you. thanks,
    gaurav

    First you need to load the xml file that contains the list of
    user names and passwords into variables using actionscript.
    Use this tutorial.
    http://www.actionscript.org/tutorials/intermediate/XML/index.shtml
    Then compare the value entered by the user with the list of
    usernames and passwords.
    But be aware:
    1>All the processing happens on the client machine
    2>Extremely insecure if you are after a secure login.
    3>and when you update the XML file it won't necessarily
    take effect immediately on all the user's machines as they may be
    using a cached version of it.
    Ideal method is to use server side validation script using
    asp, asp.net, jsp or php.

  • Help needed on making Bex version settings for RRMX

    Hi BW Gurus,
    When i make RRMX , BW 3.5 BEx is opening as default.
    But I need BI 7.0 Bex to open as default when i make RRMX,because I need to open my workbook through a portal link.I created my workbook in BI 7.0 Bex and so in BW 3.5 Bex my workbook is not opening.
    Where i should make the settings.
    I tried setting in SPRO and also in the global settings of the BI 7.0 Bex by opening it from the start menu.
    Still nothing works out.
    Can someone throw light on my problem.
    Thanks in advance
    Regards
    Sam

    Hi Sam,
    Check this out:
    /message/2274270#2274270 [original link is broken]
    /people/prakash.darji/blog/2006/07/26/troubleshoot-the-sap-netweaver-2004s-bi-frontend-installation
    R,
    Adwin

  • Help needed for making a copy of a table .

    Hi ,
    I have a table , which is consisting for nearly 20 columns .
    I want to make a Copy of that table with data or without data anything will be fine .
    Please tell me how can i make that ??
    Is there any option available for that ??
    Thank you .

    CREATE TABLE MY_COPY AS SELECT * FROM ORIG_TABLE WHERE 1=2;will create a copy of ORIG_TABLE without rows,indexes,constraints.
    CREATE TABLE MY_COPY AS SELECT * FROM ORIG_TABLE ;will create a copy of ORIG_TABLE with rows but without indexes and constraints. This would be acceptable if the table is small. Else, create an empty table (as above) and then use
    ALTER TABLE MY_COPY NOLOGGING;
    INSERT /*+ APPEND */ INTO MY_COPY SELECT * FROM ORIG_TABLE ;(Optionally, add PARALLEL Hints to the INSERT and SELECT.
    You can use Export and Import utilities to create a copy of table with options to include or exclude rows, constraints, indexes.
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Plesae help- needing to read a blob from db into bytes[]

    Hi all,
    I am having a requirement to read a blob stored in the oracle table and convert it into bytes. I am loading this table (wwv_flow_files) with APEX.
    The code under page 1 is as follows:
    DECLARE
    z number;
    y varchar2(4000);
    x varchar2(400);
    b blob;
    BEGIN
    select filename,blob_content into x ,b from APEX_APPLICATION_files where name =:P1_FILE_NAME;
    select length(convertBlobToBytes(b)) into z from dual;
    :P1_RESULT := z;
    end;
    Java code is as follows:
    import java.io.*;
    import java.sql.Blob;
    public class convertBlob {
    * @param blob
    * @return
    public static byte[] convertBlobToBytes(Blob blob) {
         if (blob==null) return null;
         try {
         InputStream in = blob.getBinaryStream();
         int len = (int) blob.length(); //read as long     
    long pos = 1; //indexing starts from 1
         byte[] bytes = blob.getBytes(pos, len);           
    in.close();
         return bytes;     
    catch (Exception e) {
         System.out.println(e.getMessage());
         return null;
    PL/SQL wrapper is as follows:
    CREATE OR REPLACE FUNCTION convertBlobToBytes(p1 IN BLOB) RETURN LONG RAW AUTHID CURRENT_USER AS LANGUAGE JAVA NAME 'convertBlob.convertBlobToBytes(java.sql.Blob) return byte[]';
    I loaded this java class and pl/sql wrapper into the database using JDEVELOPER.
    But I am getting the length of the file, as twice the size.
    For example, When I run the program which reads the file returns the length of the file as a byte array, the length is 819.
    When I pass the same file as a blob from apex, to the java program that converts blob to bytes, the length of the file is 1638.
    And hence I am getting wrong results, further in the process.
    Can you please help me? Any help is appreciated.
    rgds,
    Suma.

    Hi all,
    Can any of you please help me out?
    rgds,
    Suma.

  • HELP NEEDED - How to convert a .ram file into .aac???

    Hi
    I am downloading radio programmes and the files downloaded all have a .ram extension.
    When double clicking on the files, iTunes opens but does not put the file in the library nor plays it.
    I tried the option 'importing' and 'add to library', but no reaction from iTunes either.
    Can someone out there help???
    Thank you so much

    Mike is correct above. Use RealPlayer to play the .RAM files, and use AudioHijack to record them to AIFF or MP3.
    http://www.rogueamoeba.com/audiohijack/

  • Help needed with SQL to split huge data into two excel or text files.

    Hi,
    I have a table which has around 1850000 records. I want to split the data into two sets and import the data in .txt or execl file.
    How can i break upthe records using rownum or any thing
    select * from tablename where rownum<940000 fetched some records
    but
    when i gave select * from tablename where rownum>940000 it was not fetching records.
    Guideme

    when i gave select * from tablename where rownum>940000 it was not fetching records.try this
    select * from (select tablename.*, rownum rn from tablename) where rn >940000

  • Urgent help needed, can I restore N900 Backup file...

    i owned a N900 (now sold out)
    before selling i took backup of contacts from backup restore option in application section
    now i bought a N8 but i m not able to restore my contacts
    1. is there any way to restore them in N8?
    2. if not, can i convert them in TEXT or any readable format
    urgent help needed
    thanks in advance

    The backup procedures built into the phone are only designed for restoring to the same phone (ie: in case or data corruption, software update or repair etc.), they can't usually be used to restore to a phone with a different operating system.
    You should have backed up with Ovi Suite before selling the N900, that would have been able to restore to the N8.

  • HT1338 Macbook pro two days old...bought logic from app store...logic has installed partly each time i open it up it wants to download rest of programme then stops half way thru and gets error message 'logic is unable to continue with download' help neede

    Macbook pro two days old...bought logic from app store...logic has installed partly each time i open it up it wants to download rest of programme then stops half way thru and gets error message 'logic is unable to continue with download' help needed !

    Hello:
    I would trot back into the Apple store and have them fix the problem (or call Applecare with a warranty issue).  There is no sense in you wasting your time trying to troubleshoot things on a new computer.
    Barry

  • I need help making a pop up in a looping video...

    I have a looping aquarium with looping swimming fish. I want to be able to click the fish and they make a pop-up appear with info about them. I can't figure out the code to launch the pop-up any help? I am using CS3 and action script 2.0.

    ok i got the movie to attach by putting this code on the button
    play();
    btnClose.onRelease = function() {
       removeMovieClip('SargeantMajorInfo_mc')
    mcSargeantMajor.onRelease = addFish;
    function addFish() {
        var thisFish:MovieClip = this._parent.attachMovie("mcSargeantMajorInfo_id", "SargeantMajorInfo_mc", 10,
    {_x:randRange(50, 51), _y:randRange(50, 51)});
        thisfish.onRelease = function() {
        this.removeMovieClip();
        bugNum++;
    This is for the close button.
    btnClose.onRelease = function() {
       unloadMovie ('mcSargeantMajorInfo_id')
    got the close. Need a scale. it pops up entirely too large. any ideas?
    Message was edited by: OIDIII

  • Loops messed up. Help needed quickly

    Hi there,
    I'm in the middle of kind of an important project that has to be finished by next week and of course those are the times when software seems to fail So I need help quickly.
    Situation: the location of my apple loops seems to be messed up. I placed the "Apple Loops for Soundtrack Pro" on an external disk (since it is the largest folder) and kept the rest on my internal drive. Now, when I search my loop browser, results seem to be incomplete. I know I had a lot more drum loops before I reorganized my loops than I have now.
    So I became suspicious and as some kind of test I looked in the Library > Audio > Apple Loops > Jam Pack Symphony Orchestra folder, searched for a particular loop name (in this case "Adversary Strings"), typed it in the search menu of the loop browser in Logic and couldn't find it.
    So I took al my loop folders in the "Apple Loops" map and dragged them back into Logic. It showed "Adding Loops" and after 10 seconds (which seemed rather short to me) this was done. I searched again "Adversary Strings" in the loop browers, still couldn't find it. So I dragged ONLY the "Adversary Strings" loop in the Logic Pro loop browser and then Logic gave me a message: "Logic already has this loop, do you want to replace it?"
    But Logic doesn't have that loop! I can't find it, there's no filter on in my loop browser (I search "all loops") and I don't find some loops (it's not only the case with the "Adversary Strings") and when I want to add them I get the message that they're already in Logic...
    So I deleted all my loop indexes, re-added the loops and still no results.
    Any ideas out there to re-index these things correctly???
    Thanks!

    Hi,
    thanks for the help, but as I said in my topic, I already followed the steps suggested in "Rebuilding the Loop index" (deleting my index and dragging the apple loops folder back in the browser) and of course I already searched the forum. My question was a little more specific, so I thought it deserved a new thread.
    Eventually I solved it in a very strange manner, just by trial and error actually. When I added the whole loop folder, Logic couldn't find the loops (despite deleting the index and hoping for Logic to re-index the loops). But when I selected one loop out of a particular folder (for instance Jam Pack1) and added it, Logic added the loop, but this seemed to take a while. After that one loop was loaded, suddenly all the others that were in the same folder (Jam Pack1) were also visible again.
    I did this for every different loop folder (5 jam packs, garage band, soundtrack pro and I life) and so got back all my loops...
    Weird, but it worked
    Thanks anyhow...
    S.

  • Help needed regarding SUM keyword in an ITAB loop

    Hello,
    I am maintaining a code as given below.
    LOOP AT itab INTO totwa.
    SUM.
    ENDLOOP.
    totwa is defined as a workarea which is needed to hold the sum totals of the fields in the itab. According to the documentation of SUM, it should calculate the sum totals and should put the totals in the workarea mentioned. But somehow its not calculating the value. Could anyone please help me in resolving this issue. Please guide me with your thoughts as to what might have gone wrong.
    Note: the itab fields are of type P.
    Thanks in advance
    Sudha Naik

    Hello Suha
    According to the ABAP documentation the SUM statement is used in a specific situation:
    <b>Syntax
    SUM. </b>
    <b>Effect </b>
    <i>The statement SUM can only be specified within a loop starting with LOOP, and is only considered within a AT-ENDAT control structure. Prerequisites for using the statement SUM include using the addition INTO in the LOOP statement, and that the specified work area wa is compatible with the row type of the internal table. In addition, SUM cannot be used when the row type of the internal table itab contains components that are tables. </i>
    <i>The statement SUM calculates the component total with the numeric data type ( i, p, f) of all rows in the current control level and assigns these to the components of the work area wa. In the control levels FIRST, LAST , and outside of an AT-ENDAT control structure, the system calculates the sum of numeric components of all rows in the internal table.</i>
    I hope the following sample report will clarify the use of <b>SUM </b>and <b>COLLECT</b>.
    *& Report  ZUS_SDN_COLLECT
    REPORT  zus_sdn_collect.
    TYPES: BEGIN OF ty_s_line.
    TYPES:   key(1)    TYPE n.
    TYPES:   value     TYPE p DECIMALS 2.
    TYPES: END OF ty_s_line.
    TYPES: ty_t_itab    TYPE STANDARD TABLE OF ty_s_line
                        WITH DEFAULT KEY.
    DATA:
      gs_line       TYPE ty_s_line,
      gt_itab       TYPE ty_t_itab,
      gt_itab_coll  TYPE ty_t_itab.
    START-OF-SELECTION.
      DO 3 TIMES.
        gs_line-key = syst-index.
        gs_line-value = syst-index * '2.3'.
        APPEND gs_line TO gt_itab.
        APPEND gs_line TO gt_itab.
      ENDDO.
      gs_line-key = 4.
      gs_line-value = '5.5'.
      APPEND gs_line TO gt_itab.
      WRITE: / 'Initial list'.
      LOOP AT gt_itab INTO gs_line.
        WRITE: / gs_line-key,
                 gs_line-value.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using SUM statement with AT END OF'.
      SORT gt_itab BY key.
      LOOP AT gt_itab INTO gs_line.
        AT END OF key.
          SUM.
          WRITE: / gs_line-key,
                   gs_line-value.
        ENDAT.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using SUM statement without control structure (1)'.
      SORT gt_itab BY key.
      LOOP AT gt_itab INTO gs_line.
        SUM.
        WRITE: / gs_line-key,
                 gs_line-value.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using SUM statement without control structure (2)'.
      SORT gt_itab BY key.
      LOOP AT gt_itab INTO gs_line.
        SUM.
        WRITE: / gs_line-key,
                 gs_line-value.
        EXIT.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using COLLECT statement'.
      REFRESH: gt_itab_coll.
      LOOP AT gt_itab INTO gs_line.
        COLLECT gs_line INTO gt_itab_coll.
      ENDLOOP.
      LOOP AT gt_itab_coll INTO gs_line.
        WRITE: / gs_line-key,
                 gs_line-value.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using COLLECT statement for total sum'.
      REFRESH: gt_itab_coll.
      LOOP AT gt_itab INTO gs_line.
        gs_line-key = 0.
        COLLECT gs_line INTO gt_itab_coll.
      ENDLOOP.
      LOOP AT gt_itab_coll INTO gs_line.
        WRITE: / gs_line-key,
                 gs_line-value.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
    END-OF-SELECTION.
    Regards
      Uwe

  • Need help w/ for loop, a do loop, and a do-while loop.

    Hello I have been trying to write a program that uses a for, do, and a do-while loop, but I am having trouble. I need the program that will prompt the user to enter two numbers. The first number must be less than the second number. I need to use a "for loop", a "do loop", and a "do-while loop" to display the odd numbers between the first number and the second number. For example, if the user entered 1 and 8, the program would display 3,5,7 three different times (one for each of the loops). Please help if you can. Thanks.

    boolean2009 wrote:
    Thank all of you all for responding.Youre welcome.
    Yes this is my homework, but my major does not even involve java i just have to take the class.Not our problem.
    And yes we are suppose to have all three in one program I do not know why,So you can learn all three types of loops (there is also an enhanced for loop to learn later on).
    but I just do not understand programming nor do i really want to.Once again not our problem.
    If anybody could help it would be much appreciated. thanks.Yes, a lot of people are willing to help you. No, none of them will do it for you. What you need to do is attempt the code and when you get stuck, post your code using the code button, include error messages, indicate which lines in your code genereate those error messages and ask specific questions.

Maybe you are looking for