Painting graph from loop?

* I am having a hard time trying to figure out why this is not working
* the input file is single line entries (these numbers are from the file and the format)
* 1
* 891.67
* 1968.12
* 198031.88
* 2859.79
* 200000
* 5.35
* nl
* 2
* 882.89
* 1976.9
* 196054.98
* 2859.79
* 200000
* 5.35
* nl
* 3 and so on, depending on what the other program is writing.
* could someone please tell me why this is not painting as I expected it should?
* right now it only paints the grid hash marks. What did I do wrong?
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.io.*;
import javax.swing.JOptionPane;
public class graph extends Frame
     Line2D lineu = new Line2D.Double(20, 40, 20, 300);
     Line2D linel = new Line2D.Double(370, 300, 20,300);
     Stroke drawingStroke = new BasicStroke(2);
     public static String[] aa;
     public void paint(Graphics y)
          Graphics2D graph1 = (Graphics2D)y;
     graph1.setStroke(drawingStroke);
     graph1.setPaint(Color.black);
     graph1.draw(lineu);
     graph1.setPaint(Color.black);
     graph1.draw(linel);
     for(int x = 20; x < 370; x++)
          Line2D hash = new Line2D.Double(x, 300, x, 305);
          graph1.draw(hash);
          x = x + 5;
     for(int x = 45; x < 300; x++)
          graph1.setPaint(Color.black);
          Line2D hash2 = new Line2D.Double(15, x, 20, x);
          graph1.draw(hash2);
          x = x + 5;
     try
               File file = new File("temp.sto");
               FileInputStream FIS = new FileInputStream(file);
               BufferedReader BR = new BufferedReader(new InputStreamReader(FIS));
               aa = new String[3];
               for (int i = 0; i < aa.length; i++)
                    aa[i] = BR.readLine();
               for (int j = 0; j < aa.length; j++)
                         int month = Integer.parseInt(aa[j]);
                         int monthI = Integer.parseInt(aa[j+1]);
                         int monthPrin = Integer.parseInt(aa[j+2]);
                         int amtlft = Integer.parseInt(aa[j+3]);
                         int monthp = Integer.parseInt(aa[j+4]);
                         int totloan = Integer.parseInt(aa[j+5]);
                         int intval = Integer.parseInt(aa[j+6]);
                         System.out.println(aa[j]);
                              graph1.setPaint(Color.red);
                              Line2D monthID = new Line2D.Double(month+20, monthI, month+20, monthI + 5);
                         graph1.draw(monthID);
                         graph1.drawString("Monthly Interest", 50, 50);
                         graph1.setPaint(Color.green);
                              Line2D monthPrinD = new Line2D.Double(month+20, monthPrin, month+20, monthPrin + 5);
                              graph1.draw(monthPrinD);
                              graph1.drawString("Monthly Principle", 50, 60);
                              graph1.setPaint(Color.red);
                              Line2D amtlftD = new Line2D.Double(month+20, amtlft, month+20, amtlft + 5);
                              graph1.draw(amtlftD);
                              graph1.drawString("Amount Left", 50, 70);
                              graph1.setPaint(Color.black);
                              graph1.drawString("The full loan of " + totloan + " with " + intval + "% interest", 50, 80);
                              graph1.drawString("has a monthly payment of " + monthp, 50, 90);
                         j = j + 6;
                         if (aa[j+8]=="zzz" || aa[j+8] == "")
                              j=100000000;
     }catch (FileNotFoundException e)
               JOptionPane.showMessageDialog(null, "The file is not where you think it is. I can not continue.");
               System.exit(0);
          }catch (Exception e)
     public static void main(String args[])
          Frame frame = new graph();
     frame.addWindowListener(new WindowAdapter()
     public void windowClosing(WindowEvent we)
          System.exit(0);
     frame.setSize(400, 400);
     frame.setVisible(true);
}

Please post code in code tags and indent it properly.

Similar Messages

  • Graph from For Loop

    hello,
    I have a problem with one of my applications I am developing.
    I calculate a timeSeries and I need to graph it on linechart. The timeSeries is calculated through an iteration of For Loop
    I have tried to write in an array, but it didn't work since I can only take one value.
    I tried to write the value in a datagrid but that didn't work either!
    not because it is impossible, but because I am an idiot
    http://alimsyed.com

    Hi Dimitris,
    Thanks for the post and I hope your well today.
    You can achieve this by using a reference of the graph from the main VI, pass it to the subVI vi and use a property node to update the graphs value. 
    I have attached an edit of your code to show this, labVIEW 8.6. 
    Kind Regards
    James Hillman
    Applications Engineer 2008 to 2009 National Instruments UK & Ireland
    Loughborough University UK - 2006 to 2011
    Remember Kudos those who help!
    Attachments:
    mainVI.vi ‏9 KB
    subVI.vi ‏13 KB

  • Pull out individual graph from a multiple graph waveform?

    Hi all, is there a way of parsing out individual graphs from a waveform based on a given description?  I know that the waveform only has the Y, t0, and t attributes, but there must be a way of doing this.  
    The user inputs a cluster of data per channel.  What I'd like to be able to do is isolate a single graph from the waveform based on the TAG name of the channel, and show this on a separate graph.
    I've attached screen shots shots of the code where the plots are generated, and of the user input cluster.
    I'd greatly appreciate any help.  THANKS!
    LabVIEW 2012
    Windows 7 64-bit
    Solved!
    Go to Solution.
    Attachments:
    Settings_screenshot.jpg ‏28 KB
    blockpanel_screenshot.jpg ‏116 KB

    Hi
    Attached is the picture of how i modified your code. In the DAQ Loop case where you are creating task, use your Tag name as the channel name
    In the Main Processing Loop, insdie the New DAQ case, you are reading the waveform and using a case structure. By using the Get Attribute function and reading the value of NI_ChannelName, you can get the task name of each channel read/acquired.
    I had just left an indicator at the output for the Channel name. you can use it for a case strucuture or in any which way you like.
    Let use know if this works.
    Attachments:
    waveform attribute.PNG ‏65 KB

  • I can't stop my song from looping back to the beginning

    I have created some backing tracks for a swing band that has lost its rhythm section and have to date played them back (via a big speaker) using Logic pro X on a macbook air.
    I want to use my ipad instead as it's smaller and handier when you have to juggle with ipad, an instrument, sheet music and mutes etc..
    I've succeeded in copying tracks exported from Logic into GarageBand iOS version using the "Export All Tracks as Audio Files" option.  I imported them as individual tracks into GB and they play back just fine.  However...
    I can't stop them from looping back and starting again, which in a rehearsal environment I DO NOT need!  I assume this is because I had to import them using the loop-loading tool - set to "audio" - in GB iOS.  Can anyone help me get round this please.  Or is there an iOS DAW that would do this job instead of GB?
    Many thanks in advance.

    Looks like playback for GB on iOS always loops the current section or the whole song. Export the songs to iTunes and you can play them as you want, probably putting each in its own playlist so it is easier to play once then stop, or by adding long silences between tracks that you can then skip when you are ready.
    tt2

  • How do I stop mail from looping the same emails into inbox?

    How do I stop mail from looping the same emails into the inbox over and over again? It does the same thing with deleted messages that keep showing up again and again in multiples even after deleting them. I have made sure my server settings in all email accounts are set to delete immediately once I delete them on my MacBook Pro/IPhone. This issue has severely compromised the efficiency of Mail on my MacBook. Thanks for any help you're able to give me.

    I have tried that but it does not fix the problem.
    The "card" group is not a previous recipient.
    Although not available for editing in Contacts, it is a valid group showing up in the "To" field of Messages, Mail, or any app using the AddressBook.
    Its associated file is automatically created in:
    ~/Library/ApplicationSupport/AddressBook/Sources/<hexaFolder>/MetaData/<hexa>ABG roup.abcdg
    This is why it also shows up in the Spotlight results...
    If I manually remove this file, it gets recreated...
    If I turn off the syncing through iCloud, the entry gets deleted. If I turn it up, it comes back!

  • How to show the graphs from 16channels or more at one time

    Hi.
    I am using labview with pci-6031e board.
    Is there a efficient way to show the graph from 16 channels which acquire the temperature with thermocouple, or to show just one specific graph that I want.
    I followed these steps.
    1.in examples from the labview program,I`ve used the source of acquring the multi-temperatures.
    2. used the index array to devide each temp. and connected this to graph in the case structure.
    but it requred too many space,and doesn`t look good.
    Thank you .

    You can set a state machine doing the following: Put 17 controls, one for each temperature and one for all. Inside the case structure, wire one case for each temperature, bundling x and y arrays into a cluster, and then building an array (of 1 element). In the all case bundle each temperature and build an array of all. Put the array output into the graph... and it's done.
    Hope this will feed your needs, and if you want an example... just ask

  • How to Add points on graph from a text File ?

    Hello and Good Morning to all,
    I have a text file with my data and i read them by using the Read From Spreadsheet File VI,i enter the path where my file is saved,read all rows delete the first row because i don't need it and my problem is that in the text folder i have specified date and time which i want to be my X axis in my Graph and Y axis to be the Vout that means i have to use a XY Graph ,below you can see my data:
    Date        time              Vout  
    3-9-2012 7:45:37            2,35
    3-9-2012 7:45:39            2,75
    3-9-2012 7:45:41            3,15
    3-9-2012 7:45:43            3,50
    1) Is the text file format compatible with the input of the graph command?
    I do not find a LabVIEW function which convert the “date” from the text file (example:3/09/2012 07:45:37) into a compatible format for X axis for the graph.
    (Conversion from string format => into a “date and time” format)
    Can someone please provide a code solution for this problem?

    Hi gstathatos,
                             See all the threads given below:-
                             http://forums.ni.com/t5/LabVIEW/Add-points-on-XY-graph-with-time-step-not-constant/td-p/1507066
                             http://forums.ni.com/t5/LabVIEW/Add-points-on-graph-from-a-text-File-Date-and-time-include-in/td-p/1...
                             http://forums.ni.com/t5/LabVIEW/read-double-waveform-text-file-and-and-plot-graph-in-labview/td-p/10...
    Thanks as kudos only

  • Migrating Graphs from Reports 6i to Reports 10g

    While migrating Graphs from Reports 6i to Reports 10g is there a possibility of maintaining the same graphs rather than recompiling them using the Graph Wizard of Reports 10g. I have hundreds of reports with graphs and will be an uphill task to re-draft all the graphs. Kindly suggest alternatives to overcome this dead-lock.
    Thanx in advance
    Sridhar

    Hello Sridhar,
    10g is not supporting Graphics builder. So you got to create/insert all these 6i graphs in 10g. Open the 6i report and compile in 10g. It will give you file not found error. Delete the graph area in the layout editor.
    Then drag the chart icon and drop in layout. Redesign again. Offcourse it is not fun. But there is no way.
    Also there are tons of bugs in 10g report Graphs. You won't find some cool features like Others % option in the pie slice provided by Graphics bulider. You got to change graph.xml file for some of the features. Even the graphs looks ugly in 10g. Migrating graph reports is really frustrating in 10g. But we have no choice. Recently we migrated to 10g. Becareful with matrix reports. 10g keeps on getting crashed when ever we develop matrix report. GOD knows the reason.
    But 10g has some very very good features like Distribution
    Cheers.
    Ram.

  • Graphs from xMII to SAP R/3 Enterprise 4.7

    Hi Experts, 
    We are having an requirement to display a graph from xMII to SAP R/3.
    The graph is based on the data collected from the historians.
    Is it possible to display the graph in SAP R/3 through some RFC ?
    Else, Can we pass on all the data from xMII to a z-table in SAP R/3 and generate graphs ?
    Please let me know your suggestions.
    Regards,
    Vivek K

    There is a GUI control for displaying web pages within SAPGUI. Sorry, I can't recall the object

  • Why do I get jumbled text when pasting a graph from Excel (mac 2011) into Illustrator cs6

    The Goal: To copy a graph from Excel (mac 2011) and paste it into Illustrator cs6 as a vector graphic.
    The graph's vector and layout is okay. Yet, the text / copy is jumbled text:
    $%"
    $#!!!!"
    Do I have to change a preference in either Excel or Illustrator?
    Thank you!

    In Excel, right click and choose Format Chart Area. In the dialog at the left, choose Fonts. Change the font to Arial or something other than Calibri (Theme Body). Then copy/paste.

  • Calling graph from Reports created in graphics builder?

    Can you call a graph from Reports 6.0 that was created in Graphics Builder. I know you can call a graph from Forms. I tried creating my graph right in Reports with the wizard but for some reason it does not give me the fields I want to use in the available fields column, so I created the graph in Graphics Builder. Do you use a trigger of some sort. Any examples would be appreciated if this is possible. Thanks

    Justin Beno:
    Yes, you can call a graph from inside a report. All you need to do is select the button with the graph on it (not the icon with the wand, which indicates chart wizard). Then draw graph in the area of the report where you want the graph to display. After completing this, right click on graph, select Property Palette, Chart - Chart Filename (this is where you will type in the directory and filename of your graph that you created in Oracle Graphics).
    ~Vannette

  • 1 Graph from two queries

    Hi Guys,
    I have the following requirement :
    Query1 : Incidents open this  month
    Query 2:Incidents close this  month
    For the above queries i need to create a Webtemplate :  2 tables from 2 queries  + 1 Graph from two queries.
    Is it possible to get a single graph from two queries?If so can you enlighten me with the process please?
    Cheers,
    Stalin

    Hi ,
    As mentioned by alex please follow the steps below.
    1. Create a separate a query (Query3) based on your bothe queryies(Query1 &query2).
    2. In the webtemplate  Insert table1,table2 and Graph and assign Query1 to Table1 , query2  to table2 and query3 to graph.
    if u folow the above steps u will get the require otput

  • Export graphs from Web report

    Hi.
    I need to copy graphs from web reports in 3.5.To do this, i have followed a roundabout:
    1. Save the page as mht (web archive file)
    2.Copy the image from there and paste into Powerpoint or wherever required.
    Is there any better way to do it? Or can I bring the save as mht option in the context menu?
    Is SAP addressing it any soon?
    Also is there any way to send graphs in addition to the tables via the 'distribute as email option"?
    Cheers
    Anand

    When you broadcast using the standard template the template '0QUERY_TEMPLATE_BROADCASTING' is used for broadcasting. This template only has a navigation block and table item, this is the reason why the chart is not displayed in this template. If you create a custom template for broadcasting which has chart item in it you will be able to get the chart displayed (it will be always displayed.) See the attached link for custmoizing.
    http://help.sap.com/saphelp_nw04/helpdata/en/3a/0e044017355c0ce10000000a1550b0/content.htm
    You can also override this behaviour if you attach the query to a custom web template, in this case when you broadcast you will get exactly what you see in the current report.

  • Re: Remove log messages from loop

    CURSOR cur_item_rev_child IS
    SELECT ffv.flex_value, --org code
    mp.organization_id
    FROM fnd_flex_values ffv,
    fnd_flex_value_sets ffvs,
    mtl_parameters mp
    WHERE ffv.flex_value_set_id = ffvs.flex_value_set_id
    AND ffvs.flex_value_set_name = 'EMR Add Spec Org' -- Changed by WIPRO on 01-OCT-12 (SR # 1078990 )--
    AND NVL(ffv.enabled_flag, 'N') = 'Y'
    AND ffv.flex_value = mp.organization_code
    AND mp.master_organization_id = v_num_master_org;
    CURSOR cur_item_rev (i_num_organization_id NUMBER)
    IS
    SELECT /*+ index(xvasd XXINV_VLVS_ADD_SPEC_DETAILS_N1 )*/mirb.inventory_item_id,
    mirb.organization_id,
    MAX(mirb.revision) item_revision,
    msib.segment1, -- Added by Infosys on 19-May-09
    xvasd.spec_revision spec_revision -- Added by Infosys on 19-May-09
    FROM xxinv_vlvs_add_spec_details xvasd,
    xxinv_vlvs_item_add_spec xvias,
    mtl_parameters mp,
    mtl_system_items_b msib,
    mtl_item_revisions_b mirb
    WHERE xvasd.spec_number = xvias.spec_number
    AND xvasd.spec_type = xvias.spec_type
    AND xvias.spec_type = v_chr_spec_type
    AND xvasd.spec_status='ACTIVE'
    AND xvias.inv_item_id = msib.inventory_item_id
    AND mirb.inventory_item_id=msib.inventory_item_id
    AND xvias.organization_id = msib.organization_id
    AND msib.organization_id = mirb.organization_id
    AND mirb.organization_id = mp.organization_id
    AND mp.organization_id = i_num_organization_id
    --AND LPAD (xvasd.spec_revision, 3, 0) LPAD (b.revision, 3, 0)
    GROUP BY mirb.inventory_item_id,
    mirb.organization_id,
    msib.segment1,
    xvasd.spec_revision;
    BEGIN
    o_chr_errbuf := 'Program Completed Successfully';
    o_num_retcode := 0;
    fnd_file.put_line(fnd_file.output,
    fnd_file.put_line(fnd_file.output,
    ' EMR INV Item Revisions Update Program VLVS');
    fnd_file.put_line(fnd_file.output,
    fnd_file.put_line(fnd_file.output, '');
    --Starting the Program
    fnd_file.put_line(fnd_file.LOG,
    fnd_file.put_line(fnd_file.LOG,
    ' EMR INV Item Revisions Update Program VLVS');
    fnd_file.put_line(fnd_file.LOG,
    fnd_file.put_line(fnd_file.LOG, '');
    fnd_file.put_line(fnd_file.LOG, 'Input Parameter');
    fnd_file.put_line(fnd_file.LOG, '---------------');
    fnd_file.put_line(fnd_file.LOG, 'Debug Mode: ' || v_chr_debug_mode);
    fnd_file.put_line(fnd_file.LOG, '');
    fnd_file.put_line(fnd_file.LOG,
    -- Get the value of the spec type from the lookup. If no value is set then display the error message and raise exception
    IF v_chr_spec_type IS NULL
    THEN
    fnd_file.put_line(fnd_file.LOG,
    'Error: Set a value for the profile: XXINV : Additional Spec Type VLVS');
    RAISE excp_user;
    ELSE
    fnd_file.put_line(fnd_file.LOG,
    'Processing for the addition spec item type: ' ||
    v_chr_spec_type);
    END IF;
    -- Select all the eligible records for processing
    FOR rec_cur_item_rev_child IN cur_item_rev_child
    LOOP
    FOR rec_cur_item_rev IN cur_item_rev (rec_cur_item_rev_child.organization_id)
    LOOP
    -- v_chr_spec_rev := NULL;
    -- v_chr_item_number := NULL; Commented by Infosys on 19-May-09
    /* BEGIN --Start of comments by Infosys on 19-May-09
    SELECT segment1
    INTO v_chr_item_number
    FROM mtl_system_items_b
    WHERE inventory_item_id = rec_cur_item_rev.inventory_item_id
    AND organization_id=rec_cur_item_rev.organization_id;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    v_chr_item_number := NULL;
    fnd_file.put_line(fnd_file.LOG,'Item Number not found in MTL_SYSTEM_ITEMS_B Table for the inv item id '
    ||rec_cur_item_rev.inventory_item_id);
    WHEN OTHERS THEN
    v_chr_item_number := NULL;
    RAISE excp_loop;
    END;*/--End of comments by Infosys on 19-May-09
    /*BEGIN --Start of comments by Infosys on 19-May-09
    SELECT MAX(spec_revision)
    INTO v_chr_spec_rev
    FROM xxinv_vlvs_add_spec_details xvasd,
    xxinv_vlvs_item_add_spec xvias
    WHERE xvasd.spec_number = xvias.spec_number
    AND xvasd.spec_type = xvias.spec_type
    AND xvias.spec_type = v_chr_spec_type
    AND xvias.inv_item_id =rec_cur_item_rev.inventory_item_id
    AND organization_id=rec_cur_item_rev.organization_id
    GROUP BY xvias.inv_item_id,
    organization_id,
    xvias.spec_type;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    v_chr_spec_rev := NULL;
    fnd_file.put_line(fnd_file.LOG,'Spec Revision not found in Additional Specs Table for the inv item id '
    ||rec_cur_item_rev.inventory_item_id);
    WHEN OTHERS THEN
    v_chr_spec_rev := NULL;
    RAISE excp_loop;
    END;*/--End of comments by Infosys on 19-May-09
    IF LPAD (rec_cur_item_rev.spec_revision, 3, 0) LPAD (rec_cur_item_rev.item_revision, 3, 0)
    THEN
    BEGIN
    v_num_total_cnt := v_num_total_cnt + 1;
    --to take count of the total records processed
    v_chr_error_flag := 'N'; reset the error flag to N before processing each record
    v_num_revision_id := NULL;
    IF v_num_total_cnt = 1
    THEN
    v_chr_output_hdr := 'ORG CODE' ||
    RPAD('|ITEM NUMBER', 51, ' ') ||
    '|ITEM REV' || '|SPEC REV' ||
    '|ERROR REASON';
    END IF;
    -- Check if the revision on the spec is greater that the revision on the item
    IF LPAD (rec_cur_item_rev.spec_revision, 3, 0) > LPAD (rec_cur_item_rev.item_revision, 3, 0)
    THEN
    BEGIN
    SELECT mtl_item_revisions_b_s.NEXTVAL
    INTO v_num_revision_id
    FROM DUAL;
    EXCEPTION
    WHEN OTHERS THEN
    v_chr_temp_msg := 'Error when getting the new revision id from the sequence MTL_ITEM_REVISIONS_B_S: ' ||
    SQLERRM;
    RAISE excp_loop;
    END;
    -- begin block for assigning values and calling API to update the item revisions
    BEGIN
    v_rec_item_revision.inventory_item_id := rec_cur_item_rev.inventory_item_id;
    v_rec_item_revision.organization_id := rec_cur_item_rev_child.organization_id;
    v_rec_item_revision.revision_id := v_num_revision_id;
    v_rec_item_revision.revision := rec_cur_item_rev.spec_revision;--v_chr_spec_rev;
    v_rec_item_revision.revision_label := rec_cur_item_rev.spec_revision;--v_chr_spec_rev;
    v_rec_item_revision.revision_reason := 'Updated the Item Revision';
    v_rec_item_revision.implementation_date := v_dte_sysdate;
    v_rec_item_revision.effectivity_date := v_dte_sysdate;
    v_rec_item_revision.attribute_category := NULL;
    v_rec_item_revision.attribute1 := NULL;
    v_rec_item_revision.attribute2 := NULL;
    v_rec_item_revision.attribute3 := NULL;
    v_rec_item_revision.attribute4 := NULL;
    v_rec_item_revision.attribute5 := NULL;
    v_rec_item_revision.attribute6 := NULL;
    v_rec_item_revision.attribute7 := NULL;
    v_rec_item_revision.attribute8 := NULL;
    v_rec_item_revision.attribute9 := NULL;
    v_rec_item_revision.attribute10 := NULL;
    v_rec_item_revision.attribute11 := NULL;
    v_rec_item_revision.attribute12 := NULL;
    v_rec_item_revision.attribute13 := NULL;
    v_rec_item_revision.attribute14 := NULL;
    v_rec_item_revision.attribute15 := NULL;
    v_rec_item_revision.description := NULL;
    v_rec_item_revision.creation_date := v_dte_sysdate;
    v_rec_item_revision.created_by := v_num_user_id;
    v_rec_item_revision.last_update_date := v_dte_sysdate;
    v_rec_item_revision.last_updated_by := v_num_user_id;
    v_rec_item_revision.last_update_login := v_num_login_id;
    v_rec_item_revision.request_id := v_num_request_id;
    v_rec_item_revision.program_id := v_num_program_id;
    v_rec_item_revision.program_application_id := v_num_prog_appln_id;
    mtl_item_revisions_util.insert_row(p_item_revision_rec => v_rec_item_revision,
    x_rowid => v_chr_ret_rowid);
    v_num_succ_cnt := v_num_succ_cnt + 1;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    v_chr_temp_msg := 'Error when updating the revisions: ' ||
    SQLERRM;
    RAISE excp_loop;
    END;
    ELSE -- LPAD (cur_item_rev.spec_revision, 3, 0) < LPAD (cur_item_rev.item_revision, 3, 0)
    v_chr_temp_msg := 'Item Revision is greater than the Spec Revision';
    o_num_retcode := 1;
    v_num_err_cnt := v_num_err_cnt + 1;
    ROLLBACK;
    fnd_file.put_line(fnd_file.LOG, '');
    fnd_file.put_line(fnd_file.LOG,
    'Organization Code: ' ||
    rec_cur_item_rev_child.flex_value); -- added on 05-May-09 by infosys --
    fnd_file.put_line(fnd_file.LOG,
    'Item Number: ' ||
    rec_cur_item_rev.segment1);
    fnd_file.put_line(fnd_file.LOG,
    'Item Revision: ' ||
    rec_cur_item_rev.item_revision); -- v_chr_item_revision_child -- -- added on 05-May-09 by infosys --
    fnd_file.put_line(fnd_file.LOG,
    'Spec Revision: ' ||
    rec_cur_item_rev.spec_revision);
    fnd_file.put_line(fnd_file.LOG,
    'Error: ' ||
    v_chr_temp_msg);
    fnd_file.put_line(fnd_file.LOG,
    v_chr_output_msg := v_chr_output_msg ||
    RPAD(rec_cur_item_rev_child.flex_value, -- added on 05-May-09 by infosys --
    8,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.segment1,
    50,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.item_revision, v_chr_item_revision_child, added on 05-May-09 by infosys --
    8,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.spec_revision,
    8,
    ' ') || '|' ||
    v_chr_temp_msg ||
    CHR(10);
    v_chr_mail_body := v_chr_mail_body ||
    RPAD(rec_cur_item_rev_child.flex_value, -- added on 05-May-09 by infosys --
    8,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.segment1,
    50,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.item_revision, v_chr_item_revision_child added on 05-May-09 by infosys --
    8,
    ' ') || '|' ||
    RPAD(rec_cur_item_rev.spec_revision,
    8,
    ' ') || '|' ||
    v_chr_temp_msg ||
    -- Display the statistics details in the output file
    fnd_file.put_line(fnd_file.output, '');
    fnd_file.put_line(fnd_file.output,
    'Number of items selected for update: ' ||
    v_num_total_cnt);
    fnd_file.put_line(fnd_file.output,
    'Number of items updated: ' || v_num_succ_cnt);
    fnd_file.put_line(fnd_file.output,
    'Number of items not updated: ' || v_num_err_cnt);
    fnd_file.put_line(fnd_file.output, '');
    fnd_file.put_line(fnd_file.output, v_chr_output_hdr);
    * Print out the output message from CLOB variable "v_chr_output_msg"
    * Substr each line whenever we find the separator CHR(10)
    * Print each line with fnd_file.output function
    BEGIN
    v_num_offset := 1;
    v_num_instr := 0;
    LOOP
    EXIT WHEN v_num_offset > dbms_lob.getlength(v_chr_output_msg);
    -- Get the position of CHR(10) when first time appearence.
    v_num_instr := dbms_lob.instr(v_chr_output_msg,
    CHR(10),
    v_num_offset,
    1);
    v_num_line_length := v_num_instr - v_num_offset + 1;
    -- Substr the each line and print it out
    fnd_file.put_line(fnd_file.output,
    dbms_lob.substr(v_chr_output_msg,
    v_num_line_length - 1,
    v_num_offset));
    v_num_offset := v_num_offset + v_num_line_length;
    END LOOP;
    END;
    END IF; -- LPAD (cur_item_rev.spec_revision, 3, 0) < LPAD (cur_item_rev.item_revision, 3, 0) --
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    fnd_file.put_line(fnd_file.LOG,
    'Porcessing next record as a Error occured in cursor loop cur_item_rev : ' ||
    SQLERRM);
    END;
    END IF;
    END LOOP; -- cur_item_rev --
    END LOOP; -- cur_item_rev_child --
    -- calling the mail procedure --
    IF v_num_err_cnt > 0
    THEN
    BEGIN
    fnd_file.put_line(fnd_file.LOG, '');
    fnd_file.put_line(fnd_file.LOG,
    'Calling send_notification Procedure...');
    send_notification(o_chr_ret_code => v_chr_status,
    o_chr_ret_mesg => v_chr_temp_msg,
    i_chr_subject => 'EMR INV Item Revisions Update Program VLVS - ' ||
    v_dte_sysdate,
    i_chr_body => v_chr_mail_body);
    EXCEPTION
    WHEN OTHERS THEN
    v_chr_temp_msg := 'Error when calling Procedure send_notification .';
    fnd_file.put_line(fnd_file.LOG,
    'Error details : ' || v_chr_temp_msg ||
    ' - ' || SQLERRM);
    RAISE excp_user;
    END;
    END IF;
    EXCEPTION
    /*WHEN excp_loop THEN
    ROLLBACK;
    o_chr_errbuf := o_chr_errbuf ||
    'Program completed with error when getting the max revision';
    o_num_retcode := 2;*/
    WHEN excp_user THEN
    ROLLBACK;
    o_chr_errbuf := o_chr_errbuf || 'Program completed with error';
    o_num_retcode := 2;
    WHEN OTHERS THEN
    ROLLBACK;
    fnd_file.put_line(fnd_file.LOG,
    'Error in Item Revisions Update Program: ' ||
    SQLERRM);
    o_chr_errbuf := o_chr_errbuf || 'Program completed with error';
    o_num_retcode := 2;
    END update_item_revision;

    I need to remove the log messages from loop...As currently log file printing is in loop....Can you please tell how to remove log file messages from loop.

  • Chnaging input in a waveform graph from front panel in labview

    Hi !
    I am working with temperature sensors; I have several sensors to read simultaneously.
    I want to plot information from different sensors in different plots and have the option to change/select  the sensors in the a graph from front panel. For example, I have 8 sensors(please see the attachments_ front panel), A,B,C,D,E,F,G and M. Some time it could be possible that user want A,B,C in Tumor Graph or sometimes only A and B. That means the identity and the number of sensors could be changed in different times.
    Now I connect only two sensors per graph (ref: block diagram) but the number and the sensors to be plotted in a certain graph can be changed, so How can I implement it ?
    Any help or idea will be appreciated.
    Best Regards,
    Hasan Masud
    CTH, Sweden.
    Attachments:
    random graph_front.jpg ‏260 KB
    random graph_block.jpg ‏298 KB

    Hi hasanma,
    Well, you could expend the build array and add more inputs to it as shown below:
    And individually select which sensor data the user wants to view as shown below:
    Warmest regards,
    Lennard.C
    Learning new things everyday...

Maybe you are looking for

  • Payment terms in vendor  Master

    Hi, In XK01- create vendor master, There are two payment terms--> payment transaction field and other in purchasing organisation data. Is there a configuration which will default the payment terms in purchasing org screen based on the inputs in the c

  • My Photoshop will not open.

    Whenever I go to open up Adobe Photoshop (64bit or otherwise) it will load up for a second then crash the next. It doesnt give me error reason why only says it has stopped working and it can't detect a problem so it closes. I have tried to uninstall

  • How to install adapters in pi 7.0 ex(tibco adapter) its urgent plz help

    hi  friends                can any one help me how  to insatlll  the tibco adapter in pi 7.0 its urgent plz help thanks in advance bye raja

  • Re: Functionality temporarily unavailable

    Think I have solved this problem myself with a bit of help from some other postings in the newsgroup. I think that there is a problem with the documentation. It states that /portlets/portlet3/welcome.jsp should be used as the Content URL field. Unfor

  • Interplant sub-contracting scenario

    hi, how to set-up inter-plant sub-contracting. from plant-1 materials will be sent to plant 2. In plant -2 processing will be done and send back the finished goods along with scrap if any to plant-1. pl explain the scenario in detail - step by step (