Problem reading data from textField?

I have a problem in my program I'm currently doing.
I have a textArea and a textField in a container.
Inside the textArea will be displayed some questions which require user to give answers to in the textField.
When user types something in the textField and presses enter, an actionListener will trigger and take in String.
My problem is how do you wait for the user to type something in the textField?
thanks

Hi
I am trying to read a value from a textField object in the following code, but its returning an empty string. any kind of help would be appreciated. thanks.
bhavesh
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.io.*;
import java.lang.*;
public class Applet1 extends Applet implements ActionListener, TextListener{
     String text = "";
     Image logo;
     static TextField usr;
     static TextField pswd;
     static Button logOn;
     public boolean authenticate(Graphics g){
          g.setColor(Color.RED);
          g.setFont(new Font("Monospaced", Font.PLAIN, 20));
          text = "Username:";
          g.drawString(text, 300, 300);
          text = "Password:";
          g.drawString(text, 300, 325);
          g.setFont(new Font("Serif", Font.PLAIN, 20));
          usr = new TextField(40);
          usr.setBounds(420,280, 200,20);
          usr.setEditable(true);
          //usr.addActionListener(this);
          add(usr);
          //add (new Label("Enter number:"));
          pswd = new TextField(40);
          pswd.setEditable(true);
          pswd.setBounds(420,310, 200,20);
          //pswd.addActionListener(this);
          add(pswd);
          //add (new Label("Enter number:"));
     logOn = new Button("Log on ...");
     logOn.setBounds(380,340,80,20);
          logOn.addActionListener(this);
          add(logOn);
          return true;
     public void actionPerformed(ActionEvent ae){
          System.out.print(usr.getText()+"rr\n"+ae);
          System.out.print(pswd.getText()+"bb\n");
          if ( usr.getText().compareTo("gusr")==0 && pswd.getText().compareTo("gpswd")==0 ){
               System.out.print("COOOOOOL");
          else{
               System.out.print("BAD");
     public void textValueChanged(TextEvent te){
          String foo = usr.getText();
          System.out.print("\n\nevent please\n\n"+foo+" +"+usr.getSelectedText());
     public void paint(Graphics g) {
          logo = getImage(getCodeBase(),"logo2.gif");
          g.setColor(Color.WHITE);
          g.fillRect(0,0,1000,625);
          g.drawImage(logo, 0, 0, this);
          g.setFont(new Font("SansSerif", Font.ITALIC, 20));
          g.setColor(Color.BLUE);
          text = "Welcome to AMPD Timecard!";
          g.drawString(text, 300, 255);
          authenticate(g);

Similar Messages

  • Problem reading data from oracle database 11g using OleDbDataReader

    Hi everyone I work with Visual Studio 2010 and C# programming language. I have a problem reading data from the oracle database. I created a WPF application with my main Window Xaml and class files and 1 more class called DataFiles. The thing I want is to read some data from the database on my grid in my WPF window. Problem is even though it connects to the database the grid is always empty. It isn't the connection string as I tested it and it connects to the database the problem seems to be in showing the LASTNAME (PREZIME in my native tongue) on the grid which is what it's supposed to do.
    Here is the code:
    Data Files Code
    using System;
    using System.Collections.ObjectModel;
    using System.Data.SqlClient;
    using System.Data.OleDb;
    namespace SQLKonekcija
        public class clsEmployee
            public string Prezime { get; set; }
        public class DataAccess
            OleDbConnection oleCon;
            OleDbCommand oleComd;
            public DataAccess()
                string connectionString = "provider=ORAOLEDB.ORACLE; data source=ORCL; password=****; user id=****;";
                oleCon = new OleDbConnection(connectionString);
            public ObservableCollection<clsEmployee> GetAllEmployee()
                ObservableCollection<clsEmployee> EmpCol = new ObservableCollection<clsEmployee>();
                oleComd = new OleDbCommand();
                oleComd.Connection = oleCon;
                oleComd.CommandText = "Select PREZIME from UPOSLENICI";
                oleCon.Open();
                OleDbDataReader Reader = oleComd.ExecuteReader();
                Reader.Read();
                while (Reader.Read())
                    EmpCol.Add(new clsEmployee()
                        Prezime = Reader["PREZIME"].ToString()
                oleCon.Close();
                return EmpCol;
            }And here is my main window.cs code
    public partial class MainWindow : Window
            clsEmployee objEmpToAdd;
            DataAccess objDs;
            public MainWindow()
                InitializeComponent();
            private void Window_Loaded(object sender, RoutedEventArgs e)
                objDs = new DataAccess();
                dgEmp.ItemsSource = objDs.GetAllEmployee();And the XAML
    <Window x:Class="SQLKonekcija.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
        <Grid>
            <DataGrid AutoGenerateColumns="False" Height="237"
                      HorizontalAlignment="Left" Margin="18,66,0,0" Name="dgEmp"
                      VerticalAlignment="Top" Width="466" ColumnWidth="*"
                       >
                <DataGrid.Columns>
                    <DataGridTextColumn Binding="{Binding PREZIME}" Header="Prezime"></DataGridTextColumn>
                </DataGrid.Columns>
            </DataGrid>
            <TextBlock Height="42" HorizontalAlignment="Left" Margin="18,15,0,0" Name="textBlock1" Text="TEST CONNECTION" VerticalAlignment="Top" Width="462" TextAlignment="Center" FontSize="28" FontWeight="ExtraBold" />
        </Grid>
    </Window>
    The guys on the MSDN forums told me I should ask the question here so sorry if it's not your field.
    Hope u guys can help, thanks.

    I tried it, commented out the reader.read and have the following connection string
    string connectionString = "provider=ORAOLEDB.ORACLE; data source=ORCL; password=****; user id=****; OLEDB.NET=True"
    Unfortunately the result is the same.
    Edited by: Dino2dy on Nov 24, 2011 12:53 AM

  • JavaConsole Error: Problem reading data from server

    HI All
    We are getting this error on java console on a page:
      Error: Problem reading data from Server - Java.Security.AccessControlException:access denied (java.util.PropertyPermission http.strictpostredirect Read)
    In this page we are not firing  a SQL Query of huge data.
    Any suggestions on this why it is happening?
    Thanks
    Manisha

    Manisha,
    I think JVM(Java Virtual Machine) is trying to access something at network level and it cant able to find it.Or any new patches of java is installed.
    Or may be due to IIS or Applet,Don't know exactly.
    You can find some answers in below links:
    http://java.sun.com/j2se/1.4.2/docs/api/java/security/AccessControlException.html
    http://www.webdeveloper.com/forum/archive/index.php/t-46358.html
    -Suresh

  • Problem reading data from two tables

    Hi experts,
    I'm developing a JDBC - IDOC scenario that needs to read data from two oracle tables. I have created a BPM that has a initial fork for the two channels and it works fine.
    The problem is that I need to read data from the first, two or both tables depending if there is data to read. If there is data in the two tables it works, but if only there is data in one of the two tables, I have read problems. I have tryed to set the 'neccesary branches' to 1 but this is a problem when I have data in both tables.
    Any idea?
    Best Regards,
    Alfredo Lagunar.

    Hi,
    have your fork step inside a block and then right-click your block to insert a deadline branch to your BPM process and specify the time after which your BPM process should be cancelled.....so if in that time, you get data from both tables, your BPM will work okay otherwise if that time is over, then your BPM process will be cancelled.
    Regards,
    Rajeev Gupta

  • Problem reading data from nested internal table.

    Hi,
    Below is my code;
    *********SAP Code********
    TYPES: BEGIN OF v54a0_scdd,
             fknum  LIKE vfkk-fknum,
             change LIKE vfkkd-updkz,
             x      TYPE v54a0_scd,
             y      TYPE v54a0_scd,
             tvtf   LIKE tvtf,
           END OF v54a0_scdd.
    SCD table for dialog
    TYPES: v54a0_scdd_tab TYPE v54a0_scdd OCCURS 1.
    *********SAP Code********
    *Custom declaration*****
    data: wa_freight_costs type v54a0_scdd_tab.
    data: it_freight_costs type v54a0_scdd_tab occurs 0.
    *****Here data is getting appended to it_freight_costs. P_frieght_costs is coming from standard program.
         move p_freight_costs TO wa_FREIGHT_COSTS.
         append wa_freight_costs to it_freight_costs.
         clear wa_freight_costs.
    ***Now the problem is here. I am not able to read the data from the nested internal table x-item.
    if i use <fs_f_costs> to move data from it_freight_costs in the outer loop, i get a syntax error; <i> "the line type of the table it_freight_costs is not compatible with field symbol type <fs_f_costs>" </i>
         FIELD-SYMBOLS: <fs_f_costs> type line of v54a0_scdd_tab.
          LOOP AT it_freight_costs assigning <fs_f_costs>.
              LOOP AT <fs_f_costs>-x-item ASSIGNING <fs_freight_item>.        
                  <b> I want to read <fs_freight_item>-vfkp-netwr.</b> 
             ENDLOOP.
    Can anyone guide me?

    A quick look at how I would do this. Note I haven't checked if this compiles just done a quick brain-dump.
      DATA: lr_f_costs TYPE REF TO v54a0_scdd_tab,
            lr_f_cost TYPE REF TO v54a0_scdd.
      LOOP AT it_freight_costs REFERENCE INTO lr_f_costs.
        LOOP AT lr_f_costs->* REFERENCE INTO lr_f_cost.
        ENDLOOP.
      ENDLOOP.
    As you can see I personally prefer pointers to field symbols - I don't believe there is any performance differences and because of my background in other languages pointers make more sense to me.
    Cheers
    Graham Robbo

  • Problem Reading Data from .dat File

    I am trying to read in data from lines 384-475. The data looks something like this
    198 95 70 71 93-99-99-99-99-99-99-99-99-99-99  5 17 17 17 17-99-99-99-99-99-99-99-99-99-99 1
    78 95 70 69-99-99-99-99-99-99-99-99-99-99-99  6  2  1  1-99-99-99-99-99-99-99-99-99-99-99 2
    70 73-99-99-99-99-99-99-99-99-99-99-99-99-99  0  1-99-99-99-99-99-99-99-99-99-99-99-99-99 1This is only the data from lines 384-475. I keep getting an error though, and I can't figure it out.
    import java.util.*;
    import java.io.*;
    public class ProgrammingExercise1
         public static double findAccuracy(String systemCommand) throws IOException
             Process proc = Runtime.getRuntime().exec(systemCommand);
             Scanner scan = new Scanner(proc.getInputStream());
             PrintStream logOut = new PrintStream(new FileOutputStream("log.dat"));
             while(scan.hasNextLine())
                  logOut.println(scan.nextLine());
             logOut.close();
             scan.close();
             proc.destroy();
             Scanner input = new Scanner(new File("log.dat"));
             String line = "";
             for(int c=1; c<=4; c++)
                  line = input.nextLine();
             double finalAccuracy = Double.parseDouble(line.substring(22,27));
             input.close();
             return finalAccuracy;
         public static void main (String[] args) throws IOException
              try {
                        String s;
                        int count=0;
                        String temp;
                        int aInt;
                        int med;
                        int[] daM = new int[251];
                        String[] pos = new String[251];
                        int[][] da = new int[251][507];
                        int[] daSort = new int[da.length];
                        for (int i=0; i<251; i++)
                             daM[i] = 0;
                             for (int j=0; j<507; j++)
                                  da[i][j] = 0;
              //creating an input stream
                 FileInputStream fstream = new FileInputStream("dataset.dat");
                 DataInputStream in = new DataInputStream(fstream);
                 BufferedReader br = new BufferedReader(new InputStreamReader(in));
                 while((s = br.readLine()) != null)
                    //safety check as the last line in not null, but empty
                    //break the procedure info from the string/line
                      String sub = s.substring(384, 475);
                      for (int k=0; k<15; k++)
                           temp = sub.substring(k*3, (k*3)+3);
                             //removes spaces from the string to alleviate integer conversion errors
                           temp = temp.replace(" ", "");
                           aInt = Integer.parseInt(temp);
                           if (aInt > -1)
                                da[count][aInt] = 1;
                      sub = s.substring(260, 264);
                      temp = sub.replace(" ", "");
                      aInt = Integer.parseInt(temp);
                      if (aInt > -1)
                           daSort[count] = aInt;
                           daM[count] = aInt;
                      count++;
                 in.close();
                 bubbleSort(daSort);
                 med = daSort[daSort.length/2];
                 for (int t=0; t<daM.length; t++)
                      if (daM[t]<med)
                           pos[t] = "+1";
                      else
                           pos[t] = "-1";
                      for (int r=0; r<da[t].length; r++)
                           if (da[t][r]==1)
                                pos[t] +=" " + r + ":1.0";
                 Collections.shuffle(Arrays.asList(pos));
                 File file = new File("testSet.dat");
                 PrintWriter output = new PrintWriter(new FileWriter(file));
                 String tempOut = "";
                 for (int ii=0; ii<pos.length/4; ii++)
                      tempOut += pos[ii];
                      output.write(tempOut);
                      tempOut = "";
                      output.write("\n");
                 output.close();
                 file = new File("crossValidationSet.dat");
                 output = new PrintWriter(new FileWriter(file));
                 for (int jj=(pos.length/4); jj<pos.length/2; jj++)
                      tempOut += pos[jj];
                      output.write(tempOut);
                      tempOut = "";
                      output.write("\n");
                 output.close();
                 file = new File("trainingSet.dat");
                 output = new PrintWriter(new FileWriter(file));
                 for (int kk=(pos.length/2); kk<pos.length; kk++)
                      tempOut += pos[kk];
                      output.write(tempOut);
                      tempOut = "";
                      output.write("\n");
                 output.close();
                 System.out.println("Your file has been written");
              catch (Exception e)
                   System.err.println("Error: " + e.getMessage());
    } // end ProgrammingExercise1The main error I can't figure out is as follows... "Error: For input string: "93-"
    *Note: I had to remove some of the code due to exceeding the maximum characters allowed. I THINK the error is found at the //creating an input stream section.

    The input data that I included is the exact data I am trying to read...just three lines instead of the 251. There is plenty of other data surrounding the included data, but I am not concerned with it.
    Here is the first 3 lines of data...
    4200410577816 76-99 9 177        1 1 0  5.573125262 5 429429422MED0262      25080403915990 427322851 5789 250402859 2111                                 50  99 159 106  60 153  50  59  47-999-999-999-999-999-999                    -999-999-999-999 0 1 4025AZ   14    141010 5868 2817 9  0 04223 3 105        -9           2451644434443                                                 70 93 93-99-99-99-99-99-99-99-99-99-99-99-99  3-99-99-99-99-99-99-99-99-99-99-99-99-99-99 3     40667       40667.002004 1
    4200410581753 79-9911 177        1 1 0  5.5731252 3 5 429429422MED0262      250822851 4271 486  5789 785595990 41400V4581                                50  60 106 122 153 249 159 101 101-999-999-999-999-999-999                    -999-999-999-999 0 1 4025AZ    8     81010 2043  883 9  0 04223 2 105        -9           245134824                                                     70 77-99-99-99-99-99-99-99-99-99-99-99-99-99  4-99-99-99-99-99-99-99-99-99-99-99-99-99-99 3     25444       25444.002004 1
    4200410277559 67-99 3 177        1 0 0  5.5731252 3 5 229229221MED0236      25080707146827 4280 7318 73027041042506045981                                50 199 197 108 212 201   3  50 121-999-999-999-999-999-999                    -999-999-999-999 0 0 4047AZ   29    291010 2414 5409 9  0 04223 6 111        -9           1392745164542884288483950                                     57 70 95189190 61-99-99-99-99-99-99-99-99-99 18-99-99-99-99-99-99-99-99-99-99-99-99-99-99 1    141927      141927.002004 4
    import java.util.*;
    import java.io.*;
    public class ProgrammingExercise1 {
    public static void bubbleSort(int[] x)
              int n = x.length;
              for (int pass=1; pass < n; pass++)
                   for (int i=0; i < n-pass; i++)
                        if (x[i] > x[i+1])
                             int temp = x;
    x[i] = x[i+1];
    x[i+1] = temp;
    }// end bubbleSort
    public static void main (String[] args) throws IOException
    try {
              String s;
              int count=0;
              String temp;
              int aInt;
              int med;
              int[] daM = new int[251];
              String[] pos = new String[251];
              int[][] da = new int[251][507];
              int[] daSort = new int[da.length];
              for (int i=0; i<251; i++)
                   daM[i] = 0;
                   for (int j=0; j<507; j++)
                        da[i][j] = 0;
    FileInputStream fstream = new FileInputStream("dataset.dat");
    DataInputStream in = new DataInputStream(fstream);
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    while((s = br.readLine()) != null)
         String sub = s.substring(384, 475); //!!! Is this supposed to be (384, 475) or (384, 428)???
         for (int k=0; k<15; k++)
              temp = sub.substring(k*3, (k*3)+3);
              temp = temp.replace(" ", "");
              aInt = Integer.parseInt(temp);
              if (aInt > -1)
                   da[count][aInt] = 1;
         sub = s.substring(260, 264);
         temp = sub.replace(" ", "");
         aInt = Integer.parseInt(temp);
         if (aInt > -1)
              daSort[count] = aInt;
              daM[count] = aInt;
         count++;
    in.close();
    bubbleSort(daSort);
    med = daSort[daSort.length/2];
    for (int t=0; t<daM.length; t++)
         if (daM[t]<med)
              pos[t] = "+1";
         else
              pos[t] = "-1";
         for (int r=0; r<da[t].length; r++)
              if (da[t][r]==1)
                   pos[t] +=" " + r + ":1.0";
    Collections.shuffle(Arrays.asList(pos));
    File file = new File("testSet.dat");
    PrintWriter output = new PrintWriter(new FileWriter(file));
    String tempOut = "";
    for (int ii=0; ii<pos.length/4; ii++)
         tempOut += pos[ii];
         output.write(tempOut);
         tempOut = "";
         output.write("\n");
    output.close();
    file = new File("crossValidationSet.dat");
    output = new PrintWriter(new FileWriter(file));
    for (int jj=(pos.length/4); jj<pos.length/2; jj++)
         tempOut += pos[jj];
         output.write(tempOut);
         tempOut = "";
         output.write("\n");
    output.close();
    file = new File("trainingSet.dat");
    output = new PrintWriter(new FileWriter(file));
    for (int kk=(pos.length/2); kk<pos.length; kk++)
         tempOut += pos[kk];
         output.write(tempOut);
         tempOut = "";
         output.write("\n");
    output.close();
    System.out.println("Your file has been written");
    catch (Exception e)
         e.printStackTrace();
    Edited by: djcochran on Jan 27, 2010 5:22 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem reading data from database

    Hi All,
    I'm doing some test with Oracle Coherence, particulary testing partitioned cache of a database. I'm using a client/server archictecture and I developed my own CacheStore. So, the problem is, after start the server and the client, when i do a get() in the client for a object that is on database and not in the cache, the cache answer is it doesn't exist. Isn't it supposed the cache "call" the cache store and read/verify if it is on database?
    My Configuration file:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>Recharge</cache-name>
    <scheme-name>partitioned-cache</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>partitioned-cache</scheme-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <write-delay>0</write-delay>
    <read-only>false</read-only>
    <internal-cache-scheme>
    <local-scheme>
    <scheme-name>InMemoryScheme</scheme-name>
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>RechargeCacheStore</class-name>
    </class-scheme>
    </cachestore-scheme>
    </read-write-backing-map-scheme>
    </backing-map-scheme>
    <listener/>
    <autostart>true</autostart>
    </distributed-scheme>
    </caching-schemes>
    </cache-config>
    Tanks,
    Paulo Sousa

    Hi Paolo,
    You should use a fully qualified class name to enable the JVM class loader to find the RechargeCacheStore class.
    Regards,
    Harv

  • Problem reading data from a file

    this is inside a servlet.
    Re: servlet question
    Author: gramberto
    In Reply To: servlet question Oct 1, 2004 10:24 AM
    Reply 6 of 6
    I'm getting the following errors:
    java.util.NoSuchElementException     at java.util.StringTokenizer.nextToken(StringTokenizer.java:259)     at myClass.readFile(myClass.java:387)     at myClass.doPost(myClass.java:421)I am reading a file of the form:
    Blah|blah2||
    '|' is the delimiter. A null would just have another |
    Here is my code:
    public void readFile(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException
              PrintWriter out = response.getWriter();
             String row;
             BufferedReader infile1 = new BufferedReader(new FileReader("c:\\file1.txt"));
             response.setContentType("text/html");
             String FName="",MName="",LName="",Sex="",Street1="",Street2="",City="",State="",Zip="",PhoneLocalCode="",PhoneAreaCode="",PhoneLastCode="",Email="",OtherInfo="";
            try {
                    while ((row = infile1.readLine()) != null)
                      StringTokenizer in_str = new StringTokenizer(row, "|");
                      FName = in_str.nextToken();
                      MName = in_str.nextToken();
                      LName = in_str.nextToken();
                      Sex = in_str.nextToken();
                      Street1 = in_str.nextToken();
                      Street2 = in_str.nextToken();
                      City = in_str.nextToken();
                      State = in_str.nextToken();
                      Zip = in_str.nextToken();
                      PhoneLocalCode = in_str.nextToken();
                      PhoneAreaCode = in_str.nextToken();
                      PhoneLastCode = in_str.nextToken();
                      Email = in_str.nextToken();
                      OtherInfo = in_str.nextToken();
                 } catch (IOException ioException) {
                   out.println("Error: "+ioException);
                 out.println(FName);
                 out.println(MName);

    Well, you are probably passing in a line that is tokinized into less than 14 tokens.
    Add some debug output that prints the line that you are tokenizing.
    Use hasMoreTokens and countTokens to determine if it is ok to call nextToken or if you are already out of tokens.
    E.g. you could do something along these lines:
    fixed token count formatprivate void tokenize(final String line)
      final StringTokenizer st = new StringTokenizer( line, "|" );
      if ( st.countTokens() != 14 )
         throw new RuntimeException("Invalid token count: " + st.countTokens());
      FName = st.nextToken();
    }variable token count formatprivate void tokenize(final String line)
      final StringTokenizer st = new StringTokenizer( line, "|" );
      if (st.hasMoreTokens())
        FName = st.nextToken();
      if (st.hasMoreTokens())
        MName = st.nextToken();
    }

  • Problem Reading Data From An Excel Spreadsheet

     

    HI,
    Have u set classpath correctly, i mean does this pakage appear in the class path of ur sever. If not include it in the classpath of the sever or the web-app that u have created. From their only can it include it.
    Take care
    Kunal

  • Problem trying read data from Destination

    HI,
    I have confiigured ADS and when im testing dest im getting the error :error while silently connecting:org.w3c.www.protocol :connection refused.
    when i ckedth NWA logs i got the below trace file. please let me know how to solve this.
    Problem trying read data from Destination: dest:FP_ICF_DATA_K64//sap/bc/fp/form/layout/FP_FORM_SECURITY_TEST.XDP?fp-language=DE
    com.adobe.ads.destination.DestinationException: IO error detected while opening DEST connection: http://sapk64.essent.local:8062/sap/bc/fp/form/layout/FP_FORM_SECURITY_TEST.XDP?fp-language=DE
         at com.adobe.ads.destination.Destination.readUrlStream(Unknown Source)
         at com.adobe.ads.destination.Destination.readTemplate(Unknown Source)
         at com.adobe.ads.data.DestURLData.setData(Unknown Source)
         at com.adobe.ads.data.DestURLData.<init>(Unknown Source)
         at com.adobe.ads.data.PDFData.createFromURL(Unknown Source)
         at com.adobe.ads.data.PDFData.create(Unknown Source)
         at com.adobe.ads.request.Template.setPDFData(Unknown Source)
         at com.adobe.ads.request.Template.initialize(Unknown Source)
         at com.adobe.ads.request.Renderer.initializeTemplates(Unknown Source)
         at com.adobe.ads.request.Renderer.execute(Unknown Source)
         at com.adobe.BaseADSRequest.doWork(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
         at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
         at java.lang.reflect.Method.invoke(Method.java:391)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:207)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: org.w3c.www.protocol.http.HttpException: java.net.ConnectException: Connection refused
    java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:354)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:219)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:206)
         at java.net.Socket.connect(Socket.java:483)
         at java.net.Socket.connect(Socket.java:433)
         at java.net.Socket.<init>(Socket.java:340)
         at java.net.Socket.<init>(Socket.java:180)
         at org.w3c.www.protocol.http.f.a(Unknown Source)
         at org.w3c.www.protocol.http.f.markUsed(Unknown Source)
         at org.w3c.www.protocol.http.HttpBasicServer.getConnection(Unknown Source)
         at org.w3c.www.protocol.http.HttpBasicServer.runRequest(Unknown Source)
         at org.w3c.www.protocol.http.HttpManager.runRequest(Unknown Source)
         at org.w3c.www.protocol.http.HttpURLConnection.connect(Unknown Source)
         at org.w3c.www.protocol.http.HttpURLConnection.a(Unknown Source)
         at org.w3c.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at com.adobe.ads.destination.Destination.readUrlStream(Unknown Source)
         at com.adobe.ads.destination.Destination.readTemplate(Unknown Source)
         at com.adobe.ads.data.DestURLData.setData(Unknown Source)
         at com.adobe.ads.data.DestURLData.<init>(Unknown Source)
         at com.adobe.ads.data.PDFData.createFromURL(Unknown Source)
         at com.adobe.ads.data.PDFData.create(Unknown Source)
         at com.adobe.ads.request.Template.setPDFData(Unknown Source)
         at com.adobe.ads.request.Template.initialize(Unknown Source)
         at com.adobe.ads.request.Renderer.initializeTemplates(Unknown Source)
         at com.adobe.ads.request.Renderer.execute(Unknown Source)
         at com.adobe.BaseADSRequest.doWork(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
         at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
         at java.lang.reflect.Method.invoke(Method.java:391)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:207)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Error embedding request inputs in error log.
    Error embedding request inputs in error log.
    java.lang.NullPointerException
         at com.adobe.ads.request.Renderer.embedInputs(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.processRenderLog(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
         at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
         at java.lang.reflect.Method.invoke(Method.java:391)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:207)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    No output was generated while rendering
    The render error log file has been written to /usr/sap/T50/SYS/global/AdobeDocumentServices/renderErrorLog/errorFiles/2008.08.05.113021ADS_AGENT.pdf.
    Please validate the input files or streams attached with it and try again
    Processing exception during a "Render" operation.
    Request start time: Tue Aug 05 11:30:21 CEST 2008
    com.adobe.ads.destination.DestinationException: IO error detected while opening DEST connection: http://sapk64.essent.local:8062/sap/bc/fp/form/layout/FP_FORM_SECURITY_TEST.XDP?fp-language=DE; [Error Log file "2008.08.05.113021ADS_AGENT.pdf" written to /usr/sap/T50/SYS/global/AdobeDocumentServices/renderErrorLog/errorFiles]
    Exception Stack Trace:
    com.adobe.ads.destination.DestinationException: IO error detected while opening DEST connection: http://sapk64.essent.local:8062/sap/bc/fp/form/layout/FP_FORM_SECURITY_TEST.XDP?fp-language=DE
         at com.adobe.ads.destination.Destination.readUrlStream(Unknown Source)
         at com.adobe.ads.destination.Destination.readTemplate(Unknown Source)
         at com.adobe.ads.data.DestURLData.setData(Unknown Source)
         at com.adobe.ads.data.DestURLData.<init>(Unknown Source)
         at com.adobe.ads.data.PDFData.createFromURL(Unknown Source)
         at com.adobe.ads.data.PDFData.create(Unknown Source)
         at com.adobe.ads.request.Template.setPDFData(Unknown Source)
         at com.adobe.ads.request.Template.initialize(Unknown Source)
         at com.adobe.ads.request.Renderer.initializeTemplates(Unknown Source)
         at com.adobe.ads.request.Renderer.execute(Unknown Source)
         at com.adobe.BaseADSRequest.doWork(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
         at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
         at java.lang.reflect.Method.invoke(Method.java:391)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:207)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: org.w3c.www.protocol.http.HttpException: java.net.ConnectException: Connection refused
    java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:354)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:219)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:206)
         at java.net.Socket.connect(Socket.java:483)
         at java.net.Socket.connect(Socket.java:433)
         at java.net.Socket.<init>(Socket.java:340)
         at java.net.Socket.<init>(Socket.java:180)
         at org.w3c.www.protocol.http.f.a(Unknown Source)
         at org.w3c.www.protocol.http.f.markUsed(Unknown Source)
         at org.w3c.www.protocol.http.HttpBasicServer.getConnection(Unknown Source)
         at org.w3c.www.protocol.http.HttpBasicServer.runRequest(Unknown Source)
         at org.w3c.www.protocol.http.HttpManager.runRequest(Unknown Source)
         at org.w3c.www.protocol.http.HttpURLConnection.connect(Unknown Source)
         at org.w3c.www.protocol.http.HttpURLConnection.a(Unknown Source)
         at org.w3c.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
         at com.adobe.ads.destination.Destination.readUrlStream(Unknown Source)
         at com.adobe.ads.destination.Destination.readTemplate(Unknown Source)
         at com.adobe.ads.data.DestURLData.setData(Unknown Source)
         at com.adobe.ads.data.DestURLData.<init>(Unknown Source)
         at com.adobe.ads.data.PDFData.createFromURL(Unknown Source)
         at com.adobe.ads.data.PDFData.create(Unknown Source)
         at com.adobe.ads.request.Template.setPDFData(Unknown Source)
         at com.adobe.ads.request.Template.initialize(Unknown Source)
         at com.adobe.ads.request.Renderer.initializeTemplates(Unknown Source)
         at com.adobe.ads.request.Renderer.execute(Unknown Source)
         at com.adobe.BaseADSRequest.doWork(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.processRender(Unknown Source)
         at com.adobe.AdobeDocumentServicesWorker.execute(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
         at com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
         at com.adobe.AdobeDocumentServicesLocalLocalObjectImpl0_0.rpData(AdobeDocumentServicesLocalLocalObjectImpl0_0.java:120)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
         at java.lang.reflect.Method.invoke(Method.java:391)
         at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
         at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
         at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
         at SoapServlet.doPost(SoapServlet.java:51)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(AccessController.java:207)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    hi,
    My problem is solved  now. We have opened backend system port connection from portal side.
    regards,
    Krishna

  • Problem with reading data from screen and inserting in table

    hi ther,
    im new to abap-webdyn pro. can anyone suggest how to read data from screen and insert into table when press 'ADD' button.
    i done screen gui , table creation but problems with action. what the content of acton add.
    is ther any link that helps me or tut??
    thankx in advance!
    regards

    Hi,
    Create a context node for the screen fields for which you want to enter the values with cardinality 1.1.....
    Now in the layout of your view bind the screen input fields to that context node(attributes) to the value property of the input fields...
    Now in the action of ADD button....
    --> go the wizard and select the read node button and select the node which you have created it generates the auto code for you.....
    for example if the node is contains aone attribute like MATNR
    reading the node from wizard will generate the code as....
    DATA lo_nd_matnr TYPE REF TO if_wd_context_node.
      DATA lo_el_matnr TYPE REF TO if_wd_context_element.
      DATA ls_matnr TYPE wd_this->element_matnr.
      DATA lv_matnr TYPE wd_this->element_matnr-matnr.
    * navigate from <CONTEXT> to <MATNR> via lead selection
      lo_nd_matnr = wd_context->get_child_node( name = wd_this->wdctx_matnr ).
    * @TODO handle non existant child
    * IF lo_nd_matnr IS INITIAL.
    * ENDIF.
    * get element via lead selection
      lo_el_matnr = lo_nd_matnr->get_element( ).
    * @TODO handle not set lead selection
      IF lo_el_matnr IS INITIAL.
      ENDIF.
    * get single attribute
      lo_el_matnr->get_attribute(
        EXPORTING
          name =  `MATNR`
        IMPORTING
          value = lv_matnr ).
    here the variable lv_matnr will contain the entered value......
    now you can use this value for further process.
    Thanks,
    Shailaja Ainala.

  • Problem while reading data from AL11

    Hi Experts,
    I am using OPEN DATASET
                          READ DATASET
                      CLOSE DATASET  to read data from the application sever. In application sever the file type is .CSV. So after reading data from application layer(AL11) to a text variable,  using statement ' SPLIT AT ','  ' all the values passing into correspoding internal table fields. And it getting updated successfully into DB also.
    In above scenario my question is, if aquantity figure with coma seperator( 95,000,000.000), then while SPLIT it's creating problem. Same case in .XLS file, it will be created # seperator in the application layer. if any field having # then it will create problem again.
    So can anybody suggest how can we over come the problem. Or is there any other way to read data properly from application layer(AL11)?
    Thanks and regards,
    Phani.

    to overcom this problem,
    normally we use tab as sparator
    so use CL_ABAP_CHAR_UTILITIES=>VERTICAL_TAB  to separate your fields!
    grx
    Andreas

  • Problem in reading data from Excel sheet to 2D string array (ActiveX & LabView).

    I am trying to read data from Excel sheet to 2D string array (ActiveX & LabView). Error -2147352571 is generated (type mismatch) if cell value is "#NULL!", "#N/A" etc. What should I do?

    Hello �
    Is the error happening when the cell value is #NULL or #NA only?
    Sometimes these errors occur because of an ActiveX object mismatch. The version of the ActiveX object might have changed or been updated since the VI was created. The VI tries to use an earlier, incompatible version of the ActiveX object.
    To solve the problem, you need to link automation refnum terminal to the correct ActiveX object. To do so, right-click an automation refnum terminal and choose Select ActiveX Class»Browse from the shortcut menu. From the Type Library pull-down menu, select the latest version of the library you want to use, such as Microsoft Excel Object Library. In the Objects list, select an ActiveX object, and click the OK button. Link ea
    ch automation refnum terminal in the VI and its subVIs until the run arrow is not broken. Also, you might have to replace some or all of the Invoke Nodes and Property Nodes for the ActiveX objects.
    Also, I came across this Knowledgebase. The error number is slightly different but it is always good to check it out and make sure it is not your case.
    Hope this helps.
    S Vences
    Applications Engineer
    National Instruments

  • Problem while reading data from Serial Port

    Hi All,
    I am facing some problem while reading data from Serial Port.
    As per the requirement I am writing the data on Serial Port and waiting for response of that data.
    Notification for data availabilty is checked with method public void serialEvent(SerialPortEvent event) of javax.comm.SerialPortEventListener.
    When we are writing data on the port one thread i.e. "main" thread is generated and when data availability event occures another thread "Win32SerialPort Notification thread" is generated. This creates problem for me as we can't control thread processing.
    So can anybody pls explain me how to overcome this problem?
    Regards,
    Neha

    My Problem is:-
    I am simoultaneouly wrting data on port & reading data from port.
    First I write data on port using outputStream.write() method. Now when target side sends me response back for the request on serial port DATA_AVAILABLE of SerialPortEventListner event occured,we are reading data from serial port.Now till the time we didn't get the response from target next command can't be written on the serial port. When we are writing data on port main thread is executed.Now my problem starts when DATA_AVAILABLE event occured.At this point another thread is created.Due to this my program writes data of next command without reading response of previous command.To solve this prob. I have used wait() & notify() methods as follows.But again due to this my pc hangs after execution of 2 commands. (PC hang in while loop in a code provided below.)
    From SOPs I could figure it out that after 2 commands we are not able to write data on serial port so DATA_AVAILABLE event doesn't occure n pro. goes in wait state.
    Can anybody help me to solve this issue.
    Neha.
    Code:
    public void serialEvent(SerialPortEvent event)
              switch (event.getEventType())
                   case SerialPortEvent.BI:
                   case SerialPortEvent.OE:
                   case SerialPortEvent.FE:
                   case SerialPortEvent.PE:
                   case SerialPortEvent.CD:
                   case SerialPortEvent.CTS:
                   case SerialPortEvent.DSR:
                   case SerialPortEvent.RI:
                   case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
                                 break;
                   case SerialPortEvent.DATA_AVAILABLE:
                        try
                             dataThread = Thread.currentThread();
                             dataThread.setPriority(10);
                             dataAvailable = true;
                                                                                    byte[] tempArray=new byte[availableBytes];
                                        inputStream.read(tempArray);
                                                                       catch (IOException io)
                             SOP(io, "Error in serialEvent callback call for event DATA_AVAILABLE");
    public void  writetoPort(byte[] data) throws IOException
                             outputStream.write(data);
                              while(finalTimeOut >= actualTime)
                            if( ! dataAvailable)
                                    actualTime = System.currentTimeMillis();
                           else
              synchronized (mainThread)
                   mainThread = Thread.currentThread();
                   mainThread.wait();
    public  void sendDatatoUser(byte[] b) throws Exception, HWCCSystemFailure
              obj.returnData(b);
              synchronized(mainThread)
                   mainThread.notify();
                                                           

  • Problem in reading data from serial port continuously- application hangs after sometimes

    I need to read data from two COM port and order of data appearance from COM port is not fixed. 
    I have used small timeout and reading data in while loop continously . If my application is steady for sometime it gets hangs and afterwards it doesnt receive any data again. 
    Then I need to restart my application again to make it work.
    I am attaching VI. Let me know any issue.
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet
    Attachments:
    Scanning.vi ‏39 KB

    billko wrote:
    Ranjeet_Singh wrote:
    I need to read data from two COM port and order of data appearance from COM port is not fixed. 
    I have used small timeout and reading data in while loop continously . If my application is steady for sometime it gets hangs and afterwards it doesnt receive any data again. 
    Then I need to restart my application again to make it work.
    I am attaching VI. Let me know any issue.
    What do you mean, "not fixed?"  If there is no termination character, no start/stop character(s) or even a consistent data length, then how can you really be sure when the data starts and stops?
    I probably misunderstood you though.  Assuming the last case is not ture - there is a certain length to the data - then you should use the bytes at port, like in the otherwise disastrous serial port read example.  In this case, it's NOT disastrous.  You have to make sure that you read all the data that came through.  Right now you have no idea how much data you just read.  Also, if this is streaming data, you might want to break it out into a producer/consumer design pattern.
    Not fixed means order is not fixed, data from any com port can come anytime. lenght is fixed, one com port have 14 byte and other 8 byte fixed..
    Reading data is not an issue for me as it works nice but I have a query that why my application hangs after sometime and stops reading data from COM PORT.
    Kudos are always welcome if you got solution to some extent.
    I need my difficulties because they are necessary to enjoy my success.
    --Ranjeet

Maybe you are looking for

  • DVD Player has no video?

    Verizon set up my configuration incorrectly during installation and I had reconfigured to work properly.  I was working fine for several months and then one day the DVD player stopped working.  I have sound but no video.  The dvd player works fine as

  • Special Discount

    Dear friends, Plz. help me in mapping the Business Scenario I want to assign a special discount(example 3%) for all the sales orders exceeding a value of Rs.50000/- automatically. Thanks in Advance and helpful answers will be rewarded.

  • Problem with select option in module pool

    Hello friends,                        I have successfully created a select option in my module using sub-screen. My problem is the EXTENSION buttom in the select option. When i click on the EXTENSION button a proper pop-up appears but when i input so

  • Nokia 5320 and bh-105

    Phone nokia 5320 and nokia bluetooth headset bh-105 not fond evribody. P.S. help my pliz. samsung 3010 fond  nokia bluetooth headset bh-105 all rait/

  • Configuring ACF2 connector with OIM 11gR2

    Hi Experts, I am working on configuring ACF2 connector with OIM 11gr2, In an intermediatory step we need to copy VOYAGER_ID.properties file. The comment against this file is written as: Rename VOYAGER_ID with the name "Voyager server's VOYAGER_ID con