Closing of Applet(Very Urgent)

Hai All
A issue to be solved. I have on JApplet and a JOption is displayed on some conditions..on the click of the button in the JOption the applet has to be closed. How can the Applet be closed on some conditions. I used system.exit..it is not doing the thing...
Thanks in Advance

But that method will not close the applet window.....

Similar Messages

  • Clustered Servers and Applet (Very URGENT Please)

    Hi,
    I'm using win2k/CF application server 4.5/IPlanet web server/NN4.79/JRE1.4.1/.
    I have an applet in one of my web page which downloads a file from the web server(stored in http://www.abc.net/doc/zip directory on the server).
    Now when I run this code on the development server, everything works fine.
    But in production environment, we have 3 clustered web servers controlled by a controller (Local Cisco Director) machine. The applet code looks like this:-
    strURL = "http://www.abc.net/doc/Zip/"; //the URL from which the zip is to be downloaded. Basically it hits the Controller first
         strZipFileName=getParameter("zipFileName");
         strURL = strURL+strZipFileName;
              //Get Connection to Server and Download the file
              try{
              objUrl = new URL(strURL);
              httpCon = (HttpURLConnection) objUrl.openConnection();
                   //DownLoad the File
                   InputStream fileInputStrm = httpCon.getInputStream();
                   // create a file object which will contain the directory structure to copy in the local machine
                   localZipFile = new File(strLocalFilePath+strZipFileName);
                   FileOutputStream fileOutStrm = new FileOutputStream(localZipFile);
                   int ch;
              while ((ch = fileInputStrm.read()) != -1) {
                        fileOutStrm.write(ch);
                   // Close the InputStream, HTTP connection , File stream
              fileInputStrm.close();
              httpCon.disconnect();
              fileOutStrm.close();
    Now when the home page of the site is loaded it makes the connection and controller redirects this request to one of the web servers (say 1) which is least loaded.
    Now when the applet is loaded, the new connection is established to the controller and it may redirect the request to any one of the 3 web servers (not necessarily to 1 which is required). Now sometimes it hits the right web server on which the required zip file is stored, and sometimes it doesn't hit the correct server.
    Any clue what we can do in this scenario so that the applet downloads the correct file from the right server?
    Please help it is very urgent....
    Thanks

    Did you ever get a response to this or figure out how to run in a clustered environment? I am now running into the same issue and would be interested in whatever you learned.

  • Re open the closed Posting Periods - Very Urgent

    Dear Experts,
    We have an urgent problem to solve.The company code currently we are configuring uses fiscal year (oct - Sept) and the other company codes in our client site uses (jan -Dec). So by mistake we closed posting periods using MMPV upto 2007 03 but it should be 2006 06(correct me if i am wrong).
    As we are still in baseline configuration we don't have any material document in the current company code. From this forum I got some solution to intialize the posting period using MMPI(which directed me to use SAP Note 487381).
    Now if I do MMPI with the directions mentioned in SAP Note 487381, will i face any problem now & in future.
    Please suggest me and help me as has become hurdle for the test process.
    Thanks in Advance...
    Nagesh Aswartha

    Hi Aswartha
    As you do not have any material documents , pl go ahead and initialize the periods. Should not be a problem.
    I normally do this to avoid errors:
    In MMPV, never give a period. Enter the current date(or first date of the month) in the date field and execute closing program.
    Best regards
    Ramki

  • Problem on loading applet netscape4.73 in macos9 very urgent pls help me

    Hello,
    Problems on loading applet in Netscape4.73(jre1.1.5) AppleMac OS-9.
    when i try to load applet of size ~ 200kb in Netscape 4.73 AppleMac os9, then browser abruptly closing with the AppleMac os error message :- the Applicarion " Netscape Communicator " has unexpectedly quit because an error of type 2 occured. And then asking for system restart.
    Since i am new to the AppleMac environment i cant adjust the settings please help me to overcome the problem. Its Very urgent and i am in great hurry pls.
    thanks in advance.
    Rao. V.N.

    Hi Rao,
    I'm not a mac-os specialist (even I had some business with mac !!), and it is very difficult speaking in blind, but I have severals questions that may help you.
    - Did you try you applet in other AppleMac plateform ?
    - Does your applet work fine in other browser/plateform ?
    - Does a small applet work fine on this plateform with this browser ?
    - Does you applet contains instructions like System.exit, System.* or try to access (read or write) to local files ?
    Otherelse it is possible you have problem with your jre config, try to configure your plugin with command like : -Xmx64m -Xms16m
    (These commands tell the plugin to use at least 16 Mo memory and 64 Mo for the maximum see : http://java.sun.com/docs/hotspot/gc/)
    Hope that will help you

  • List of activities before closing a plant permanently- Urgent please

    <b></b>Dear MM Gurus
    i require your expert help in suggesting me a detailed action plan, here is my issue
    we are going to c<b>lose our plant </b>in 1 month and i would like to know w<b>hat are all the list of action points that we need to take care of from now on to finally we close,</b>
    so that we are left with zero unused stocks and all the open orders are all completed successfully, no excess, and so that this transition phase happens smoothly without any errors.from both MM/ WM/ PP/ QM and LE perspectives
    also we plan to replace this current plant we are closing with a new plant and what should we do if
    we need to copy all current plant config to new plant?
    <b>how to copy all the master data like material master, info records, SA's vendor masters etc over to the new plant-
    is there any standard mass upload tools for this activity or do we need to create custom programs or which do you suggest to advice considering the very short time i have, pls explain in detail??
    </b>
    your response will he rewarded as this is very urgent
    thanks in advance for your help and all your valuable responses are truly appreciated
    chakri

    Hi Chakri,
    In this situation we look for below areas in MM
    1) Closing stocks.
    2) Open PO's
    3) Pending Payments to vendors
    4) Sub-Contracting status.
    close all po's at cutoff date & take the closing stock of materials with value & note the g/l account value these should tally in new plant.
    for po's pending for delivery close it or cancel it.
    Material master / vendor master etc . . . master data's is adviseable to extended using LSMW or BDC.
    Hope this will help u.
    Regards
    Rang

  • Asset back dated GRN.(Very urgent)

    Dear Gurus,
    My client is facing an issue that while making backlog they missed out to pass Some asset GRN related to Asset, say for the month  April and May after all verifications they came to know that some of the Asset GRN is missing.
    know the issue is now if we want to post asset GRN for the month April and MAY it is not possible because we closed the Posting period in  MM till OCT.
    so please any one suggest me how to post these entries if we take current date our depreciation calculation will be showing wrong Values.
    Please Suggest this is very urgent.
    Thanks in Advance
    SU*

    Dear Sivaji<
    u can do this way
    1) change the Dep. key in u r Asset master (0%) dep. key
    2) run the Dep. run once again with Rep Run or Re Start run. ( in this case system shows u the dep. 0 for this asset.
    before runing the Dep. better to check the ANLP table and after that also
    3) cancell the GRN with MM Consultant help
    4) cancell the PO
    Regards
    radha

  • Change in material prices- very urgent

    Dear Gurus
    We have a very urgent issue to be resolved,
    we have a situation where in we are finding a huge difference in the inventories posted in SAP to that of the legacy data for a particular month(JUNE) these inventories where first initially uploaded according to the data given by the client.
    But the client has later realised that the price given for the materials was including Excise Duties, thats the reason there is a huge difference in the inventories.
    The MM period for June was closed and july was opened, then the client wanted us to change the prices to the original rates that is without ED. so we have run MR21 as on 1st of july. even then the changed prices where not seen in Material
    master.
    Now the client is insisting on getiing the JUNE inventories exactly matching with legacy.
    Note: The july transactions are already running online i.e all PO's have been closed for JULY but the PRoduction orders are still in pending.
    In this kind of situation how can we get those inventories back correctly(for JUNE month).
    Solution will definately be rewarded.
    Thank you in advance
    kavitha

    If GRs have been done for POs already in July, you should not change the prices for June.
    In such a scenario, one option is to have stock accounts with Credit balances (a purely FI entry) which will bring the value of the inventory down in the books.
    Another option is to calculate the value manually for each material - i.e. the correct value (uploaded) and the PO Prices and do an MR21 to correct the stock value. This is the ideal solution but may not be practical to implement.
    Hope this helps,
    Lakshman

  • Pls...help...printing the whole delivery order...very very urgent

    Can anybody help me in this code.
    I would like to print out delivery order,but when i printed,it just printed out the whole delivery order in the bottom of A4 paper.Can anybody modify the source code and give me proper one?
    I would it to fit on A4 paper.
    These are the soource code,Pls help,it's very urgent.Thanks for any help.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.sql.*;
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.awt.print.*;
    import java.awt.geom.*;
    public class ConfirmDeliveryOrderDialog extends JDialog implements ActionListener,Printable
    private ResultSetTableModel retrieveDOInfoModel;
    private JTable newDOTable;
    private JScrollPane newDOSp;
    private JLabel comT1,comT2,comT3,doT,doID,doIDNo,receivedDate,actualReceivedDate,deliveryTo,deliveryToCustomerInfo,
    companyAddress,companyAddressInfo,tel,telNo,dispatchDate,actualDispatchDate,total,totalQuantity,
    inputTotalQuantity,totalKg,inputTotalKg,remark,inputRemark;
    private Line2D line,line1;
    private Graphics2D g;
    private Container cp;
    private JButton printBtn,exitBtn;
    private Connection con;
    private Statement retrieveDOInfoStmt;
    private ResultSet retrieveDOInfoRs;
    int quan,Kg;
    boolean centered = true;
    public ConfirmDeliveryOrderDialog(JDialog parent)
    super(parent,"New Delivery Order",true);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = Laundry.getConnection();
    retrieveDOInfoStmt = con.createStatement();
    String retrieveDOInfo = "SELECT ItemName,ItemTypeName,WashingType,CleaningType,ItemCategory,QuantityOrKg AS [Quantity/Kg] " +
    "FROM DoDetail,DOInfo " +
    "WHERE DODetail.DOID = DOInfo.DOID " +
    "AND DOInfo.CompanyID = " + Laundry.companyDetails.get(0) +
    "AND DODetail.DOID = " + EnterDeliveryOrderNumberDialog.DOInfo.get(0);
    retrieveDOInfoRs = retrieveDOInfoStmt.executeQuery(retrieveDOInfo);
    if(Laundry.SCROLLABLE)
    retrieveDOInfoModel = new ScrollingResultSetTableModel(retrieveDOInfoRs);
    else
    retrieveDOInfoModel = new CachingResultSetTableModel(retrieveDOInfoRs);
    newDOTable = new JTable(retrieveDOInfoModel);
    newDOSp = new JScrollPane(newDOTable);
    newDOTable.getTableHeader().setReorderingAllowed(false);
    newDOTable.setPreferredScrollableViewportSize(new Dimension(550,350));
    retrieveDOInfoStmt.close();
    con.close();
    cp = getContentPane();
    cp.add(newDOSp, BorderLayout.CENTER);
    catch(SQLException ext)
    JOptionPane.showMessageDialog(null,"SQL Exception:","ERROR",JOptionPane.ERROR_MESSAGE);
    while (ext != null)
    JOptionPane.showMessageDialog(null,"SQL State:" + ext.getSQLState() + "\nMessage:" + ext.getMessage() + "\nVendor:" + ext.getErrorCode(),"ERROR",JOptionPane.ERROR_MESSAGE);
    ext = ext.getNextException();
    catch(ClassNotFoundException ex)
    JOptionPane.showMessageDialog(null,"Exception:" + ex,"ERROR",JOptionPane.ERROR_MESSAGE);
    ex.printStackTrace();
    catch(Exception e)
    JOptionPane.showMessageDialog(null,"Exception:" + e,"ERROR",JOptionPane.ERROR_MESSAGE);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = Laundry.getConnection();
    retrieveDOInfoStmt = con.createStatement();
    String retrieveDOInfo = "SELECT SUM(QuantityOrKg) AS [Total Quantity] " +
    "FROM DOInfo,DODetail " +
    "WHERE DOInfo.DOID = DODetail.DOID " +
    "AND DOInfo.CompanyID = " + Laundry.companyDetails.get(0) +
    "AND DODetail.DOID = " + EnterDeliveryOrderNumberDialog.DOInfo.get(0) +
    "AND ItemCategory = 'Piece' " +
    "GROUP BY DODetail.DOID ";
    retrieveDOInfoRs = retrieveDOInfoStmt.executeQuery(retrieveDOInfo);
    while(retrieveDOInfoRs.next())
    quan = retrieveDOInfoRs.getInt("Total Quantity");
    retrieveDOInfoStmt.close();
    con.close();
    catch(SQLException ext)
    JOptionPane.showMessageDialog(null,"SQL Exception:","ERROR",JOptionPane.ERROR_MESSAGE);
    while (ext != null)
    JOptionPane.showMessageDialog(null,"SQL State:" + ext.getSQLState() + "\nMessage:" + ext.getMessage() + "\nVendor:" + ext.getErrorCode(),"ERROR",JOptionPane.ERROR_MESSAGE);
    ext = ext.getNextException();
    catch(ClassNotFoundException ex)
    JOptionPane.showMessageDialog(null,"Exception:" + ex,"ERROR",JOptionPane.ERROR_MESSAGE);
    ex.printStackTrace();
    catch(Exception e)
    JOptionPane.showMessageDialog(null,"Exception:" + e,"ERROR",JOptionPane.ERROR_MESSAGE);
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = Laundry.getConnection();
    retrieveDOInfoStmt = con.createStatement();
    String retrieveDOInfo = "SELECT SUM(QuantityOrKg) AS [Total Kg] " +
    "FROM DOInfo, DODetail " +
    "WHERE DOInfo.DOID = DODetail.DOID " +
    "AND DODetail.DOID = " + EnterDeliveryOrderNumberDialog.DOInfo.get(0) +
    "AND DOInfo.CompanyID = " + Laundry.companyDetails.get(0) +
    "AND ItemCategory = 'Kg' " +
    "GROUP BY DODetail.DOID ";
    retrieveDOInfoRs = retrieveDOInfoStmt.executeQuery(retrieveDOInfo);
    while(retrieveDOInfoRs.next())
    Kg = retrieveDOInfoRs.getInt("Total Kg");
    retrieveDOInfoStmt.close();
    con.close();
    catch(SQLException ext)
    JOptionPane.showMessageDialog(null,"SQL Exception:","ERROR",JOptionPane.ERROR_MESSAGE);
    while (ext != null)
    JOptionPane.showMessageDialog(null,"SQL State:" + ext.getSQLState() + "\nMessage:" + ext.getMessage() + "\nVendor:" + ext.getErrorCode(),"ERROR",JOptionPane.ERROR_MESSAGE);
    ext = ext.getNextException();
    catch(ClassNotFoundException ex)
    JOptionPane.showMessageDialog(null,"Exception:" + ex,"ERROR",JOptionPane.ERROR_MESSAGE);
    ex.printStackTrace();
    catch(Exception e)
    JOptionPane.showMessageDialog(null,"Exception:" + e,"ERROR",JOptionPane.ERROR_MESSAGE);
    comT1 = new JLabel("Deluxe Laundry Sdn Bhd");
    comT1.setFont(new Font("Sanserif",Font.BOLD,12));
    comT2 = new JLabel("Lot 1641, Jln Sungai Tua, Batu Caves, 68100 Selangor Darul Ehsan");
    comT2.setFont(new Font("Sanserif",Font.PLAIN,10));
    comT3 = new JLabel("Tel : 03-61863093 03-61863091 Fax : 03-61863096");
    comT3.setFont(new Font("Sanserif",Font.PLAIN,10));
    Box comBox = Box.createVerticalBox();
    comBox.add(Box.createVerticalStrut(5));
    comBox.add(comT1);
    comBox.add(Box.createVerticalStrut(2));
    comBox.add(comT2);
    comBox.add(Box.createVerticalStrut(2));
    comBox.add(comT3);
    comBox.add(Box.createVerticalStrut(2));
    Box comNBox = Box.createHorizontalBox();
    comNBox.add(Box.createHorizontalStrut(10));
    comNBox.add(comBox);
    comNBox.add(Box.createHorizontalStrut(300));
    //line = new Line2D.Float();
    //line.setLine(10,50,600,50);
    //Graphics2D dfl = (Graphics2D)g;
    //dfl.drawLine(10,50,600,50);
    doT = new JLabel("Delivery Order");
    doT.setFont(new Font("Sanserif",Font.BOLD,17));
    doID = new JLabel("DO ID : ");
    doID.setFont(new Font("Sanserif",Font.BOLD,12));
    doIDNo = new JLabel("");
    doIDNo.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(0));
    doIDNo.setFont(new Font("Sanserif",Font.PLAIN,12));
    receivedDate = new JLabel("Received Date : ");
    receivedDate.setFont(new Font("Sanserif",Font.BOLD,12));
    actualReceivedDate = new JLabel("");
    actualReceivedDate.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(1));
    actualReceivedDate.setFont(new Font("Sanserif",Font.PLAIN,12));
    JPanel jp = new JPanel();
    jp.setLayout(new GridLayout(2,3));
    jp.add(doID);
    jp.add(doIDNo);
    jp.add(receivedDate);
    jp.add(actualReceivedDate);
    Box doBox = Box.createHorizontalBox();
    doBox.add(Box.createHorizontalStrut(200));
    doBox.add(doT);
    doBox.add(Box.createHorizontalStrut(50));
    doBox.add(jp);
    doBox.add(Box.createHorizontalStrut(100));
    //line1 = new Line2D.Float();
    //line1.setLine(10,0,600,0);
    //Graphics2D df2 = (Graphics2D)g;
    //df2.drawLine(10,100,600,100);
    deliveryTo = new JLabel("Delivery To :");
    deliveryTo.setFont(new Font("Sanserif",Font.BOLD,12));
    deliveryToCustomerInfo = new JLabel("");
    deliveryToCustomerInfo.setText("" + Laundry.companyDetails.get(1));
    deliveryToCustomerInfo.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box deliveryToBox = Box.createHorizontalBox();
    deliveryToBox.add(Box.createHorizontalStrut(10));
    deliveryToBox.add(deliveryTo);
    deliveryToBox.add(Box.createHorizontalStrut(10));
    deliveryToBox.add(deliveryToCustomerInfo);
    deliveryToBox.add(Box.createHorizontalStrut(500));
    companyAddress = new JLabel("");
    companyAddress.setFont(new Font("Sanserif",Font.BOLD,12));
    companyAddressInfo = new JLabel("");
    companyAddressInfo.setText("" + Laundry.companyDetails.get(2));
    companyAddressInfo.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box companyAddressBox = Box.createHorizontalBox();
    companyAddressBox.add(Box.createHorizontalStrut(98));
    companyAddressBox.add(companyAddress);
    companyAddressBox.add(Box.createHorizontalStrut(10));
    companyAddressBox.add(companyAddressInfo);
    companyAddressBox.add(Box.createHorizontalStrut(500));
    tel = new JLabel("Tel :");
    tel.setFont(new Font("Sanserif",Font.BOLD,12));
    telNo = new JLabel("");
    telNo.setText("" + '0'+Laundry.companyDetails.get(3));
    telNo.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box telBox = Box.createHorizontalBox();
    telBox.add(Box.createHorizontalStrut(10));
    telBox.add(tel);
    telBox.add(Box.createHorizontalStrut(10));
    telBox.add(telNo);
    telBox.add(Box.createHorizontalStrut(500));
    dispatchDate = new JLabel("Dispatch Date :");
    dispatchDate.setFont(new Font("Sanserif",Font.BOLD,12));
    actualDispatchDate = new JLabel("");
    actualDispatchDate.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(2));
    actualDispatchDate.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box dispatchBox = Box.createHorizontalBox();
    dispatchBox.add(Box.createHorizontalStrut(10));
    dispatchBox.add(dispatchDate);
    dispatchBox.add(Box.createHorizontalStrut(10));
    dispatchBox.add(actualDispatchDate);
    dispatchBox.add(Box.createHorizontalStrut(500));
    remark = new JLabel("Remark :");
    remark.setFont(new Font("Sanserif",Font.BOLD,12));
    inputRemark = new JLabel("");
    inputRemark.setText("" + EnterDeliveryOrderNumberDialog.DOInfo.get(3));
    inputRemark.setFont(new Font("Sanserif",Font.PLAIN,12));
    Box remarkBox = Box.createHorizontalBox();
    remarkBox.add(Box.createHorizontalStrut(10));
    remarkBox.add(remark);
    remarkBox.add(Box.createHorizontalStrut(10));
    remarkBox.add(inputRemark);
    remarkBox.add(Box.createHorizontalStrut(500));
    Box infoBox = Box.createVerticalBox();
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(deliveryToBox);
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(companyAddressBox);
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(telBox);
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(dispatchBox);
    infoBox.add(Box.createVerticalStrut(5));
    infoBox.add(remarkBox);
    infoBox.add(Box.createVerticalStrut(5));
    Box northBox = Box.createVerticalBox();
    northBox.add(Box.createVerticalStrut(5));
    northBox.add(comNBox);
    northBox.add(Box.createVerticalStrut(5));
    northBox.add(doBox);
    northBox.add(Box.createVerticalStrut(5));
    northBox.add(infoBox);
    northBox.add(Box.createVerticalStrut(5));
    Shape firstShape = new Rectangle(350,100,10,5);
    //Font font = new Font("Sanserif",Font.PLAIN,5);
    String text = "Checked By";
    //g.drawString(text,365,105);
    //g.setFont(new Font("Sanserif",Font.PLAIN,5));
    //g.fill(firstShape);
    //g.draw(firstShape);
    //Box joinBox = Box.createHorizontalBox();
    //joinBox.add(northBox);
    //joinBox.add(Box.createHorizontalStrut(10));
    //joinBox.add(g);
    printBtn = new JButton("Print");
    printBtn.addActionListener(this);
    exitBtn = new JButton("Exit");
    exitBtn.addActionListener(this);
    JPanel jp3 = new JPanel();
    jp3.add(printBtn);
    jp3.add(exitBtn);
    total = new JLabel("Total");
    totalQuantity = new JLabel("Quantity");
    totalQuantity.setFont(new Font("Sanserif",Font.PLAIN,12));
    inputTotalQuantity = new JLabel("");
    inputTotalQuantity.setFont(new Font("Sanserif",Font.PLAIN,12));
    inputTotalQuantity.setText("" + quan);
    totalKg = new JLabel("Kg");
    totalKg.setFont(new Font("Sanserif",Font.PLAIN,12));
    inputTotalKg = new JLabel("");
    inputTotalKg.setFont(new Font("Sanserif",Font.PLAIN,12));
    inputTotalKg.setText("" + Kg);
    Box totalBox = Box.createHorizontalBox();
    totalBox.add(Box.createHorizontalStrut(270));
    totalBox.add(total);
    totalBox.add(Box.createHorizontalStrut(50));
    totalBox.add(totalQuantity);
    totalBox.add(Box.createHorizontalStrut(50));
    totalBox.add(inputTotalQuantity);
    totalBox.add(Box.createHorizontalStrut(30));
    totalBox.add(totalKg);
    totalBox.add(Box.createHorizontalStrut(50));
    totalBox.add(inputTotalKg);
    totalBox.add(Box.createHorizontalStrut(30));
    Box southBox = Box.createVerticalBox();
    southBox.add(Box.createVerticalStrut(10));
    southBox.add(totalBox);
    southBox.add(Box.createVerticalStrut(5));
    southBox.add(jp3);
    cp = getContentPane();
    cp.add(northBox, BorderLayout.NORTH);
    cp.add(southBox, BorderLayout.SOUTH);
    setSize(600,400);
    setLocation(100,100);
    public void actionPerformed(ActionEvent ae)
    if(ae.getSource() == printBtn)
    PageFormat page = new PageFormat();
    Paper paper = new Paper();
    paper.setSize(595.275590551181,841.8897637795276);
    paper.setImageableArea(70.8661417322835,70.8661417322835,453.5433070866141,700.1574803149607);
    page.setPaper(paper);
    page.setOrientation(PageFormat.PORTRAIT);
    PrinterJob printJob = PrinterJob.getPrinterJob();
    if(page == null)
    page = printJob.defaultPage();
    printJob.setPrintable(this,page);
    if(printJob.printDialog())
    try
    printJob.print();
    setVisible(false);
    JOptionPane.showMessageDialog(null,"Please Generate Normal Or Express JobList","JobList",JOptionPane.INFORMATION_MESSAGE);
    catch(PrinterException e)
    JOptionPane.showMessageDialog(this,e);
    else if(ae.getSource() == exitBtn)
    EnterDeliveryOrderNumberDialog.removeDOInfo();
    setVisible(false);
    public int print(Graphics g, PageFormat pf, int page) throws PrinterException
    if(page >= 1)
    return Printable.NO_SUCH_PAGE;
    Graphics2D g2 = (Graphics2D)g;
    g2.translate(pf.getImageableX(), pf.getImageableY());
    if(centered)
    g2.translate(pf.getImageableWidth(), pf.getImageableHeight());
    Dimension d = getSize();
    double scale = Math.min(pf.getImageableWidth() / d.width, pf.getImageableHeight() / d.height);
    if (scale < 1.0)
    g2.scale(scale, scale);
    if (centered)
    g2.translate(-d.width, -d.height);          
    paint(g2);
    return Printable.PAGE_EXISTS;

    Hi Thanx, your code helped. I have got another question. How do i implement a method from another method class into the applet. say, i want to implemen set frequency from the below code into my applet you wrote above?
    class Histogram
         int frequency[];
         String alphabet;
         Histogram(String alphabet)
              this.alphabet=alphabet;
              frequency=new int[alphabet.length()];
         void scan(String message)
              for(int i=0;i<message.length;i++)
                   frequncy[alphabet.IndexOf(message.charAt(i))]++;
         void setfrequency(int frequency[])
              for(int i=0;i<alphabet.length;i++)
              this.frequency=frequency[i];
         double entropy()
              int total=0;
              double probablity;
              log2=Math.log(2.0);
              for(int i=0;i<alphabet.length;i++)
                   total+=freguency[i];

  • Pls Help...VERY URGENT

    Hi all,
    I am unable to get a certain output from the code I have written: Below is the code.
    public class project extends JApplet
         private JLabel promptLabel;
         private JTextField inputField,displayField;
         private JTextArea outputArea;
         public void init()
              Container container = getContentPane();
              String s1 = JOptionPane.showInputDialog("Enter a few alphabets");
              String.valueOf(s1);
              outputArea = new JTextArea();
              container.add(outputArea);
              outputArea.setText("The alphabets that you have entered are: "+s1);
    I am suppose to get the output below:
    The user will be prompted to enter a few alphabets.After the user clicks on 'OK' a java applet is suppose to popout with the alphabets the user has typed like in below. the user has to enter a message using the alphabets he gave(e.g abcd)
    please enter a message using the alphabets entered:___________
    a
    b
    c
    d
    I am unable to get the output.. I dunno how to go about getting the output above.. Another query, below is a Histogram class.
    class Histogram
         int frequency[];
         String alphabet;
         Histogram(String alphabet)
              this.alphabet=alphabet;
              frequency=new int[alphabet.length()];
         void scan(String message)
              for(int i=0;i<message.length;i++)
                   frequncy[alphabet.IndexOf(message.charAt(i))]++;
         void setfrequency(int frequency[])
              for(int i=0;i<alphabet.length;i++)
              this.frequency=frequency[i];
         double entropy()
              int total=0;
              double probablity;
              log2=Math.log(2.0);
              for(int i=0;i<alphabet.length;i++)
                   total+=freguency[i];
    If I want to get the frequency of each alphabet displayed in the applet, how do i go about implementing the setfrequency method in the java applet.. I hope some one can help me.. Pls it is very urgent.. Thanx

    Hi Thanx, your code helped. I have got another question. How do i implement a method from another method class into the applet. say, i want to implemen set frequency from the below code into my applet you wrote above?
    class Histogram
         int frequency[];
         String alphabet;
         Histogram(String alphabet)
              this.alphabet=alphabet;
              frequency=new int[alphabet.length()];
         void scan(String message)
              for(int i=0;i<message.length;i++)
                   frequncy[alphabet.IndexOf(message.charAt(i))]++;
         void setfrequency(int frequency[])
              for(int i=0;i<alphabet.length;i++)
              this.frequency=frequency[i];
         double entropy()
              int total=0;
              double probablity;
              log2=Math.log(2.0);
              for(int i=0;i<alphabet.length;i++)
                   total+=freguency[i];

  • Very urgent: Can't create LSMW for PO service item

    Hi all,
    I created LSMW for PO service(Item cat ="D") by using BAPI
    ( Business object: BUS2012, Method:CREATEFROMDATA1, Message Type:PORDCR1 and Basic Type: PORDCR102)
    This below is my source filed.
    POHDR
      PO_NUMBER
        POITEM
          PO_NUMBER
          PO_ITEM
              SERVICE-ITEM
                 PO_NUMBER
                 PO_ITEM
                Activity Item
                Activity Number
                  ACC_ASSIGN
                  PO_NUMBER
                  PO_ITEM
                  Activity Item
                  Activity Number
                  Sequence Number
    After i started idoc i got the message Message no. SE518 (No account assignment exists for service line 0000000010)
    How can i slove this problem?
    Thank you,
    Duanchai

    so you consider this closed?
    Very urgent: LSMW

  • JCO Exception 106, 102 and 104 (Very Urgent)

    Hi Expert,
    My scenario is File to RFC i am getting the following error.
    Initially i got this error
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: resource error: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool RfcClient[CC_BSV_XXXX_CTR_DIST]29fe2a7e92383d2b97a0e235d1501a19 is exhausted. The current pool size limit (max connections) is 1 connections.: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: resource error: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool RfcClient[CC_BSV_XXXX_CTR_DIST]29fe2a7e92383d2b97a0e235d1501a19 is exhausted. The current pool size limit (max connections) is 1 connections.
    After resending this message using RWB i got the following error.
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZZCRM_XXXX_IMPORT_INTFACE in remote system (RfcClient[CC_BSV_XXXX_CTR_DIST]):com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: connection closed without message (CM_NO_DATA_RECEIVED): com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZZCRM_XXXX_IMPORT_INTFACE in remote system (RfcClient[CC_BSV_XXXX_CTR_DIST]):com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: connection closed without message (CM_NO_DATA_RECEIVED)
    Finally i got the following error.
    Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZZCRM_XXXX_IMPORT_INTFACE in remote system (RfcClient[CC_BSV_XXXX_CTR_DIST]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Screen output without connection to user.: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: JCO.Exception while calling ZZCRM_XXXX_IMPORT_INTFACE in remote system (RfcClient[CC_BSV_XXXX_CTR_DIST]):com.sap.mw.jco.JCO$Exception: (104) RFC_ERROR_SYSTEM_FAILURE: Screen output without connection to user.
    Please let me how resolve this issue. It is very urgent
    Thanks In advance,
    Regards,
    Venky

    Venki,
    I guess you are not an XI person.
    You can contact any XI/PI person in your organization and tell them to do mention changes in Integraion Buider: Configuration. And then check.
    Gaurav Jain

  • Error while opening a module. plz help me, very urgent.

    when i try to open a module, the following error message appears on my screen.
              " no j2ee component found in d:\krisp\programs\servlets".
              i've installed bea in c: drive and my servlet program is in d: drive.
              plz help me, it's very urgent.

    Can you provide some more information? What were you doing when this happened?
              Can you post the entire error message?
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Need help, MMC tree got deleted, very urgent.

    Hi,
    My sap MMC tree, got deleted in the server. I have been trying to restore since 2 days and couldnt succeed, please help me.
    1) i have uncared the sapmmc.sar from   Kernal\NT\I386\MMC\sapmmc.sar file
    2) i got about 7 files, in which there is one sapmmc file i have tried to double click it, n check but no go.
    3) i also tried to run the Sapstartsrv.exe file and fill in up the values in pop up window. & filled up the following values :-
                        SID: DEV
                        NR: 00
                        StartProfile:  (entire start profile path given)
                        user: devadm
                        passwd; (given)
    - but it says "the account name is invalid or does not exist or the password is invalid for account name specified"/
    - no go in both the cases.
    Please need help very urgent.
    Regards,
    Satish.

    siva,
    I am getting same error since 2 days
    SID: DEV
    NR: 00
    Start Profile: (entire start profile path)
    User: <hostname>/devadm
    passwd: ****
    Error:
    cannot install service
    create service failed:421
    The account name is invalid or doesnot exist, or the passwd is invalid for the account name specified.
    Edited by: satish c on Jun 4, 2008 11:12 AM

  • How to write code for this logic in a routine, very urgent --help me

    hi all,
    i want to apply this logic into one subroutin ZABC.
    here i m giving my logic ,can any body help me in coding for this, this is very urgent, i hv to submit on wednesday.
    4.1 Read the company code number BSEG-BUKRS from document line item.
    4.2 Fetch PRDHA from MARA into GV_PRDHA where MATNR = BSEG-MATNR.
    4.3 Fetch Business area (GSBER) from ZFIBU into GV_GSBER where (PRDHA = GV_PRDHA and BUKRS = BSEG-BUKRS) OR (PRDHA = GV_PRDHA and BUKRS = SPACE).
    4.4 If business area match is found, go to step 3.9. Else continue.
    4.5 If BKPF-BLART IN set “ZVS_POSDT” OR BKPF-XBLNR starts with “I0*”, execute steps below. Else, go to Step 3.6.
    i. MOVE: BSEG-BKURS TO work area field WA_ZFIBUE-BUKRS,
    BSEG-MATNR TO work area field WA_ZFIBUE-MATNR,
    GV_PRDHA TO work area field WA_ZFIBUE-PRDHA,
    BSEG-HKONT TO work area field WA_ZFIBUE-HKONT,
    BSEG-GSBER TO work area field WA_ZFIBUE-GSBER,
    BSEG-PSWBT TO work area field WA_ZFIBUE-PSWBT,
    BKPF-BUDAT TO work area field WA_ZFIBUE-BUDAT,
    SY-DATUM TO work area field WA_ZFIBUE-CREDATE,
    SY-UZEIT TO work area field WA_ZFIBUE-CRETIME,
    Fetch running serial number (WA_ZFIBUE-SERIALNO) from ZFICO. This number will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "ZFIBUE" and KEY1 = "SERIALNO". The actual serial number will be stored in the field VALUE1.
    i. Insert WA_ZFIBUE INTO ZFIBUE.
    ii. Send email notification to the user (if it is not already sent to user on the same posting date).
    Use function module ‘SO_NEW_DOCUMENT_ATT_SEND_API1’ to send mail.
    Fetch email address and date of last email from ZFICO. These values will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "EMAIL" and KEY1 = "<USERNAME>". The email address will be stored in the field VALUE1 and posting date in VALUE2. Once mail is sent, VALUE2 is updated with latest posting date (BKPF-BUDAT).
    iii. Increment the running serial number and update ZFICO with new serial number.
    a. GV_ SERIALNO = WA_ZFIBUE-SERIALNO + 1
    b. Update ZFICO Set value1 = GV_SERIALNO
    Where PARAMTYPE = "BPM030307" AND
    SUBTYPE = "ZFIBUE" AND
    KEY1 = "SERIALNO".
    iv Move “VDFT” to BSEG-GSBER.
    v. Exit routine.
    4.6 Fetch MTART into GV_MTART from MARA where MATNR = BSEG-MATNR.
    4.7 If SY-BATCH = INITIAL AND GV_MTART <> ‘ROH’, issue the error message - “Maintain the mapping of product hierarchy <PRDHA> from article <MATNR> for <BUKRS>”. Else, go to step 3.8.
    4.8 If SY-BATCH <> INITIAL AND GV_MTART <> ‘ROH’, issue the error message - “Maintain product hierarchy on article master”. Go to step 3.10.
    4.9 Move GV_GSBER TO BSEG-GSBER.
    4.10 Exit Routine
    plz give me reply asap --this is very urgent
    thanks in advance
    swathi

    Hi Swathi,
    If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop.

  • Update Routine ... Help me Please--VERY URGENT

    Hi All ,
    I Moving data from Cube to ODS . Let me explain abt the records in the cube .
    There are 6 key figures in the cube as well as dimensions, UNIQKEY TRANSACTION is One Dimension and ARTICLE is another dimension which is having an Navigational attribute called CORE ELEMENT.
    I am showing the data with those two dimension and the key figures which are to be used in the routine.
    Charc----
    Key Figures
    UNIQKEY-ARTICLE-Coreelement--
    billqty     
    in base unit
    A00N----1006330--1--
    10.5
    A00M -
    1006320----2--
    2.5
    A00P-----1006330--1--
    10.5  
    A00P-----1006320--2--
    2.5
    A00Q-----1006320--2--
    2.5
    A00Q-----1006340--3--
    10.5
    Now Lets see what the core element numbers mean,
    core element 1 means -- fuel .
    Core elemnet other 1 -- food .   
    I need to move these data into ODS Which will have an extra field called No of items in the transaction --ITEMS.For this i need to write  a routine .
    The Logic is ...
    1.if Materail is of type 1(Means if the core element - 1)
    I need to Populate the No of items in tnx = 1 .--ITEMS.
    2.If Material is of type(Means if the core element)2or 3 I need to populate the billing quantity to the no of transcations.--ITEMS
    3. If the Uniqkey tanscation contains two line items as  suppose that you have 20 litres of fuel and 2 cans of coke, then No of Items in the transaction should be 3 and Billing Quantity in BUoM 22
    billing quantity in BUoM = 20 litres for the first line item and 2 for the second line item...
    then as the first line item is fuel, field No OF Items in the Transcation should be 1 (replacing the 20) + 2 = 3
    so the final result in the ODS should be billing quantity in BUoM = 22 and The Items in the Transcation= 3
    So the ODS Data should look like this.
    UNIQKEY--billqty--
    ITEMS
    in base unit 
    A00N--10.5--
    1
    A00M--2.5--
    2.5
    A00P--13--
    3.5
    A00Q--13--
    12.5  
    NOTE : IN the ODS only the UNIQKEY IS THE KEY FIELD and the rest are DATA FIELDS.
    I Posted this one before also. But didnt get proper responses.
    I am Pasting the piece of code which I have written . This code will work for the first two records in the cube , But it is failing for the UNIQKEY Transcation having Line items.
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: /BI0/PMATERIAL.
    DATA: TITEMS LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS,
           CORE_ELEMENT like /BI0/PMATERIAL-RPA_WGH1.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS8ZPOCTUS04
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BIC/AZPOCODS00-/BIC/ZTITEMS
               RETURNCODE LIKE SY-SUBRC "Do not use!
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    check not COMM_STRUCTURE-material is initial.
      select SINGLE RPA_WGH1
            INTO CORE_ELEMENT
            from /BI0/PMATERIAL
            where
            material = COMM_STRUCTURE-material
            and  OBJVERS <>'D'.
       IF CORE_ELEMENT EQ '1'.
       TITEMS = '1'.
         CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
           EXPORTING
             input         = titems
          IMPORTING
            OUTPUT        = titems
       ELSE.
       TITEMS = COMM_STRUCTURE-BILL_QTY.
       ENDIF.
    result value of the routine
      RESULT = TITEMS..
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    PLease give me ideas on how to acheive this . As I am not Aware of ABAP very well.. PLease try to give me the code. I hope one of you may got the same requirement before.
    Its very urgent and I need to deliver it today itself.
    Thanks in advance , you can mail me to [email protected]. If anybody intersted to discuss this Issue they can reach at +91 9845922955.

    Hi ,
    While I am moving the data from cube to ods . I need to create the update rules with cube -- 8cube . WHen i am doing this the billqty is a key figure in cube so that is not a problem but the ITEMS is not there in the cube ,SO for that I need to write a routine to populate that one.
    Its strange but the user what to analyse with the UNIQKEY transaction. And these objects will be added as navigational attributes to the Characteristic. as it acts as another dimension.
    He wants to laod these from ODS to Master data -Characteristic.
    to say for each transcation hpw many items are getting sold.
    Message was edited by: Nagarjuna Reddy
    ONce again thanks for the qucik replies
    Message was edited by: Nagarjuna Reddy

Maybe you are looking for

  • How can I remove an app forever, even from the cloud?

    There are a couple of apps that showed up on my iPhone -- I think my offspring downloaded them after they swiped my password >:( -- anyway, I removed them from my phone, but they still show up in the App Store > Updates > Purchased.  I would like for

  • How to maintain single vendor code.

    Friends, Please tell me the solution. My client's requirement is : they have one vendor ABC who has the multiple plants. He supplies material from various plants.  currently my client have maintain different vendor codes for different plants for same

  • Adjusting an arc or ellipse angle in Ai CS4

    I'm investigating the possibility of migrating from FHMX to AiCS4 (needless to say, it's not going well). Something very simple, but for the life of me, I can't find any way to do it. It's not even in the AI documentation. In AI, I want to create an

  • Why does my music sound weird in iTunes?

    When I play music. it sounds like a fan is running over the speakers. It sounds rubbish. But this is only in iTunes. When I play through Quick Time it sounds absolutly fine. I am running Mountain Lion and have updated iTunes and it still happens. PLE

  • Why are all the purchased in my store homepage not in my library  purchased

    I have many more songs in my store "purchased" list that are not in my library purchased or playlist.