Problems getting data from JMenuBar to JInternalFrame

I have modified an example to show my problem. I am trying to take text input from the menu bar and print it into a JTextArea. I don't know how to reference the data in my ActionListener.
The ActionListener is incomplete, but this is basically what I am trying to do:
import javax.swing.JInternalFrame;
import javax.swing.JDesktopPane;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JMenuBar;
import javax.swing.JFrame;
import javax.swing.KeyStroke;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
* InternalFrameDemo.java is a 1.4 application that requires:
*   MyInternalFrame.java
public class InternalFrameDemo extends JFrame
                               implements ActionListener {
    JDesktopPane desktop;
    JTextField memAddrBox;
    JTextArea menuText;
    JTextArea frame;
    String textFieldString = " Input Text: ";
    ActionListener al;
    public InternalFrameDemo() {
        super("InternalFrameDemo");
        //Make the big window be indented 50 pixels from each edge
        //of the screen.
        int inset = 50;
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setBounds(inset, inset,
                  screenSize.width  - inset*2,
                  screenSize.height - inset*2);
        //Set up the GUI.
        desktop = new JDesktopPane(); //a specialized layered pane
        frame = createFrame(); //create first "window"
        setContentPane(desktop);
        setJMenuBar(createMenuBar());
        //Make dragging a little faster but perhaps uglier.
        desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
    protected JMenuBar createMenuBar() {
        JMenuBar menuBar = new JMenuBar();
        JLabel memAddrLabel = new JLabel(textFieldString);
        memAddrLabel.setLabelFor(memAddrBox);
        menuBar.add(memAddrLabel);
        JTextField memAddrBox = new JTextField();
        memAddrBox.addActionListener(this);
        memAddrBox.setActionCommand("chMemAddr");
        menuBar.add(memAddrBox);
        return menuBar;
    //React to menu selections.
    public void actionPerformed(ActionEvent e) {
        if ("chMemAddr".equals(e.getActionCommand())) 
            JMenuBar bar = getJMenuBar();
//            JTextField memAddrBox = bar.getParent();
            String memStartString = memAddrBox.getText();
            update(memStartString);
    public void update(String temp)
        frame.setText(temp);
    //Create a new internal frame.
    protected JTextArea createFrame() {
        JInternalFrame frame = new JInternalFrame("Memory",true,true,true,true);      
        frame.setSize(650, 500);
        frame.setVisible(true);
        frame.setLocation(200, 0);
        desktop.add(frame);  
        JTextArea textArea = new JTextArea();
        frame.getContentPane().add("Center", textArea);
        textArea.setFont(new Font("SansSerif", Font.PLAIN, 12));
        textArea.setVisible(true);
        textArea.setText("Initial Text");
        return textArea;
    //Quit the application.
    protected void quit() {
        System.exit(0);
    public static void main(String[] args) {
        //Make sure we have nice window decorations.
        JFrame.setDefaultLookAndFeelDecorated(true);
        //Create and set up the window.
        InternalFrameDemo frame = new InternalFrameDemo();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //Display the window.
        frame.setVisible(true);
class MyInternalFrame extends JInternalFrame {
    static int openFrameCount = 0;
    static final int xOffset = 30, yOffset = 30;
    public MyInternalFrame() {
        super("Document #" + (++openFrameCount),
              true, //resizable
              true, //closable
              true, //maximizable
              true);//iconifiable
        //...Create the GUI and put it in the window...
        //...Then set the window size or call pack...
        setSize(300,300);
        //Set the window's location.
        setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
}I want to take the input from the "memAddrBox" and put it into the "frame" using the update() method. Probably a simple solution, but I have not found a similar problem in the Forums.

I knew it had to be something simple, here is the fix I found:
import javax.swing.JInternalFrame;
import javax.swing.JDesktopPane;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JMenuBar;
import javax.swing.JFrame;
import javax.swing.KeyStroke;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
* InternalFrameDemo.java is a 1.4 application that requires:
*   MyInternalFrame.java
public class InternalFrameDemo extends JFrame
                               implements ActionListener {
    JDesktopPane desktop;
    JTextField memAddrBox;
    JTextArea menuText;
    JTextArea frame;
    String textFieldString = " Input Text: ";
    ActionListener al;
    public InternalFrameDemo() {
        super("InternalFrameDemo");
        //Make the big window be indented 50 pixels from each edge
        //of the screen.
        int inset = 50;
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setBounds(inset, inset,
                  screenSize.width  - inset*2,
                  screenSize.height - inset*2);
        //Set up the GUI.
        desktop = new JDesktopPane(); //a specialized layered pane
        frame = createFrame(); //create first "window"
        setContentPane(desktop);
        setJMenuBar(createMenuBar());
        //Make dragging a little faster but perhaps uglier.
        desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
    protected JMenuBar createMenuBar() {
        JMenuBar menuBar = new JMenuBar();
        JLabel memAddrLabel = new JLabel(textFieldString);
        memAddrLabel.setLabelFor(memAddrBox);
        menuBar.add(memAddrLabel);
        JTextField memAddrBox = new JTextField();
        memAddrBox.addActionListener(this);
        memAddrBox.setActionCommand("chMemAddr");
        menuBar.add(memAddrBox);
        return menuBar;
    //React to menu selections.
    public void actionPerformed(ActionEvent e) {
        if ("chMemAddr".equals(e.getActionCommand())) 
           JTextField textField =
             (JTextField)e.getSource();
            String memStartString = textField.getText();
            update(memStartString);
    public void update(String temp)
        frame.setText(temp);
    //Create a new internal frame.
    protected JTextArea createFrame() {
        JInternalFrame frame = new JInternalFrame("Memory",true,true,true,true);      
        frame.setSize(650, 500);
        frame.setVisible(true);
        frame.setLocation(200, 0);
        desktop.add(frame);  
        JTextArea textArea = new JTextArea();
        frame.getContentPane().add("Center", textArea);
        textArea.setFont(new Font("SansSerif", Font.PLAIN, 12));
        textArea.setVisible(true);
        textArea.setText("Initial Text");
        return textArea;
    //Quit the application.
    protected void quit() {
        System.exit(0);
    public static void main(String[] args) {
        //Make sure we have nice window decorations.
        JFrame.setDefaultLookAndFeelDecorated(true);
        //Create and set up the window.
        InternalFrameDemo frame = new InternalFrameDemo();
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //Display the window.
        frame.setVisible(true);
class MyInternalFrame extends JInternalFrame {
    static int openFrameCount = 0;
    static final int xOffset = 30, yOffset = 30;
    public MyInternalFrame() {
        super("Document #" + (++openFrameCount),
              true, //resizable
              true, //closable
              true, //maximizable
              true);//iconifiable
        //...Create the GUI and put it in the window...
        //...Then set the window size or call pack...
        setSize(300,300);
        //Set the window's location.
        setLocation(xOffset*openFrameCount, yOffset*openFrameCount);
}Note the e.getSource() change in the ActionListener.

Similar Messages

  • Problem getting data from a stored procedure

    On the Oracle DB there's a stored proc defined like:
    PROCEDURE pGetHashes ( iFrom IN NUMBER, iTo IN NUMBER, sHash1 OUT CHAR, sHash2 OUT CHAR );
    When I call this procedure from within my app, I only get a value for the sHash2 parameter. The value of the sHash1 parameter is always null. (Running the same stored proc from sqldeveloper gives a result for both hash values.)
    Underneath I have added the code which I use to call the stored proc. Does anybody see anything I might have done wrong?
    int iFrom = 0;
    int iTo = 1000;
    using (IDbCommand command = dbConnection.CreateCommand())
    OracleCommand orclCommand = command as OracleCommand;
    orclCommand.CommandText = "pGetHashes";
    orclCommand.CommandType = CommandType.StoredProcedure;
    orclCommand.Parameters.Clear();
    orclCommand.Parameters.Add("iFrom", OracleDbType.Int32, iFrom, ParameterDirection.Input);
    orclCommand.Parameters.Add("iTo", OracleDbType.Int32, iTo, ParameterDirection.Input);
    OracleParameter orclParam = new OracleParameter("sHash1", OracleDbType.Char, 100);
    orclParam.Direction = ParameterDirection.Output;
    orclCommand.Parameters.Add(orclParam);
    orclParam = new OracleParameter("sHash2", OracleDbType.Char, 100);
    orclParam.Direction = ParameterDirection.Output;
    orclCommand.Parameters.Add(orclParam);
    orclCommand.BindByName = true;
    orclCommand.ExecuteNonQuery();
    // after this the orclCommand.Parameters["sHash1"].Value is always null.
    // the orclCommand.Parameters["sHash2"].Value has the correct value.
    For extra documentation. Running the following PLSQL from within sqldeveloper results in both a value for Hash1 and Hash2:
    SET SERVEROUTPUT ON;
    DECLARE
    sHash1 CHAR(67);
    sHash2 CHAR(67);
    nFrom NUMBER := 0;
    nTo NUMBER := 1000;
    BEGIN
    pGetHashes( nFrom, nTo, sHash1, sHash2 );
    dbms_output.put_line('Hash1: '|| sHash1);
    dbms_output.put_line('Hash2: '|| sHash2);
    END;
    Thanks for any light you can shed on this problem.

    I can only assume that something is "going wrong" inside your procedure that is resulting in NULL actually being returned, although I don't see any reason the code should be causing it.
    Try the folllowing "pGetHashes2" procedure, and let me know if you see the same results with your code. It works fine for me anyway..
    Greg
    create or replace procedure pGetHashes2 (iFrom number, iTo number, sHash1 out char, sHash2 out char)
    as
    begin
    shash1 := 'foo';
    shash2 :='bar';
    end;
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    namespace otnpost
        class Program
            static void Main(string[] args)
                OracleConnection dbConnection = new OracleConnection("data source=orcl;user id=scott;password=tiger");
                dbConnection.Open();
                int iFrom = 0;
                int iTo = 1000;
                using (IDbCommand command = dbConnection.CreateCommand())
                    OracleCommand orclCommand = command as OracleCommand;
                    orclCommand.CommandText = "pGetHashes2";
                    orclCommand.CommandType = CommandType.StoredProcedure;
                    orclCommand.Parameters.Clear();
                    orclCommand.Parameters.Add("iFrom", OracleDbType.Int32, iFrom, ParameterDirection.Input);
                    orclCommand.Parameters.Add("iTo", OracleDbType.Int32, iTo, ParameterDirection.Input);
                    OracleParameter orclParam = new OracleParameter("sHash1", OracleDbType.Char, 100);
                    orclParam.Direction = ParameterDirection.Output;
                    orclCommand.Parameters.Add(orclParam);
                    orclParam = new OracleParameter("sHash2", OracleDbType.Char, 100);
                    orclParam.Direction = ParameterDirection.Output;
                    orclCommand.Parameters.Add(orclParam);
                    orclCommand.BindByName = true;
                    orclCommand.ExecuteNonQuery();
                    // after this the orclCommand.Parameters["sHash1"].Value is always null.
                    // the orclCommand.Parameters["sHash2"].Value has the correct value.
                    Console.WriteLine(orclCommand.Parameters["sHash1"].Value);
                    Console.WriteLine(orclCommand.Parameters["sHash2"].Value);
    }OUTPUT
    ==========
    foo
    bar
    Press any key to continue . . .

  • Migration Assistant: Problems transferring data from PC (XP SP3) to new Mac Pro 2012 - can not get Migration Assistant to work as PC will not display verfify passcode

    Migration Assistant: Problems transferring data from PC (XP SP3) to new Mac Pro 2012 - can not get Migration Assistant to work as PC will not display verfify passcode
    Hello, I am having problems migrating data from my old PC running XP (SP3) to my new Mac Pro 2012 using the Migration Assistant.
    - I downloaded and installed the Windows Migration Assistant from Apple
    - My Mac recognized PC and displays passcode
    - The sasscode does not show / display on my PC
    - My Mac is then stuck in "authenticating" loop and the PC is stuck "waiting for Mac to connect."
    - Both computers are connected on same network (have connected PC on WIFI and using ethernet to Reuter)
    I have looked on support site and only response I saw says to reinstall Windows Migration Assistant (which I have done)
    Any ideas?  If cant get this to workare there instructions for manually bring across relevant data eg itunes music and apps, photos, picasa data etc?

    Why not turn off the Windows firewall and uninstall any other firewall software you have installed?
    If you are using a Norton product uninstall it and discard it. To fully unistall most Norton products you have to go to the Norton website and download a soecial program to completely get rid of it. The normal uninstall feature built into the program will not remove all of it.

  • Workflow 2013 get data from user profile - Authorization problem...

    Hello. I am trying to get data from
    http://sp13/_api/SP.UserProfiles.PeopleManager/GetMyProperties
    in my WF2013....But there is an authorization problem
    {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang ......
    If I test this link in web browser everything is OK and I can access data.... So I try to add almost all permissions to my WF service but still without any success....I am testing this in SharePoint 2013.
    Please can some help me with this problem. Thank you

    Hi,
    Have you register the workflow against your site ?
    If not register it and check the "Authorization header"
    Register-SPWorkflowService -SPSite 'https://myhost/mysite' -WorkflowHostUri 'https://workflowhost:12990' -AllowOAuthHttp -Force
    Register SPWorkflowService
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • How to get data from Oracle using Native SQL in SAP.. Problem with date

    Hi Masters.
    I'm trying to get data from an Oracle DB. I was able to connect to Oracle using tcode DBCO. The connetion works fine
    I wrote this code and it works fine without the statement of where date > '01-09-2010'
    But i need that statement on the select. I read a lot about this issue, but no answer.
    My code is (this code is in SAP ECC 6.0)
    DATA: BEGIN OF datos OCCURS 0,
          id_numeric(10),
          component_name(40),
          comuna(10),
          record_id(10),
          status,
          sampled_date(10),
          END OF datos.
    DATA: c TYPE cursor.
    EXEC SQL.
      connect to 'LIM' as 'MYDB'
    ENDEXEC.
    EXEC SQL.
      SET CONNECTION 'MYDB'
    ENDEXEC.
    EXEC SQL PERFORMING loop_output.
      SELECT ID_NUMERIC, COMPONENT_NAME, COMUNA, RECORD_ID, STATUS, SAMPLED_DATE
      into :datos from lims.SAMP_TEST_RESULT
      where     date > '01-09-2010'
    ENDEXEC.
    EXEC SQL.
      disconnect 'MYDB'
    ENDEXEC.
    How can i get the data from that date?? If i delete the where statemet, the program works well, it takes 30 mins and show all the data, I just need the data from that date.
    Any help
    Regards

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • Can we get data from business views  in CR 2008/XI?

    Hi All,
    Can we get data from business views  in CR 2008/XI?
    If its possible, pls let us know how to get connect with Business View in both of these versions and what is the tool that we have to use to create Business Views.
    Thank you,
    Krishna Pingali

    Hi Krishna,
    Crystal Reports/BusinessObjects Enterprise ( BOE ) Business Views can only be created using the BV build which comes with BOE and installed using the Work Station installer for BOE. for both XI and 2008.
    You cannot mix these two versions on the same PC not can one talk to the other, the BV designer must match the same version as BOE. XI ( version 11.0 ) is no longer available but if you mean XI R2 ( version 11.5 ) then it still is.
    It's not completely clear which Business View you are referring to? BOE has a Business View Designer so not sure if this is just a naming problem or not? If you are referring to the BOE Business View Designer then the above is true. If your reference is about some other BV designer or data source then you need to clarify.
    Contact our Sales department for pricing and availability.
    Thank you
    Don

  • Powerpivot Error on Refresh -- "We couldn't get data from the data model..."

    I'm using Excel 2013 and Windows 8.1.  I have a spreadsheet I've been using for over a year, and I've just started getting this error message when I try to refresh the data.
    "We couldn't get data from the Data Model.  Here's the error message we got:
    The 'attributeRelationship' with 'AttributeID' - 'PuttDistCat9' doesn't exist in the collection"
    Any idea how I can fix this problem?  I haven't changed anything related to that particular attribute.  All the data is contained in separate sheets in the workbook, so there are no external sources of data.
    Thanks.
    Jean

    Thanks for all the suggestions.
    I found a slightly older version of the spreadsheet that still refreshes properly, so I don't think I have any issues with the version of Excel or Power Query.  (I've had this same error before, and I believe I applied the hotfix at that time.)
    I think this problem started after I updated a number of the date filters in the pivot tables.  I haven't made any changes to the data model, and the only updates I've made were to add data (which I do all the time), and to change the date filters on
    the pivot tables.
    As suggested, I added a new pivot table querying one table (the table with the attribute that shows up in the error message), and it worked fine.  I can also refresh this pivot table.
    Then I tried adding a pivot table which went against several tables in the data model (including the table in question).  The pivot table seemed to return that data properly.  However, when I tried to refresh it, I got the same error message ("we
    couldn't get data from the data model..."). 
    Dany also suggested running the queries one at a time to see which one is in error.  Without checking all the pivot tables, it appears that any which use the table "HolePlayedStrokes" generate the error (this is the table with the attribute
    mentioned in the error message).  Pivot Tables without that particular table seem to refresh OK.  Unfortunately, that is the main table in my data model, so most of the pivot tables use it.
    Any other suggestions?  I'd be happy to send a copy of the spreadsheet.
    Thanks for all the help.
    Jean

  • How do i get data from a structure using join?

    hi,
    what is the actual use of a structure.?
    my problem is :
    KUAGV is an existing STRUCTURE. it has got one fields each which links to MARA, AND VBKD tables. i want to fetch all related information from KUAGV, mara, vbkd . which is the better way : using joins or views or anything else? how do i
    get data from a structure using join?

    structure temporarily holds  any data passed to it dynamically throughout the runtime but doesnot store it permanently. so
    a structure cannot be included in a join.so instead of incuding structure KUAGV's field in a join 
    search the transparent table in which same field are present and  use it in join.
    A structure if created in DDIC(Data Dictionary) is a global DATA STRUCTURE which is used to group related information, for example you would group all the details of your bank account into a structure BANK_ACCOUNT that contains fields like account_Id, account_holder_name etc.
    If you create a structure in your program then it is local to your program. So you use this structure to create data holders of this DATA TYPE to hold data in your program.
    Edited by: suja thomas on Feb 11, 2008 6:24 AM
    Edited by: suja thomas on Feb 11, 2008 6:31 AM

  • How can i  get data from anather database system  ????????

    Hi every body..
    I 've a problem .....
    I've an old program work on "DOS" and it's content database which content all Data that i need for that program
    The data file extension with ".FD" , ".VW" , ".LSS" & "SLP"
    I want to kow:-
    1) what is that database system
    2)What program could open or can get data from that database tables.
    3)can i do that with oracle...
    please describe every thing in details...
    ... Please replay quickly... urgently
    ...waiting your answer....

    You're probably better off consulting the documentation for the DOS program you're trying to deal with than hoping someone here will be able to guess what program you're using, identify the structure of the files, and tell you how to extract the data into something Oracle can import.
    Justin

  • Trying to use FTP to get data from a different server

    Hi Friends,
        I have to use FTP to get data from a different server and upload it on SAP server. Now my problem is when I m trying to do ftp through command line it brings the file but with no data.
       Through ABAP program nothing is happening.
    Here's my code--
      V_PASSWORD = 'test@123'.
      V_PWD_LEN = STRLEN( V_PASSWORD ).
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = V_PASSWORD
          SOURCELEN   = V_PWD_LEN
          KEY         = CS_KEY_500098
        IMPORTING
          DESTINATION = V_PASSWORD.
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          USER            = 'test'
          PASSWORD        = V_PASSWORD
          HOST            = '176.0.1.6'
          RFC_DESTINATION = 'SAPFTPA'
        IMPORTING
          HANDLE          = MI_HANDLE
        EXCEPTIONS
          NOT_CONNECTED   = 1
          OTHERS          = 2.
      CHECK SY-SUBRC = 0.
      cmd = 'lcd d:\ftp'. .
      PERFORM FTP_COMMAND USING CMD.
      CMD = 'asc'.
      PERFORM FTP_COMMAND USING CMD.
      CONCATENATE 'dir' 'ftpt*' INTO CMD SEPARATED BY SPACE.
      PERFORM FTP_COMMAND USING CMD.
      cmd = 'ls'.
    concatenate 'ls' INTO CMD SEPARATED BY SPACE.
      PERFORM FTP_COMMAND USING CMD.
      cmd = 'mget trial.txt'.
    CONCATENATE 'mget' 'trial.txt' INTO CMD SEPARATED BY SPACE.
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          HANDLE        = MI_HANDLE
          COMMAND       = CMD
        TABLES
          DATA          = MTAB_DATA1
        EXCEPTIONS
          TCPIP_ERROR   = 1
          COMMAND_ERROR = 2
          DATA_ERROR    = 3
          OTHERS        = 4.
      IF SY-SUBRC = 0.
        LOOP AT MTAB_DATA1.
          WRITE: / MTAB_DATA1.
        ENDLOOP.
      ELSE.
        CONCATENATE 'Error in FTP Command while executing' CMD INTO ERROR SEPARATED BY SPACE.
        WRITE: / ERROR.
      ENDIF.

    Hi
    try this.....in one of my reqt, i done this successfully....
    FORM FTPCON.
    FTP-------------------------------------------------------*
      CLEAR DSTLEN.
      SET EXTENDED CHECK OFF.
      DSTLEN = STRLEN( S_PWD ).     -
    >  (S_PWD (password) is a selection screen field )                  
      CALL FUNCTION 'HTTP_SCRAMBLE'
        EXPORTING
          SOURCE      = S_PWD
          SOURCELEN   = DSTLEN
          KEY         = KEY
        IMPORTING
          DESTINATION = S_PWD.
      CALL FUNCTION 'FTP_CONNECT'
        EXPORTING
          USER            = P_USER                   -
    > Username
          PASSWORD        = S_PWD             -
    > password
          HOST            = P_HOST                  -
    > Host
          RFC_DESTINATION = P_DEST         -
    > Destination
        IMPORTING
          HANDLE          = HDL
        EXCEPTIONS
          NOT_CONNECTED   = 1
          OTHERS          = 2.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'FTP_COMMAND'
        EXPORTING
          HANDLE        = HDL
          COMMAND       = 'set passive on'
        TABLES
          DATA          = RESULT
        EXCEPTIONS
          TCPIP_ERROR   = 1
          COMMAND_ERROR = 2
          DATA_ERROR    = 3.
      CALL FUNCTION 'FTP_R3_TO_SERVER'
        EXPORTING
          HANDLE         = HDL
          FNAME          = G_FCNAME
          CHARACTER_MODE = 'X'
        TABLES
          TEXT           = T_FILE1
        EXCEPTIONS
          TCPIP_ERROR    = 1
          COMMAND_ERROR  = 2
          DATA_ERROR     = 3
          OTHERS         = 4.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'FTP_R3_TO_SERVER'
        EXPORTING
          HANDLE         = HDL
          FNAME          = G_FCNAME1
          CHARACTER_MODE = 'X'
        TABLES
          TEXT           = T_FILE2
        EXCEPTIONS
          TCPIP_ERROR    = 1
          COMMAND_ERROR  = 2
          DATA_ERROR     = 3
          OTHERS         = 4.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CALL FUNCTION 'FTP_DISCONNECT'
        EXPORTING
          HANDLE = HDL.
      CALL FUNCTION 'RFC_CONNECTION_CLOSE'
          EXPORTING
            DESTINATION          = P_DEST
          EXCEPTIONS
            DESTINATION_NOT_OPEN = 1
            OTHERS               = 2.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    ENDFORM.                    " FTPCON
    Hope it helps.....

  • "evdre encountered a problem retrieving data from the webserver"

    Hi
    We are using a big report which takes very long time to expand and sometimes we get the error message "evdre encountered a problem retrieving data from the webserver" when expanding the report, but not very often for most of our users. But we have one user who gets this error message almost every second time he expands the report. This user have a computer with same capacity as the rest of us, can there be some setting on the computer or in the client installtion the cause this problem?
    We are using BPC 5.1 SP 5
    /Fredrik

    Hi,
    This error occurs usually if we have huge data in combination of our dimensions.
    Even, if the selection of your memberset is not apt to the combination of the data present in the back end, you may encounter a data retrival error.
    regards
    sashank

  • Error in abap query sq03,02,01(to get data from structure) it is possible?

    hi
    experts,
    i am developing a report using abap query .(stand t code is s_alr_87012277 it contain more fields but i want only 4 fields , i found 2 but remaining 2 are from structure)
    my problem is that debit and credit amount is in structure
    how  i can get data from structure(FAGL_S_RFSSLD00_LIST )
    solbm = debit.
    habbm  = credit.
    report is like
    op.
    gl acc no, discription, credit amount,debit amount.

    Hi ajay,
    try to use with  logical database  SDF.
    assign the logical database name in info set.
    gl acc no    -               SKA1-SAKNR
    debit.         -     Field: um02h
    credit.        -     field:  um02s 
    discription  -               SKAT-TXT20
    regards,
    sateesh.

  • How to get data from COSP table, field HRKFT as the key to data from PM?

    Dear ladies and gentlemen!
    I need to get data from COSP table, field HRKFT as the key to data from PM tables (AFKO and AUFK).
    The problem is that it is a key field to the COSP, and all non-key fields as an alternative to HRKFT are not suitable for this task.
    All this is necessary for the extractor, which loads the data from the R \ 3 systems in the BW-system. I need to perform SELECT from a table COSP and maybe also JOIN, most likely between tables COSP and AUFK.
    What should I do in this case?
    Thank you very much in advance!

    From information on help.sap.com I've made a conclusion that one of possible solutions in theory is to modify standard extractor PM_OM_OPA_1 in order to make HRKFT field available for work, because by default it is hidden by SAP and not available for use as a key field.
    Of course, it's not a very good solution, but for now I know no other way to solve this problem.
    Maybe someone knows better ways? In this case I will be very grateful for any help!
    Moderator: You'd better post it on BI forums

  • Problems transferring data from MacBook Pro to MacBook Pro

    I just bought a new MacBook Pro and I am having problems transferring data from my old MacBook Pro. I am using an Apple Thunderbolt to FW adapter to hook both computers and I am using the Migration Assistant. Everything looked ok until the "Transferring Your Information" screen got stuck. It says that it is "Transferring your Application folder..." And it has been stuck for at least the last two hours giving a message that says "About 3 minutes remaining..." This is starting to get ridiculously annoying. Options?

    I guess I am finding my own way as time progresses and frustration increases but these are two things that I have found so far:
    1. Transfering from one machine to another does not seem to be the most efficient way to do this so using the TimeMachine backup must be the way to go...
    HOWEVER
    2. In this process I also found another "complication" called: Legacy FaultVault - My computer is encripted and I used this now so called "Legacy FaultVault" app to do it (when it was no a Legacy!). The thing is that you can not transfer documents from your TimeMachine backup to your new Mac if the Legacy Fault Valut is active on your old machine so you first need to desactivate the encription. HOWEVER, this brought another issue...when I tried to desactivate the encription using the Legacy FaultVault screen I got a message saying that I did not have enough disk space to allow me to do that....Isn't that great??? This is a problem by itself and it seems to have some sort of solution I was reading about (not straight forward at all). What I am trying to do now is to copy the folder that contains my files and just paste them on my new machine to see if that works....it looks like my apps are on my new machine, unsure if they are working...need to test this next....
    I guess the transfer machine to machine could have sorted out the conflict eventually...after tens of hours or maybe not! Who knows....
    A very frustrated Apple fan...
    I love Apple products but this is an ISSUE...I feel like there is lack of adecuate documentation around to deal with this or the data transfering apps should be able to deal with this on a more efficient way....just saying...

  • Best way To get data from another application using NDDE lbrary

    My vb.net application gets data from another application using NDDE Library. I got stocks prices (open,high,low,close,volume,change......(about 15 records for each stock)) (about 200 stocks) . I don't know if there is a problem in my code.
    This is my code:
    l : is the list of stocks.
    This Sub connects to server and requests the data :
    Public Shared Sub GetQuotes()
    Try
    client1 = New DdeClient(server, topic)
    client1.Connect()
    For i As Integer = 0 To l.Count - 1
    client1.StartAdvise("QO." & l(i).t & ".TAD$last", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$open", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$high", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$low", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$pclose", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$volume", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$date", 1, True, 60000)
    client1.StartAdvise("QO." & l(i).t & ".TAD$time", 1, True, 60000)
    Next
    Catch ex As Exception
    MsgBox(ex.Message)
    End Try
    End Sub
    and then I get the data from Client_advise sub (called each time a value changed )and fill the list. What I know is that client advise gets only one record for single stock each time is called..
    Example: for stock AAPL. 1st time enters client_Advise I get open price for AAPL, 2nd time I get high price for AAPL,3rd time I get low price..... and I update the value in the List (l)
    This the client_Advise Sub:
    Private Shared Sub client1_Advise(ByVal sender As Object, ByVal e As NDde.Client.DdeAdviseEventArgs) Handles client1.Advise
    For q As Integer = 0 To l.Count - 1
    If l(q).t = w(1) Then
    Dim item() As String = e.Item.Split("$")
    If l(q).Open = "#" Then
    l(q).Open = "0"
    End If
    If l(q).hi = "#" Then
    l(q).hi = "0"
    End If
    If l(q).lo = "#" Then
    l(q).lo = "0"
    End If
    If l(q).Close = "" Or l(q).Close = "#" Then
    l(q).Close = "0"
    End If
    If l(q).pclose = "#" Then
    l(q).pclose = "0"
    End If
    If item(1) = "open" Then
    l(q).Open = Format(Val(e.Text), "0.00")
    ElseIf item(1) = "last" Then
    l(q).Close = Format(Val(e.Text), "0.00")
    ElseIf item(1) = "high" Then
    l(q).hi = Format(Val(e.Text), "0.00")
    ElseIf item(1) = "volume" Then
    l(q).Volume = Val(e.Text)
    ElseIf item(1) = "low" Then
    l(q).lo = Format(Val(e.Text), "0.00")
    ElseIf item(1) = "pclose" Then
    l(q).pclose = Format(Val(e.Text), "0.00")
    If l(q).pclose <> "" And l(q).pclose <> "#" And l(q).Close <> "" And l(q).Close <> "#" Then
    l(q).c = Format(l(q).Close - l(q).pclose, "0.00")
    l(q).cp = Format(((l(q).Close - l(q).pclose) / l(q).pclose) * 100, "0.00")
    End If
    l(q).flag1 = 2
    ElseIf item(1) = "date" Then
    l(q).Date1 = e.Text
    ElseIf item(1) = "time" Then
    l(q).Time = e.Text
    End If
    Exit For
    End If
    Next
    End Sub
    Am I doing something wrong which inreases CPU usage to 80 or 90 % ?
    Thanks in advance.

    Hi MikeHammadi,
    According to your description, you'd like to get data from another app using NDDE library.
    When using the NDDE library, the CPU usage is high. As the NDDE library is third-party library, it is not supported here. I suggest you checking if the problem is caused by the NDDE library.
    If you'd like to get data from another app. I suggest you could save the data in the dataBase, and then read it in another application if necessary.
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • How to handle the java.policy file ?

    Can somebody tell me how to handle the java.policy file? I always get java.net.SocketExceptions and java.security.AccessControlExceptions while connecting to an appserver from an applet. What do I have to write in the java.policy file, where do I hav

  • ICloud Calendar problem on PC

    I have an issue with the iCloud calendar on my PC. I have loads of events in my calendar and it's synced with my iPhone 4, running iOS 6.0.1. Yesterday I deleted some repeating events for my spring holiday, starting on 23rd March and as a result I go

  • XML Encoding error

    Hi,

  • All my photos are backed up onto iPhoto, is it safe to delete them off my iPhone?

    I have about 1,600 photos on my iphone and need to delete them to move room. I have backed them all up onto iPhoto but am unsure is this ensures saftey of alll of my photos or whether there needs to be a folder in picture for them?

  • DLS music service wont allow me to change banks

    I am trying to change my sound in the edit window of the DLS music service in garage band for using sound fonts, and for some reason the menu for changing sound banks from the default (quick time synthesizer) is "greyed out" and unavailable. if any o