Pseudo code

Hi, i have never done ArrayList, and we just happened to get this big final homework, what do we look like??
anyways, could you guys help me out to create the algorithm for this??
I.     The Problem
A banking institution offers certificates of deposit (CD's) with a variety of interest rates, and maturities of 1, 3, 5, and 10 years. Interest is always compounded, daily, monthly, or quarterly.
Write a Java program that will compute the accumulated value (principal plus interest earned), at yearly intervals, of any number of such CD's. Assume that a year always consists of exactly 365 days.
Output will be a series of 10 annual reports:
1.     Reports will be in table form with appropriate column headings. There will be one row of the table for each active CD, which will include all the data along with the accumulated value and total interest earned to data.
2.     Each report will also print the total interest earned by all CDs for the current year, and total interest earned by all active CD�s to data.
3.     Once a CD reaches maturity, it will stop earning interest and will not appear in any future reports. E.g., a CD with a maturity of 5 years will appear in the reports for years one through five, but not thereafter.
II.     The CD Class
Begin by creating a class to model a CD. Each CD object "knows" its own principal, interest rate, maturity, and compounding mode (private instance variables). The class has �get� methods to return this data and a method to compute and return the accumulated value.
III.     The CDList Class
Now create a class to maintain a list of CDs. You will need methods to add a CD to the list and to print the annual report.
IV.     The Driver (i.e., "Test") Class
Your test class or "driver" class will read data for any number of CDs from a file that I will supply. Each line of the file will contain the data � principal, interest rate (as an annual per cent), maturity, and compounding mode � for one CD.
First, tokenize each line read, create a CD object from the tokens, and add it to the list. Then print the reports.
V.     Additional Specifications
1.     Your CDList class must use an ArrayList as the principal (no pun intended) data structure.
2.     Your test class is to read the data file one time only. No credit will be given for programs that read the data file more than once.
3.     Make sure your program is well documented and adheres to the style conventions discussed in class.
FORMULA:     A = p *( 1 +R/N)^N*T                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

A CD, also known as a Certificate of Deposit, works like this:
On Day 1, you deposit an initial amount called the "principal". Maybe $1000.
The maturity date is the length of time that the bank will keep your money--you can't withdraw it until then. A 3-year CD started today, April 13, 2006, could be withdrawn on April 13, 2009.
The interest rate is usually expressed as an APR--Annual Percentage Rate. Say 5.00%. If you only got interest once a year, you'd get $50 at the end of the year.
But, if you compound at a different rate that was more often than "once per year", at the end of the year, you would get more than $50. If you compounded semi-annually, you'd get 2.5% (5.0%/2 where 2=number of times per year) = $25 at the end of 6 months. Then, at the end of the year, you'd get 2.5% of the balance of $1025, or $25.63 (rounded from $25.625). So, you'd have $1050.63 -- gained $0.63 by compounding semiannually instead of yearly. Quarterly would be 1.25% = 5.0%/4 every quarter, and you'd end up with even more at the end of the year.

Similar Messages

  • To build dynamic SQL Query using some conditions: Pseudo code required

    Hi,
    I have a requirement where in i have to build a dynamic query based on one count.
    Some details on requirement:
    1) It's a Proc where i need to return some columns
    2) There are some fix set of columns
    3) Based on one Count column, i have to decide the rest of the columns.
    Consider there is an employee who can work on 'N' number of assignments.
    For a particular employee i have to return all the predefined details of assignments like:
    1) Assignment Name
    2) Assignmanet Id
    3) Assignemnt Start Date
    4) Assignment End Date
    This 'N' can vary from employee to employee. Based on which i have to return my result set. For instance if employee has 3 assignemnts, i have to return Fix columns( employee info) + (3*4) columns. Similarly if the employee has 4 assignments, i will be returning Fix columns + (4*4) columns.
    Certainly, the Employee ID is coming as an I/P parameter.
    The source table is a vertical table having all details of the employee assignments.
    Can anyone help me in coding this proc with the help of some pseudo code?

    Do you mean you need something like this to be executed dynamically for some known n := max(count(assignment_id))
    NOT TESTED !
    select e.dept_id,e.emp_id,e.epm_name,
           substr(x1,1,instr(x1,';',1,1) - 1) assignment_name_1,
           to_number(substr(x1,instr(x1,';',1,1) + 1,instr(x1,';',1,2) - instr(x1,';',1,1) - 1))) assignment_id_1,
           to_date(substr(x1,instr(x1,';',1,1) + 1,instr(x1,';',1,3) - instr(x1,';',1,2) - 1)),'yyyymmdd') assignment_start_date_1,
           to_date(substr(x1,instr(x1,';',1,1) + 1,instr(x1,';',1,3) + 1)),'yyyymmdd') assignment_end_date_1,
           substr(x2,1,instr(x2,';',1,1) - 1) assignment_name_2,
           to_number(substr(x2,instr(x2,';',1,1) + 1,instr(x2,';',1,2) - instr(x2,';',1,1) - 1))) assignment_id_2,
           to_date(substr(x2,instr(x2,';',1,1) + 1,instr(x2,';',1,3) - instr(x2,';',1,2) - 1)),'yyyymmdd') assignment_start_date_2,
           to_date(substr(x2,instr(x2,';',1,1) + 1,instr(x2,';',1,3) + 1)),'yyyymmdd') assignment_end_date_2,
           substr(xn,1,instr(xn,';',1,1) - 1) assignment_name_n,
           to_number(substr(xn,instr(xn,';',1,1) + 1,instr(xn,';',1,2) - instr(xn,';',1,1) - 1))) assignment_id_n,
           to_date(substr(xn,instr(xn,';',1,1) + 1,instr(xn,';',1,3) - instr(xn,';',1,2) - 1)),'yyyymmdd') assignment_start_date_n,
           to_date(substr(xn,instr(xn,';',1,1) + 1,instr(xn,';',1,3) + 1)),'yyyymmdd') assignment_end_date_n
      from (select e.dept_id,e.emp_id,e.epm_name,
                   max(decode(rnk,1,x)) x1,
                   max(decode(rnk,1,x)) x2,
                   max(decode(rnk,1,x)) xn
              from (select e.dept_id,e.emp_id,e.epm_name,
                           a.assignment_name||';'||to_char(a.assignment_id)||';'||
                           to_char(a.assignment_start_date,'yyyymmdd')||';'||to_char(a.assignment_end_date,'yyyymmdd') x,
                           dense_rank() over (partition by e.dept_id,e.emp_id,e.epm_name order by a.assignment_id) rnk
                      from employees e,assignments a
                     where e.emp_id = a.emp_id
             group by e.dept_id,e.emp_id,e.epm_name
           )Regards
    Etbin

  • Pseudo code for DOM parsing a local XMl file

    HI all,
    1)     Can any body please provide me the JAVA pseudo code for parsing xml document from local mcahine and create another xml document in another location in loca machine with small transofrmations ? (JAVA mapping using DOM parsing tehnique using an xml file in loca machine using NWDS).
    2) Provide me with the links that can help me out to work with
    JAVA mapping using DOM
    Thanks,
    Ram.

    Hi,
    Have a Search in SDN with Keywords JAVA Mapping, & will get lot of stuff
    Implermenting JAVA Mapping in PI
    Implementing a Java Mapping in SAP PI
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/400ee77e-f9d6-2a10-2b8c-99281a4dcf6b
    Regards
    Seshagiri

  • Help with this pseudo code

    Hello all,
    Can anyone help me generating a pseudo code for this? I have created the program but I have no idea how to write the pseudo code.
    Thanks,
    Roddy
    There are 3 button:
    “Program”
    “Run”
    “Clear”
    Functionality:
    Control panel starts by displaying “Ready”.
    If you press “Program”, then you go
    into the programming mode, which displays “Programming”, and where
    you can modify two variables: a bool ‘InAutoMode’, and a float
    ‘SetPoint’. In Auto mode, ‘SetPoint’ must be set above
    0. In manual mode, ‘SetPoint’ is ignored. After programming in the
    variables, pressing “Clear” will make it display
    “Ready” again (pressing “Clear” at any time will make
    it display “Ready” again).
    If you instead press “Run”, it will
    check to see if the programming is valid (i.e. ‘SetPoint’ is
    greater than 0 if you are in Auto mode, always valid in manual mode). If
    the
    programming is not valid, then it displays “Programming Invalid”
    until you press “Clear” or “Program”. If the
    programming was valid, then it checks to see if you are in Auto mode. If
    in
    manual mode, then it displays “Running” and you are finished with
    the start process. If you are in Auto mode, then it prompts the user
    with the
    following display “Open Valve”. The user then opens the valve and
    presses the “Run” button. If the valve was opened properly, then it
    displays “Running” and the start process is finished. If the valve
    wasn’t open when the “Run” button was pressed last, then it
    prompts the user again, displaying “Open Valve”.
    Solved!
    Go to Solution.

    START
    Display = “Ready”
    If PROGRAM button
    Then, Programming Mode
     Display = “Programming”
     Prompt for AutoMode?
      Yes, AutoMode
       InAutoMode = True.
       Prompt SetPoint = ?
        While entry,
         If Clear button,
         Then Return START
         Else SetPoint entered
      No, Manual Mode.
    If CLEAR button
    Then Return START
    If RUN button
    Then, Check Programming
     If AutoMode
     Then, Check SetPoint
      If SetPoint <= 0
       Then, Display = “Programming Invalid”
        Wait indef for PROGRAM or CLEAR buttons
       Else Programming Valid.
        Loop:
        Prompt Open Valve?
        Yes
         Wait for RUN or CLEAR button
         If RUN, Then Display = “Running” & END
         Else If CLEAR, Return START.
        No, then re-loop.
     Else Manual Mode
      Display = “Running”
    END

  • Algorithm or pseudo code sought for getting the latest last modified time..

    Hi I need to write a program in java that lists the latest last modified time among the files in folders and its subfolder and also gets the size of the folder. In my case, average folder size is 9 GB. Could you please suggest any algorithm to achieve this?? I tried to implement it by gathering last modified times from folders and its subfolders recursively and storing the info in Vector and finally
    getting the max of the last modified times but it was horribly slow and memory hogging.

    Remove the part that stores the data in a Vector. You don't need to store any data to add up a series of numbers. And you don't need to store any data to find the largest of a series of numbers either. Just scan the directory recursively as you are already doing and keep track of the sum of the sizes and the max of the last-modified dates.

  • SPAD define pseudo printer to start ABAP code

    Hello,
    is it possible to define a pseudo printer which starts abap code ?
    During the ABAP code we want to do different things with the spool. Maybe convert to another format PDF/RTF, save to a destination,.....
    Or do you know an enhancement that we can use. My idea is to define a printer called SCRIPT. In the enhancement we check if this printer is used. If so we call a function module with our special code. At this time the spool request should already be written so we can use it for the different conversions.
    Thanks
    Arnfried

    Hi,
    Yes, it is possible to convert the SPOOL to PDF and we have it in our environment. The spool gets converted to PDF and get stored in physical location of server and we allowed the read only access to our functional folks.
    However, I am not sure whether they are using Pseudo Code.
    Please check below links
    Convert spool to pdf and send in email sometimes attachment duplicated.
    Convert spool to PDF and save it to the local drive
    Thanks,
    Sravanthi

  • How to implement this code in labview?

    How do implement this pseudo code in labview? Please keep in mind "a" and "c" in the code below ARE VARIABLES
    for i =0 to i=maxvalue
           if i <= a 
               output = output2
           else if i > a AND i<=c
               output = output2
           else if i < c 
               output = output3
           else i = d
               output = output4
    I understance i can use a case structures and modify the label, but i do not know how to make the label dependent on a variable value. 
    Thanks 

    Try an array of boudaries and use threshold array. See this old example:
    Now just iterate over an array of values using a FOR loop.
    LabVIEW Champion . Do more with less code and in less time .

  • How to add new codes into SAP Query/Infoset

    Hi Experts,
    First time working with SAP Query.
    I need to enhance an existing Query to add a new field into a report.  I have added new tables into this Infoset and joined my new  tables with existing tables and able to extract the new fields out on the report.  But here are my problems:
    Example of original output:
    X88888 500000
    X99999 400000
    Example of new output after adding my 2 new tables to get 1 new field to output:
    X88888 50000  01/08/2009
    X88888 50000  01/25/2009      <--- for X88888 customer, I want only this record w/ latest date to be output
    X88888 50000  01/22/2009   
    X99999 40000  03/09/2009
    X99999 40000  04/18/2009
    X99999 40000  04/19/2009      < -- for X99999, I want only this record w/ latest date to be output
    Where/How i can add the code to control this logic so that only 1 record per customer with the highest date can be output.  I looked at the query program and it looks very confusing and hard to understand.
    Please advise,
    Thanks,
    Sam

    Hi Sam,
    Instead on adding new table/tables , better way to use Direct Read from your single table.
    Please read the below steps to suffice your requirement.
    Assumption: Let your original table be A and second table is B.
                            Tables A and B are having field X1 and X respectively, using these fields, they can be joined.
                             You want field date1 of table B.
    Infoset Changes:
    1. Go to SQ02 (Enter Infoset name, click on Change button)
    2. Create an extra field E_date of type date (Sy-datum), by clicking on 'Extras' (F5) button.
    3. Select that field in one of the field group of your Infoset.
    4. Click on Code Icon (Shift+F8) displayed on application bar, you will be getting lists events in 'Code section'.
    5. In Data Section , declare an internal table like below code (here pseudo code)
    data: begin of itab_date occurs 0,
                       date1  like B-date1,
                       end of itab_date.
    6. In Recod processing Event write the following code.
    CLEAR itab_date.
    CLEAR E_date.
    SELECT date1 FROM B into table itab_date                           " Retrieving date field from table B
    WHERE X = A-X1.
    Sort itab_date by itab_date-date1  DESCENDING.                 "Sort internal table B in decendind order on date1
    READ TABLE itab_date index 1.                                            "Read first record of interanal table
    E_date  = itab_date-date1                                                      "Assigning top most date of internal table into field E_date.
    7. Generate the Infoset
    Query changes
    1.Go To SQ01 (in a new session),
    2.Give your Query name, click on change button, and select that field group in which you have added extra field.
    3.Select extra field.
    4.Go to basic list to select that field in your O/p list.
    5.Click on Test button, and see if you are getting desired result.
    Please let me know if you need further details.
    Regards,
    Dinesh

  • Doubt in code....

    Hi,
    I have following doubt. I am using a BAPI to get details regarding particular Object number. The list of object numbers are in internal table it_tab
    Loop at it_tab.
    Call Function 'ZCUSTOM'
    EXPROTING
    NUMBER = IT_TAB-NUMBER
    TABLES
    TAB1 = TAB1[]
    TAB2 = TAB2[]
    TAB3 = TAB3[].
    Now the Data from TAB1 table, TAB2 table and Tab3 table should be written in a flat file1, fil2 and file3.
    My doubt, is when the next number is passed to BAPI ZCUSTOM while looping, the data tables for that next number should be written in respective files but on next line (keeping the previous data intact)
    So,
    Data returned when NUMBER1 :- TAB1 - AAA,11; TAB2 - BBB,12; TAB3 - CCC,13
    Data returned when Number2 :- TAB1 - YYY,10; TAB2 - ZZZ,09; TAB3 - TTT,08
    Flat file1 Content should be:
    AAA,11
    YYY,10
    Flat file2 Content should be:
    BBB,12
    ZZZ,09
    Flat file3 Content should be:
    CCC,13
    TTT,08
    How can I achieve this ?
    Regards,
    Rajesh.

    Ok,  so again, I would build internal tables for you files.  Then when done in the LOOP and calling the custom BAPI,  simply download the internal tables to the PC once.  see the pseudo code below.
    Loop at itab.
        call function 'ZCUSTOM'
        append lines of ttab1 to itab1.
        append lines of ttab2 to itab2.
        append lines of ttab3 to itab3.
        append lines of ttab4 to itab4.
    endloop.
    call function 'GUI_DOWNLOAD'
             tables
                   data_tab   = itab1.
    Regards,
    Rich Heilman

  • Java code to pseudocode

    Hi, i have written this program but I also need to submit the pseudo code for it and i'm not really sure how to do this.
    Here is a sample of the code I have written, if someone could please get me on the write track so i can write the pseudocode for the whole thing that would be great.
    Java code;
    import TerminalIO.*;
    public class MyFutureTIO
    KeyboardReader reader = new KeyboardReader();
    ScreenWriter writer = new ScreenWriter();
    public void run()
    // global instance variables
    char keepdepositing='N';
    double deposit, rate, balance=0 , withdrawals=0, interest=0, withdrawalyears=0, finalbalance=0, counter=0;
    int age, years=0, continuedyears=0;
    // Initial inputs to be able to determine when the loan matures
    writer.print("Amount deposited per month: ");
    deposit = reader.readDouble();
    writer.print("Your age: ");
    age = reader.readInt();
    writer.print("Interest rate: ");
    rate = reader.readDouble();
    deposit = deposit*12;     // This is the yearly deposit amount
    rate = rate/100;          // To convert the rate to a decimal
    if (age >=60){      // This if statement is used when the age is over 60 years
    years = 0;
    for (int i = 0; i < years; i++)
    balance = (balance + deposit) * (1 + rate);
    if (counter % 10==0)
    rate = rate + 0.01;
    counter++;
    writer.print("As you are 60 or older, your account is at maturity\n");
    writer.print("Your account has a $" + balance +", but you can choose to deposit money from this point onwards\n");
    writer.print("Would you like to start depositing?\n");
    keepdepositing = reader.readChar();          
    if (keepdepositing == 'N'){  //the user doesn't want to open an account
    writer.print("As you don't want to start depositing and your account has a $0 balance no account has been opened\n");
    else if (keepdepositing == 'Y'){   //the user wants to start depositing into the account
    writer.print("How many years would you like to deposit for? ");
    continuedyears = reader.readInt();
    for (int i = 0; i < continuedyears; i++)
    balance = (balance + deposit) * (1 + rate);
    writer.print("Your balance at this time will be: $" + balance);
    interest = (balance*rate)/12;
    writer.print("Your account will earn $" + interest + " per month in interest after this point\n");
    writer.print("How much would you like to withdraw per month? ");
    withdrawals = reader.readDouble();
    writer.print("How many years would you like to withdraw for? ");
    withdrawalyears = reader.readDouble();
    for (int i = 0; i < withdrawalyears; i++) // do i need the counter here?
    finalbalance = (balance - withdrawals*12)*(1 + rate);
    writer.print("After this time your account will have a balance of: $" + finalbalance + "\n");
    }

    Yeah i did write this program, and i have actaully started to write the pseudocode but it doesn't seem write, i'm not sure if i'm putting to much in or not enough.
    All of my notes say not to use any java key words in pseudocode, and this is confusing me a bit.
    This is what I started to write for the psuedocode;
    Get deposit
    Get age
    Get rate
    If (age >= 60
    years = 0
    for (int 1=0;
    Balance = (balance + deposit)*(1+rate)
    Print As you are 60 or older, your account has reached maturity
    Print Your account has a $0 balance, but you can choose to deposit money from this point onwards
    Print Would you like to start depositing?
    if (keepdepositing == �N�)
    Print As you don�t want to start depositing and your account has a $0 balance no account has been opened�
    else if (keepdepositing == �Y�)
         Print How many years would you like to deposit for?
         Balance = (balance + deposit) * (1 + rate)
         Print Your balance at this time will be $balance
         interest = (balance*rate)/12
         Print Your account will earn $interest per month after this point
         Print How much would you like to withdraw per month?
         Print How many years would you like to withdraw for?
         final balance = (balance � withdrawals*12)*(1 + rate)
         Print After this time your account will have a balance of $finalbalance

  • Check which column in database table is updated without hard code

    Hi ,
    I have a requirement to detect if there is a particular column in the database table is updated , and this column name is found in mapping table ( business logic ) , it will do an insertion to another special table.
    My idea is to introduce a trigger before update or delete on this table
    However , i would like to make it as dynamic as possible
    i dont want to use things as below in trigger if possible
    1. if ( old.name <> new.name ) then {
    if( 'name' is inside the mapping table ) {
    // do some insertion
    I want things like
    2. if ( there is a column updated on this table ){
    1. select column name and updated value that is updated
    2. if the column name that is updated is inside the mapping table {
    // do some insertion
    I am not really sure if the pseudo code listed in no 2 is achieveable in oracle using simple pl/sql or sql ?
    if possible , how to do it ?
    Thanks

    Hi,
    Check the link given below
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adg13trg.htm
    and search for
    IF UPDATING THEN*009*

  • Possible to have Function to return Flex Code (ie: mx:Text text="hello world"/ )???

    I'm new to Flex and need to special case some functionality
    using XML...not all feed items come with images so I thought the
    best way to handle this was to pass each feed item to a function
    that can use if statements and then return the appropriate code
    back to the user interface:
    For example printFeed() would would return something like the
    following if there were an image:
    <mx:Text text="{XML.channel.currentItem.title}"/>
    <mx:Image source="{XML.channel.currentItem.img.url}"/>
    OR the following if there were NOT an image:
    <mx:Text text="{XML.channel.currentItem.title}"/>
    Is this the correct approach? Also, what is the correct way
    to invoke printFeed? {printFeed("..."))} throws parsing errors.
    THANK YOU!
    -Cole

    "Cole_62" <[email protected]> wrote in
    message
    news:gd2q5r$f08$[email protected]..
    > no i dont think this will work because i need to iterate
    through each
    > <item> in
    > the XML...below is an exmaple of possible tree structure
    of the XML:
    > channel
    > -->item1
    > ----->title
    > ----->imgs
    > --------->imgUrl
    > --------->imgUrl
    > -->item2
    > ----->title
    > ----->imgs
    > ---------->imgUrl
    > -->item3
    > ------>title
    > ------>imgs
    > ----------->(no imgs)
    >
    > i thought to handle this using something like the
    ATTACHED CODE below:
    >
    > ...i need to be able to go through each <item> and
    <imgUrl> (because i
    > dont
    > know how many (if any) there are!) sorry if my PHP
    background shines
    > through!
    >
    > THANKS!
    >
    > <mx:Repeater id="feed"
    dataProvider="{XML.channel.item}">
    > <mx:HBox>
    > <mx:Text text="{feed.currentItem.title}"/>
    > <mx:Repeater id="item"
    dataProvider="{feed.currentItem.imgs}">
    > <!-- PSEUDO CODE I NEED HELP RESOLVING:
    > if ("{item.currentItem.imgURL}")
    > -->
    > <mx:Image source="{item.currentItem.imgUrl}"/>
    > </mx:Repeater>
    > </mx:HBox>
    > </mx:Repeater>
    How bout
    <mx:Repeater id="feed"
    dataProvider="{XML.channel.item}">
    <mx:HBox>
    <mx:Text text="{feed.currentItem.title}"/>
    <mx:Repeater id="item"
    dataProvider="{feed.currentItem.imgs}">
    <mx:Image
    source="{item.currentItem.imgURL.length()>0?item.currentItem.imgURL:null}"
    includeInLayout="{item.currentItem.imgURL.length()>0}"/>
    </mx:Repeater>
    </mx:HBox>
    </mx:Repeater>

  • How to process AT END OF command for company code and transaction number.

    Hi,
      I  have report with selection screen with company code and key date.  Based ON key date given I should calculate Accrued interest for all transaction with in each company code.
        When I run report with one company code it works fine. But when I run with multiple company codes the amounts are messed up.
    I am getting all company codes with transaction details in to ITAB1 like this below, and PERFORM get_processdata. has my calculation for interest rate.
      SORT itab1 BY company_code  transaction.
      LOOP AT itab1 INTO wa_tab1.
        itab2 = wa_tab1.
        APPEND itab2.
        AT END OF transaction.
           PERFORM get_processdata.
        ENDAT.
      ENDLOOP.
    Thank you.

    Hello,
    You need to use AT New event to clear your total variables.
    AT New - this will go for first time also but we want to clear variables from second time. it requires flag to stop going it first time
    Pseudo code:
    clear: flag.
    Loop at itab1 to itab2.
    At New.
    if flag eq c_x.
    clear: <total variables>, intenal tables.
    move c_x to flag.
    endif.
    tab2 = wa_tab1.
    APPEND itab2.
    AT END OF transaction.
    PERFORM get_processdata.
    ENDAT.
    ENDLOOP.

  • Launch Listener Problems in Server Side Backing Bean Code.

    Hi All,
    I am construcing an Table of Rich Command Links in the backing bean.
    For each command Link i launch a dialog through the backing bean.
    I have added a Launch Listener for each Command Link.However i see that although the dialog gets launched the launch Listener doesnt get invoked . The invocation of the launch listener is critical for me to pass information to the child dialog.
    Here's the pseudo Code
    tableConstructor ()
    CommandLink.addActionListner (mylistener);
    CommandLink.addLaunchListener (mylaunch);
    CommandLink.setPartialSubmit (true);
    CommandLink.setUseWindow (true);
    richColumn.add (CommandLink)
    // Actual Code of listener
    mylistener (actionEvent) {
    // Set the properties for the window to be launched.
    Map winProps = new HashMap();
    winProps.put ("height" , "1000");
    winProps.put ("width" , "1000");
    // End of setting properties for the window to be launched
    FacesContext ctx = FacesContext.getCurrentInstance();
    ViewHandler viewHandler = ctx.getApplication().getViewHandler();
    UIViewRoot dialog = viewHandler.createView(ctx,
    "/A.jspx");
    Application app = ctx.getApplication();
    AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
    afContext.launchDialog(dialog, null,
    actionEvent.getComponent(), true, winProps);
    myLaunch () {
    System.out.println ("I Am here);
    I am here is not getting printed.. Any idea how to make the launchListener work in this scenario...
    Any help will be great.
    Thanks
    Karthik

    Hi,
    I can reproduce this. I am still not sure if this is supposed to work this way. However, since I don't know better, I filed a bug.
    Frank

  • BAdI code review - for perfomance improvements

    Hi,
    I've a BAdI implementation to enhance a BW datasource which will extract additional fields for the datasource. The pseudo code for the extractor is as below. Can some one please review and let me know the opportunities (which I'm sure there will be) to improve the performance of the BAdI?
    Thanks a lot.
    Regards,
    Sri.
    Pseudo Code:
    loop at ct_data assigning <ls_data>.
      case <on_a_field>.
        when <value_1>.
           if <condition1>.
           elseif<condition2>.
           elseif<condition3>.
           endif.
        when <value_2>.
           <execute a function module by exporting value_2>        
           if <condition1>.
           elseif<condition2>.
           elseif<condition3>.
           endif.
      endcase.
    <extraction logic for other fields continue>
    endloop.

    Hi
    Two suggestions:
    First, use tcode ST05 to do traces and diagnose the bottleneck.
    Second, tcode ABAP_TRACE, go to tips and tricks, and in internal tables /  using the assigning command see samples and run them to evaluate the times. But in my opinion you are doing well.
    I hope this helps you
    Regards
    Eduardo

Maybe you are looking for

  • I need to send this email now!

    My story starts wih me trying to scan a picture from the printer to my computer. The printer scans: Photo to email. After ten minutes a new message window pops up with the scanned picture in it. I tried to copy it and paste it into my other email so

  • Error Parsing Structure File

    When I try to access a project that is in RoboSource Control, I keep getting this error "Error Parsing Structure File". Does anyone know what this means and how to fix it? Thanks.

  • Synchronizing in LR

    I am smart but you would not know it from how my LR is screwed up. First, I input my images into LR from a card reader and on import back them up to 2 external hard drives. I use Folders and Sub-folders to organize my images. First, my images that sh

  • Image preview thumbnails fail to load

    I open a folder full of tifs, they all render their thumbnails immediately, I open the folder within that and some render but the rest freeze. Why is this? On my old Windows machine the same folder all renders instantly, that machine is 4 cores and 8

  • Recurring Instances not scheduling on its own after the SP4 installation

    Hi, We have installed the BO XI R2  SP4 2 days ago. Some of the recurring instances are not scheduling on its own. Environment : Clustered - 3 servers with CMS running on 2 servers. We did not do the install live. We disabled/stopped all the services