How To load or display another java file class!!!

Master I am newbie just starting to learn about java. I have probelm to make my project for exam. anybody can help me for solve this probe thanks i need that soon.
I have 3 file's java and the probe is after login i want to go to another file to display.
- frm_login
- SMSCENTER
-SMSCENTERservice
This the source code:
-frm_login.java
/* Indonesia
* Ady Leo
* Univeristas Budi Luhur
import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextBox;
import javax.microedition.lcdui.TextField;
import javax.microedition.lcdui.Ticker;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
* @adyleo
* Jakarta, Indonesian
* contact me : [email protected]
* open source , u can use this free, edit this free, dont forget to feedback to me
public class frm_login extends MIDlet implements CommandListener {
private Display display;
private Form formLogin;
private TextField username;
private TextField pass;
private Ticker loginnews;
private Command cmdKeluar;
private Command cmdPilih;
private Command cmdSch;
private TextBox formAdmin;
private Ticker ticker3;
private Command cmdKeluar2;
private SMSCENTER smscenter;
private Alert alert;
public frm_login() {
display = Display.getDisplay(this);
formLogin = new Form("LOGIN");
username = new TextField("username", "", 50, TextField.ANY);
pass = new TextField("password", "", 50, TextField.PASSWORD);
loginnews = new Ticker("LOGIN USER");
cmdKeluar = new Command("Keluar", Command.EXIT, 1);
cmdPilih = new Command("Login", Command.OK, 2);
cmdSch = new Command("Check", Command.OK, 3);
formLogin.setTicker(loginnews);
formLogin.append(username);
formLogin.append(pass);
formLogin.addCommand(cmdKeluar);
formLogin.addCommand(cmdPilih);
formLogin.setCommandListener(this);
formAdmin = new TextBox("Welcome Halim", "Checks Your Flight Schedule", 40, TextField.ANY);
ticker3 = new Ticker("WELCOME ABDUL HALIM ALHADY");
formAdmin.setTicker(ticker3);
formAdmin.addCommand(cmdKeluar);
formAdmin.addCommand(cmdSch);
formAdmin.setCommandListener(this);
alert = new Alert("Error...!!!");
alert.setTimeout(2500);
public void startApp() {
display.setCurrent(formLogin);
public void pauseApp() {
public void destroyApp(boolean unconditional) {
public void commandAction(Command c, Displayable d) {
if (c == cmdKeluar) {
destroyApp(false);
notifyDestroyed();
} else if( c == cmdPilih ) {
String PESAN_ERROR = "";
if (username.getString().trim().equals(""))
PESAN_ERROR += " Username Atau Password Anda Salah ";
if (pass.getString().trim().equals(""))
PESAN_ERROR += " Silakan Coba Lagi!!! ";
if (username.getString().trim().equals("messi") && pass.getString().trim().equals("lodewijk")) {
display.setCurrent(formAdmin);
} else {
alert.setString(PESAN_ERROR);
display.setCurrent(alert);
} else if ( c == cmdKeluar2 ){
destroyApp(false);
notifyDestroyed();
//this the probe i want after i click the cmdSch will action to display another file java.. please help me
} else if ( c == cmdSch ) {
     smscenter = new SMSCENTER();     
               display.setCurrent(smscenter);
-SMSCENTER.java
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class SMSCENTER extends MIDlet implements CommandListener {
Display display;
SMSCENTERservice form;
List list;
Command cmExit;
public SMSCENTER() {
display = Display.getDisplay(this);
public void startApp() {
list = new List("Sistem SMS Center", List.IMPLICIT);
list.append("cek detil ", null);
list.append("cek service ", null);
list.append("cek surat", null);
cmExit = new Command("Keluar", Command.EXIT, 1);
list.addCommand(cmExit);
list.setCommandListener(this);
display.setCurrent(list);
public void pauseApp() {
public void destroyApp(boolean unconditional) {//KOMPONEN 3
public void exitMIDlet() {
destroyApp(false);
notifyDestroyed();
public void commandAction(Command c, Displayable s) {//even dari tombol"nya
if (c == List.SELECT_COMMAND) {
switch (list.getSelectedIndex()) {
case 0://jika menu yang pertama yg dipilih maka jalankan
form = new SMSCENTERservice(this, display, 0);
display.setCurrent(form);
break;
case 1:
form = new SMSCENTERservice(this, display, 1);
display.setCurrent(form);
break;
case 2:
form = new SMSCENTERservice(this, display, 2);
display.setCurrent(form);
break;
} else if (c == cmExit) {
exitMIDlet();
-SMSCENTERservice.java
import java.io.IOException;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.io.*;
import java.util.*;
public class SMSCENTERservice extends Form implements CommandListener, Runnable {
private Display display;
private Command cmdBack, cmdKirim;
private SMSCENTER midlet;
private TextField tfdetil,tfservice,tfsurat;
private TextBox arti =new TextBox("","",1024,0);
private Command cmdInputK = new Command("Input", Command.OK,1);
private Command cmdKembaliK = new Command("Kembali", Command.BACK,2);
private Alert alert,alert2,alert3,alert4;
Object o;
koneksi konek = new koneksi();
String url = "";
private int Index;
private String messaage, address, pesan;
private int index;
private String port;
public SMSCENTERservice(SMSCENTER midlet, Display display, int index) {
super("Sistem SMS Gateway");
this.display = display;
this.midlet = midlet;
this.index = index;
switch (index) {
case 0:
append("cek detil");
tfdetil = new TextField("DETIL SERVICE", "", 160, TextField.ANY);
append(tfdetil);
break;
case 1:
     append("cek service ");
tfservice = new TextField("SERVICE", "", 160, TextField.ANY);
          append(tfservice);
break;
case 2:
append("cek surat");
tfsurat = new TextField("SURAT SERVICE", "", 160, TextField.ANY);
append(tfsurat);
break;
cmdBack = new Command("Kembali", Command.BACK, 1);
addCommand(cmdBack);
cmdKirim = new Command("Kirim", Command.OK, 1);
addCommand(cmdKirim);
setCommandListener(this);
public void commandAction(Command c, Displayable d) {
     o=c;
if (c == cmdBack) {
display.setCurrent(midlet.list);
} else if (c == cmdKirim) {
switch (index) {
case 0:
url = "http://localhost/service/proses.php?katakunci=detil_service&NomorDetil=" + tfdetil.getString();
break;
case 1:
url = "http://localhost/service/proses.php?katakunci=service&NomorService=" + tfservice.getString();
break;
case 2:
url = "http://localhost/service/proses.php?katakunci=surat_service&NomorSurat=" + tfsurat.getString();
break;
public void run() {
try {
     if(konek.downloadpage(url))
               arti.setString(konek.b.toString());
               arti.addCommand(cmdInputK);
               arti.addCommand(cmdKembaliK);
               arti.setCommandListener(this);
               display.setCurrent(arti);
else
          alert2 = new Alert("warning!", "Masukan kata lebih dahulu....",null, AlertType.INFO);
          display.setCurrent(alert2);
catch (IOException e)
Sorry if i am posting not on the good way or worng places, anyway i hope someone can help me just in form login i am sutck...
I am student just newbie for java programing.
thnks a lot

Please reformat that mess with {noformat}{noformat} tags. No-one can read it until you do.                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How to load and display the external flv video files in dynamicly and the how to control the flv fil

    How to load and display the external flv video files in dynamicly using AS 3.0
    and  How to control the flv file  add the play paus button and add seekbar.
    I have using to load the flv file following code
    var flvPlaceHolder1:MovieClip = new MovieClip();
    var vid1:Video = new Video(734, 408);
    flvPlaceHolder1.addChild(vid1);
    addChild(flvPlaceHolder1);
    flvPlaceHolder1.x = 1059;
    flvPlaceHolder1.y = 152;
    var nc1:NetConnection = new NetConnection();
    nc1.connect(null);
    var ns1:NetStream = new NetStream(nc1);
    vid1.attachNetStream(ns1);
    var listener1:Object = new Object();
    listener1.onMetaData = function(evt:Object):void {};
    ns1.client = listener1;
    ns1.play("GV-1600 TURNING.flv");
    ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
    function statusChanged1(ns1:NetStatusEvent):void
             trace(ns1.info.code);
            if (ns1.info.code == 'NetStream.Buffer.Empty')
                 trace('the video has ended');
                 removeChild(flvPlaceHolder1);
                 //trace('removeChild');
                gotoAndPlay(1786);
    then how to add the play,paus ,full screen button    and   seekbar,volumebar.

    I have to Create the flash presentation for our company product
    In this presentation the left  side the text animation are displayed then right side the our product video is displayed.
    In this presentation i need the following option :
    1, The first product video and animation is finished then the next product is played
    2, then the video displayed  (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
    3, then the playing video i control  it play, stop, paus button and volume bar, seek bar.
    4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
    I have finished first two steps 1 and 2
    the following are the screen short and code:-
    code :-
    var count=0;
    var flvPlaceHolder2:MovieClip = new MovieClip();   
    var vid2:Video = new Video(734, 408);
    flvPlaceHolder2.addChild(vid2);
    addChild(flvPlaceHolder2);
    flvPlaceHolder2.x = 1059;
    flvPlaceHolder2.y = 152;
    var nc2:NetConnection = new NetConnection();
    nc2.connect(null);
    var ns2:NetStream = new NetStream(nc2);
    vid2.attachNetStream(ns2);
    var listener2:Object = new Object();
    listener2.onMetaData = function(evt:Object):void {};
    ns2.client = listener2;
    ns2.play("GS-4000.flv");
    this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
    function BtnFadeIn2(event:Event):void
        if (this.currentFrame == 387)
            /*flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            trace('Screen size is changed');*/
            if(count==0)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            count++;
    ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
    function statusChanged2(ns2:NetStatusEvent):void
        trace(ns2.info.code);
        if (ns2.info.code == 'NetStream.Buffer.Empty')
                trace('the video has ended');
                 removeChild(flvPlaceHolder2);
                 //trace('removeChild');
                gotoAndPlay(433);
    flvPlaceHolder2.buttonMode=true;
    flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
    function home2(e:MouseEvent):void
        if(vid2.width==734 && vid2.height==408)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
        else
            flvPlaceHolder2.x = 1059;
            flvPlaceHolder2.y = 152;
            vid2.width=734;
            vid2.height=408;

  • How to invoke another Java file in Java program?

    Hello all,
    Now I am building a commnity of agents that can talk in Java, I have another Java-Based dialogue system to handle the dialogue between the agents. But I don'y know how to invoke the Java dialogue system file in the agent class.
    Is there any methods can call another .java file in a Java program?
    Help!!!!!please

    Yep, vaguest of the vaguey vague vague.
    Anyhoo,
    I'm guessing you want to call a method from a different class?
    Assuming you have the "Runner" class and then "Agent1", "Agent2", etc.
    Agent1 whatever = new Agent1();

  • How to compile and run a .java file from another java program

    hello,
    can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?

    Well a smarter way of implementing this is by using a solution provided by Java Itself.
    If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
    http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
    How do i do that ??
    Check out the below articles which would help you of how to do that
    http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
    http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
    http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
    Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
    Hope that might help :)
    REGARDS,
    RaHuL

  • How to load other obejects in flash file after intro using ActionScript 3.0

    How to load other obejects in flash file after intro using ActionScript 3.0 or any other method all in same fla file. see blow intro screen shot ,this one playing repeatedly without loading other fla pages .only way to load other pages is click on Skip intro .see second screeshot below .i need that site to load after intro .
    see codes already in
    stop();
    skipintro_b.addEventListener(MouseEvent.CLICK, skipintro_b_clicked);
    function skipintro_b_clicked(e:MouseEvent):void{
    gotoAndStop("whoweare");
    There is another script there
    /* Simple Timer
    Displays a countdown timer in the Output panel until 30 seconds elapse.
    This code is a good place to start for creating timers for your own purposes.
    Instructions:
    1. To change the number of seconds in the timer, change the value 30 in the first line below to the number of seconds you want.
    var fl_TimerInstance:Timer = new Timer(1000, 30);
    fl_TimerInstance.addEventListener(TimerEvent.TIMER, fl_TimerHandler);
    fl_TimerInstance.start();
    var fl_SecondsElapsed:Number = 1;
    function fl_TimerHandler(event:TimerEvent):void
              trace("Seconds elapsed: " + fl_SecondsElapsed);
              fl_SecondsElapsed++;
    i have no knowledge about these thing ,any help really appreciated .

    Ned Murphy Thank you very Much .It is working .Great advice

  • Trying to compile a .java file from another .java file

    Hello,
    I'm trying to compile a .java file from another .java file using Runtime.exec...
    String c[]=new String[3];
    c[0]="cmd.exe"; c[1]="/c" ; c[2]="javac Hello.java";
    Process p=Runtime.exec(c);
    If anyone can help me in atleast getting the command prompt when Runtime.exec("cmd.exe") is executed...that would be great...I tried out notepad.exe, calc, explorer instead of cmd.exe...all the commands display their respective windows..except cmd.exe...the command prompt doesnt appear...
    Please help me ASAP....
    Thanks for your help in advance...
    Regards.
    AKhila.

    try this. ur code will be compliled and will get .class file. but console won't appear. is it a must for u?
    public class Exec{
         public static void main(String a[]) throws Exception{
              String c[]=new String[3];
              c[0]="cmd.exe"; c[1]="/c" ; c[2]="javac Hello.java";
              Process p=Runtime.getRuntime().exec(c);
              // or Runtime.getRuntime().exec("javac Hello.java");

  • Button to launch another java file????

    Hi there,
    Was wondering if someone could help with the following:
    I have a button, which once clicked opens another java file, and am aving some difficulty in doing this.
    The file which has the button is:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.util.*;
    class JFrameHolidayPlannerGUI extends JFrame
         //declare the variable using in here
         private JButton exit;
         private JButton clear;
         private JTextField t;
         private JLabel employeeId;
         private JTextField t2;
         private JLabel days;
         private JButton find;
         private JMenuItem close;
         private JMenu file;
         private JMenuBar menubar;
         private JButton add;
         private JPanel panel1;
              public JFrameHolidayPlannerGUI()
              //Set the title of the frame
              super("Company Holiday Tracking System");
              this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Container contentPane = this.getContentPane();
              //Created a pane with four panels and null columns
              contentPane.setLayout(new GridLayout(4,0));
              JMenuBar menubar = new JMenuBar();
              setJMenuBar(menubar);
              JMenu file = new JMenu("file");
              JMenuItem open = new JMenuItem ("Open...");
              JMenuItem save = new JMenuItem("Save");
              JMenuItem close = new JMenuItem ("Close");
              JMenuItem print = new JMenuItem ("Print...");
              menubar.add(file);
              file.add(open);
              file.add(print);
              file.add(close);
              file.add(save);
              close.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent e)// Define the action to take after user enters the name
                             //if (e.getSource() == exit)
                             System.exit(0);
              JPanel panel = new JPanel();
              panel.setLayout(new FlowLayout(FlowLayout.LEFT));
              contentPane.add(panel);
              JLabel employeeId = new JLabel("Please Enter the employeeId", JLabel.CENTER);
              final JTextField t = new JTextField(15);
              t.setToolTipText("Please Enter the employeeId");
              t.setEditable(true);
              t.setText("Enter employeeId in here");
              JButton find = new JButton("Search for a Record");
              find.setToolTipText("Click to search for an employee record");
              find.addActionListener(
                   new ActionListener()
                        public void actionPerformed (ActionEvent e)
                             System.out.println("time");
              panel.add(employeeId);
              panel.add(t);
              panel.add(find);
              contentPane.add(panel);
              JPanel p2 = new JPanel();
              p2.setLayout(new FlowLayout(FlowLayout.LEFT));
              contentPane.add(p2);
              days = new JLabel("How many days would you like?", JLabel.LEFT);
              final JTextField t2 = new JTextField(15);
              t2.setToolTipText("How manys days would you like?");
              t2.setEditable(true);
              t2.setText("Enter the numbers of days in here");
              JButton submit = new JButton ("SUBMIT");
              find.setToolTipText("Press enter to submit holiday request");
              submit.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent e)
                             JFrame = new JFrame();
                             frame.addWindowListener(new WindowAdapter() {
                                       public void windowClosing(WindowEvent e) {
                                            System.open();
              p2.add(days);
              p2.add(t2);
              p2.add(submit);
              contentPane.add(p2);
              JPanel panel1 = new JPanel();
              panel1.setLayout(new FlowLayout(FlowLayout.LEFT));
              contentPane.add(panel1);
              JButton save1 = new JButton("Save");
              save1.setToolTipText("Click to save");
              panel1.add(save1);
              exit = new JButton("Exit");
              exit.setToolTipText("Click to exit");
              panel1.add(exit);
              exit.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent e)// Define the action to take after user enters the name
                             //if (e.getSource() == exit)
                             System.exit(0);
              JButton clear = new JButton("Clear");
              clear.setToolTipText("Click to clear the information");
              panel1.add(clear);
              clear.addActionListener(
                   new ActionListener()
                        public void actionPerformed(ActionEvent e)// Define the action to take after user enters the name
                             t2.setText(" ");
                             t.setText(" ");
              add = new JButton("Add");
              add.setToolTipText("Click to add an employee");
              panel1.add(add);
              this.pack();
              this.setVisible(true);
         public static void main(String[] arg)
              JFrameHolidayPlannerGUI jf = new JFrameHolidayPlannerGUI();
    and the file that needs to be opened is:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.util.*;
    class JFrameSubmitValidate extends JFrame
         private static String label = "Are you sure you want to Submit?";
              public JFrameSubmitValidate()
                   //Set the title of the frame
                   super("Vaidator");
                   this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   Container contentPane = this.getContentPane();
                   //Created a pane with four panels and null columns
                   contentPane.setLayout(new GridLayout(2,0));
                   JLabel validate = new JLabel(label);
                   JButton OK = new JButton("OK");
                   JPanel panel = new JPanel();
                   contentPane.add(validate);
                   contentPane.add(OK);
                   this.pack();
                   this.setVisible(true);
              public static void main(String[] arg)
                   JFrameSubmitValidate sv = new JFrameSubmitValidate();
    thanx for your time.
    kev.

    Similarly to this above discussion, I would like to know how to launch another java file by clicking a button "submit". Can you guys guide me based on the code i have shown below..?
    import java.awt.*;
    import java.awt.event.*;
    class MenuFrame extends Frame implements ActionListener
    Label login=new Label("Login ID :",Label.CENTER);
    TextField lname=new TextField(12);
    Label pass=new Label("Password :",Label.CENTER);
    TextField lpass=new TextField(10);
    Button submit=new Button("Submit");
    public MenuFrame(String title)
    super(title);
    setLayout(new FlowLayout());
    add(login);
    add(lname);
    add(pass);
    add(lpass);
    add(submit);
    submit.addActionListener(this);
    addWindowListener(new CloseWindow());
    public void actionPerformed(ActionEvent e)
    Object source=e.getSource();
    if(source == submit)
    lname.setText("w");
    lpass.setText("w");
    repaint();
    public static void main(String args[])
    MenuFrame m=new MenuFrame("Java Chat Application");
    m.setSize(200,200);
    m.show();
    class CloseWindow extends WindowAdapter{
    public void windowClosing(WindowEvent event){
    System.exit(0);

  • How to load data from a  flat file which is there in the application server

    HI All,
              how to load data from a  flat file which is there in the application server..

    Hi,
    Firstly you will need to place the file(s) in the AL11 path. Then in your infopackage in "Extraction" tab you need to select "Application Server" option. Then you need to specify the path as well as the exact file you want to load by using the browsing button.
    If your file name keeps changing on a daily basis i.e. name_ddmmyyyy.csv, then in the Extraction tab you have the option to write an ABAP routine that generates the file name. Here you will need to append sy-datum to "name" and then append ".csv" to generate complete filename.
    Please let me know if this is helpful or if you need any more inputs.
    Thanks & Regards,
    Nishant Tatkar.

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • How to load the data from .csv file to oracle table???

    Hi,
    I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
    Thanks in advance

    981145 wrote:
    Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
    the command is
    sqlldrType it and see if you have it installed.
    Have a look also at the FAQ link posted by Marwin.
    There are plenty of examples also on the web.
    Regards.
    Al

  • How to load the data from excel file into temprory table in Forms 11g?

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Declare
        v_full_filename         varchar2(500);
        v_server_path           varchar2(2000);
        v_separator             VARCHAR2(1);
        v_filename              VARCHAR2(400);
        filename                VARCHAR2 (100);
        v_stop_load             varchar2 (2000);
        v_rec_error_log         varchar2(4000);
        v_error_log             varchar2(4000);
        ctr                     NUMBER (12);
        cols                    NUMBER (2);
        btn                     number;
        RES                     BOOLEAN;   
        application             ole2.obj_type;
        workbooks               ole2.obj_type;
        workbook                ole2.obj_type;
        worksheets              ole2.obj_type;
        worksheet               ole2.obj_type;
        cell                    ole2.obj_type;
        cellType                ole2.OBJ_TYPE;
        args                    ole2.obj_type;
        PROCEDURE olearg
        IS
        args   ole2.obj_type;
        BEGIN
        args := ole2.create_arglist;
        ole2.add_arg (args, ctr);                                
        ole2.add_arg (args, cols);                                   
        cell := ole2.get_obj_property (worksheet, 'Cells', args);
        ole2.destroy_arglist (args);
        END;
    BEGIN
    v_full_filename := client_get_file_name(directory_name => null
                                     ,file_name      => null
                                     ,file_filter    => 'Excel  files (*.xls)|*.xls|'  
                                                                            ||'Excel  files (*.xlsx)|*.xlsx|'                                                                 
                                     ,message        => 'Choose Excel file'
                                     ,dialog_type    => null
                                     ,select_file    => null
    If v_full_filename is not null Then
    v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
    v_filename := v_separator||v_full_filename ;
    :LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);                                
    RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));     
    --Begin load data from EXCEL
    BEGIN
        filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
        application := ole2.create_obj ('Excel.Application');
        ole2.set_property (application, 'Visible', 'false');
        workbooks := ole2.get_obj_property (application, 'Workbooks');
        args := ole2.create_arglist;
        ole2.add_arg (args, filename); -- file path and name
        workbook := ole2.get_obj_property(workbooks,'Open',args);
        ole2.destroy_arglist (args);
        args := ole2.create_arglist;
        ole2.add_arg (args, 'Sheet1');
        worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
        ole2.destroy_arglist (args);
        ctr := 2;                                                     --row number
        cols := 1;                                                -- column number
        go_block('xxx');
        FIRST_RECORD;  
        LOOP       
                --Column 1 VALUE --------------------------------------------------------------------
            olearg;
            v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            :item1 := v_stop_load;
            cols := cols + 1;                                                      
              --Column 2 VALUE --------------------------------------------------------------------
            olearg;
            :item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            cols := cols + 1;
            --<and so on>
        ole2.invoke (application, 'Quit');
        ole2.RELEASE_OBJ (cell);
        ole2.RELEASE_OBJ (worksheet);
        ole2.RELEASE_OBJ (worksheets);
        ole2.RELEASE_OBJ (workbook);
        ole2.RELEASE_OBJ (workbooks);
        ole2.RELEASE_OBJ (application);
    END;
    --End load data from EXCELPlease mark it as answered if you helped.

  • How  to load the data from excel  file  into table in oracle using UTL_FI

    How to load the data from excel file into table in oracle
    and from table to excel file
    using UTL_FILE package
    Please give me some example

    This is something i tried in oracle apex
    http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Regards,
    CKLP

  • Step by Step details on how to load data from a flat file

    hi can anyone explain how to load data from a flat file. Pls giv me step by step details. thnx

    hi sonam.
    it is very easy to load data from flat file. whn compared with other extrations methods...
    here r the step to load transation data from a flat file.......
    step:1 create a Flat File.
    step:2 log on to sap bw (t.code : rsa1 or rsa13).
    and observe the flat file source system icon. i.e pc icon.
    step:3 create required info objects.
    3.1: create infoarea
         (infoObjects Under Modeling > infoObjects (root node)-> context menu -
    > create infoarea).
    3.2:  create char /keyfig infoObject Catalog.(select infoArea ---.context menu --->create infoObject catalog).
    3.3:   create char.. infoObj and keyFig infoObjects accourding to ur requirement and activate them.
    step:4 create infoSource for transaction data and create transfer structure and maintain communication structure...
        4.1: first create a application component.(select InfoSources Under modeling-->infosources<root node>>context menu-->create  applic...component)
       4.2: create infoSource  for transation data(select appl..comp--.context menu-->create infosource)
    >select O flexible update and give info source name..
    >continue..
    4.4: *IMp* ASSIGN DATASOURCE..
      (EXPAND APPLIC ..COMP..>EXPAND YOUR INFOSOURCE>CONTEXT MENU>ASSIGN DATASOURCE.)
    >* DATASOURCE *
    >O SOURCE SYSTEM: <BROWSE AND CHOOSE YOUR FLAT FILE SOURCE SYSTEM>.(EX:PC ICON).
    >CONTINUE.
    4.5: DEFINE DATASOURCE/TRANSFER STRUCTURE  FOR IN FOSOURCE..
    > SELECT TRANSFER STRUCTURE TAB.
    >FILL THE INFOOBJECT FILLED WITH THE NECESSARY  INFOOBJ IN THE ORDER OR SEQUENCE OF FLAT FILE STRUCTURE.
    4.6: ASSIGN TRANSFER RULES.
    ---> NOW SELECT TRANSFER RULES TAB. AND SELECT PROPOSE TRANSFER RULES SPINDLE LIKE ICON.
    (IF DATA TARGET IS ODS -
    INCLUDE 0RECORDMODE IN COMMUNICATION STRUCTURE.)
    --->ACTIVATE...
    STEP:5  CREATE DATATARGET.(INFOCUBE/ODS OBJECT).
    5.1: CREATE INFO CUBE.
    -->SELECT YOUR INFOAREA>CONTEXT MENU>CREATE INFOCUBE.
    5.2: CREATE INFOCUBE STRUCTURE.
    ---> FILL THE STRUCTURE PANE WILL REQUIRE INFOOBJECTS...(SELECT INFOSOURCE ICON>FIND UR INFOSOURCE >DOUBLE CLICK > SELECT "YES" FOR INFOOBJECT ASSIGNMENT ).
    >MAINTAIN ATLEAST  ON TIME CHAR.......(EX; 0CALDAY).
    5.3:DEFINE AND ASSIGN DIMENSIONS FOR YOUR CHARACTERISTICS..
    >ACTIVATE..
    STEP:6 CREATE UPDATE RULES FOR INFOCUDE USING INFOSOURCE .
    >SELECT UR INFOCUBE >CONTEXT MENU> CREATE UPDATE RULES.
    > DATASOURCE
    > O INFOSOURCE : _________(U R INFOSOURCE). AND PRESS ENTER KEY.......
    >ACTIVATE.....UR UPDATE RULES....
    >>>>SEE THE DATA FLOW <<<<<<<<----
    STEP:7  SCHEDULE / LOAD DATA..
    7.1 CREATE INFOPACKAGE.
    --->SELECT INFOSOURCE UNDER MODELING> EXPAND UR APPLIC.. COMP..> EXPAND UR INFOSOURCE..> SELECT UR DATASOURCE ASSIGN MENT ICON....>CONTEXT MENU> CREAE INFOPACKAGE..
    >GIVE INFOPACKAGE DISCREPTION............_________
    >SELECT YOUR DATA SOURCE.-------> AND PRESS CONTINUE .....
    >SELECT EXTERNAL DATA TAB...
    > SELECT *CLIENT WORKSTATION oR APPLI SERVER  >GIVE FILE NAME > FILE TYPE> DATA SAPARATER>
    >SELECT PROCESSING TAB
    > PSA AND THEN INTO DATATARGETS....
    >DATATARGET TAB.
    >O SELECT DATA TARGETS
    [ ] UPDATE DATATARGET CHECK BOX.....
    --->UPDATE TAB.
    O FULL UPDATE...
    >SCHEDULE TAB..
    >SELECT O START DATA LOAD IMMEDIATELY...
    AND SELECT  "START" BUTTON........
    >>>>>>>>>>
    STEP:8 MONITOR DATA
    > CHECK DATA IN PSA
    CHECK DATA IN DATA TARGETS.....
    >>>>>>>>>>> <<<<<<<<<----
    I HOPE THIS LL HELP YOU.....

  • EJB Class loader and regular Java files class loader.

    Hi,
    Is the EJB's class loader the same as a "regular" java files class loader OR weblogic
    has 2 class loaders, one for each???
    Thanks,
    les.

    les <[email protected]> wrote:
    Hi,
    Is the EJB's class loader the same as a "regular" java files class loader OR weblogic
    has 2 class loaders, one for each???Yes. Exact classloading architecture depends on which WebLogic version you use. If you
    use 6.x+, you may want to read this article:
    http://www.onjava.com/pub/a/onjava/2001/07/25/ejb.html
    Thanks,
    les.--
    Dimitri

  • How to load and display a byte array (jpeg) image file dynamically in Flex?

    My web service client (servlet) received a binary jpeg data from an Image Server. The Flex application invokes the
    servlet via HttpService and receives the binary jpeg data as byte array.  How could it be displayed dynamically
    without writing the byte array to a jpeg file?  Please help (some sample code is very much appreciated).

    JPEGEncoder is only useful for converting BitmapData to ByteArray, not the other way around.
    By the way JPEGEncoder and PNGEncoder are part of the Flex SDK now, so no need to use AS3Lib (alltough it's a good library to have around).
    To display/use a ByteArray as image, use a Loader instance with the loadBytes method.
        Loader.loadBytes(bytes:ByteArray, context:LoaderContext = null);
    Listen for the complete event on the Loader.contentLoaderInfo and get the BitmapData in the event handler.
    private function loadJpeg():void {
        var loader:Loader = new Loader();
        loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderCompleteHandler);
        //jpgBA is the ByteArray loaded from webservice
        loader.loadBytes(jpgBA);
    private function loaderCompleteHandler(evt:Event):void {
        var t:LoaderInfo = evt.currentTarget as LoaderInfo;
        // display the jpeg in an Image component
        img.source = t.content;
    <mx:Image id="img" scaleContent="false" />

Maybe you are looking for

  • PLD for Sale Order

    Hi all! In PLD, when i enter quite information on End of Report but these information are displayed in next page( of End of Report) only at middle of page. It's not display on the top of pgae. Therefore, there is space in nect page. How can i delete

  • PDF preview of iPhoto book shows image degradation

    For years I have made iPhoto books first designing pages with text and color imagery in InDesign, then exporting PDFs of the pages to iPhoto via Automator, and then placing the designed pages into blank pages of the iPhoto book. Prior to printing I p

  • After 2,1 update cannot call from 3G

    The long waited 2.1 is good for nothing, contrary is worst than before: - I try to call from my contact, start dialing and in a second call end. On E work fine. - Contact still lagging - Reception and voice quality same bag quality. And probably more

  • WAS SP9 SR1 ABAP+Java Add in installation , j2EE engine is not running

    I have completely installed SAP Netweaver SP9 SR1 WAS ABAP+JAVA addin and Installed XI completely. After few days j2EE engine stops running. I have applied the license after requesting from SAP Mareketplace and applied in WAS ABAP using SLICENSE tran

  • SOLVED (?): my problem with HotSync (USB, Zire 72 and Win XP)

    As noted in many other messages, it is not uncommon for the HotSync to fail with USB connection when the "Local USB" option disappears from the manager menu. I noticed this earlier today and like many others had information that I needed to transfer