Write data in Encrypting form

Hi All
It is possibel to write data in Encrypting form in text file.Or first create a Encrypting file then i write data.See i aim is that so body can read my data from file.it is possibel or not.If it is possibel then plz give me tips how can i do that..
Thx's in advance.

[http://www.google.com/search?q=cryptography+tutorial]

Similar Messages

  • How to read data in binary form from file?

    Hi,
    i try to write an implementation of LZW. I need to read data in binary form from a file. How can i do that? I cannot find something like "binary input stream" ...
    Thanks

    Hi,
    i try to write an implementation of LZW. I need to
    read data in binary form from a file. How can i do
    that? I cannot find something like "binary input
    stream" ...
    ThanksInputStream reads bytes. I don't understand your question.

  • Using Swing applet to write data to file on SERVER

    Hello,
    I'm in the process of writing an applet using Swing (SDK v1.4.2). Here's the deal. The JApplet calls a JPanel, which will be used by customers on my site to enter data. I'm adding a <Save> button to the "form" which is supposed to write data to a file on the server (in order to preserve the customer's preferences).
    Please note that I am NOT attempting to write data to the customer's hard disk. That requires digital certificates, etc. which I am trying to avoid for now.
    Instead, I am using the URL class to access the file:
    URL page = new URL("http://www.whatever.com/mycustomers/preferences.txt")
    I then use the URLConnection class to establish the connection:
    URLConnection conn = this.page.openConnection();
    conn.setDoInput(true);
    conn.setDoOutput(true);
    conn.connect();
    etc...
    I've created a text file (preferences.txt) on my web site. Using the classes InputStreamReader, BufferedStreamReader, and StringBuffer, I can successfully read the file into a JOptionPane in my applet.
    The problem comes when I try to write data TO this file. I know the file exists because the applet can read it. I've set the permissions on the file to 666. I've got all of the appropriate syntax within a try statment that catches an IOException. I also have JOptionPanes all over the place to let me know where the program is. I've tried different combinations of output streams like BufferedWriter, BufferedOutputStream, StringWriter, but the file does not get updated. When the applet runs, it does not throw any exceptions, not even when I change the URL from "HTTP://www.whatever.com/prefs.txt" to "HTTP:/www.whatever.com/prefs.txt" (only one slash on HTTP, shouldn't I get a MalformedURLException?)
    I apologize for all the background, but I thought you might need it. The bottom line is:
    1) Can an applet write to a file on a remote server (not local hard disk)?
    2) If so, what (if any) caveats are there?
    3) Is there a way to check for file existence or be able to create a new file?
    4) I'm using the HTTP protocol - is there some restriction that prevents an applet from writing to a file using that protocol? If so, is there a workaround?
    5) Assuming that creating/writing a file using the method I've described is possible, what would be the appropriate output streams to use? (Currently, I'm using OutputStreamWriter with BufferedWriter).
    I've been struggling with this for a while. Any help/suggestions would be appreciated.
    Thanks
    P.S. I also posted this message on the Applet development forum, but I've received no response as of yet.

    Http servers support PUT as a mechanism to upload data to a specified URL. Get on the other hand which is what most people are familiar with is how you retrieve that data. The basic URLConnection is an abstraction of the Http connection which can be used for GET and POST operations by default based on doInput(true|false).. If you which to use any of the http methods other than GET|POST you will have to cast the URLConnection to HttpURLConnection so you can gain access to the specific Http functionaility that could not be abstracted.
    Since you are using a hosting service the chances are that you won't be able to use HTTP PUT on their server. Most servers do not support HTTP PUT without configuring them todo so. Now Apache allows localized config through the .htacess file. It might be possible (keep in mind I am not an apache expert) to configure a particular directory to allow HTTP PUT using this .htacess file it may not be possible. You will have to consult the Apache web server documentation for that answer.
    But regardless you can use the HttpURLConnection and the PUT method to send data from your applet to the server. In fact that is the preferred way to do this. If you can not configure your web server to support that method then you will have to develop a Servlet to do it. A servlet has several methods such as doGet(), doPost(), and doPut(). You would override the doPut() method get the URI path create a file and a FileOutputStream to that file, get from the request the inputstream, possibly skip the http headers, and then write byte for byte the incoming data to your OutputStream until you reach the end at which point you would close the OutputStream and send an Http Response of some sort. Typically in HTTP it would be 200 OK plus some web content. You content can be empty so long as your applet recognizes that is what it should expect...
    And away you go...

  • Can´t write in a Planning form as user "admin"

    Hi! I can´t write in a new form that I create from a Planning Aplication. The option "read only" is not tilded and all dimensions in the form are level 0.
    I am connected as user admin and I can´t enter data from SmartView connected to Planning or Essbase nor from the form in Wokspace. I need help so I can submit data. Thanks!

    was it a domensional level security ? How did you resolve ?

  • Updating data in adobe form

    Hi All,
    In my java webdynpro application, i want to show an adobe form and allow the user to update the data. Then, i want to store the form in binary in a db table.
    The layout of my form is not fixed as a different form can be uploaded each time. So, all i have is the binary of the interactive form.
    I have added the interactive form uielement in my view. I have bound the 'pdfsource' property to a context attribute that contains the binary of the interactive form to be shown. Also, i have chosen 'usepdf' in the mode.
    Now, after the user updates the form, if i read the context attribute bound to pdfsource, will i get the updated data in the form? Or should i do anything more to get the desired result?
    Thanks and Regards,
    Ram

    Hi Ram,
    In my Project we solved the same type of situation in following Procedure.
    1.) First after the User enters data in to the Form u hav to read it from the PDF
          by using this code .It converts the Data in to XML Format.
    public String getData(String pdfSource) throws EJBException
    ByteArrayOutputStream pdfSourceOutputStream = new ByteArrayOutputStream();
    try
       InputStream pdfSourceInputStream = new FileInputStream(new File(pdfSource));
       IOUtil.write(pdfSourceInputStream, pdfSourceOutputStream);
       pdfSourceInputStream.close();
    catch (Exception e)
       System.out.println(e.getMessage());
       throw new EJBException(e.getMessage());
    IWDPDFObject pdfObject = WDPDFObjectFactory.getPDFObject();
    pdfObject.setPDF(pdfSourceOutputStream);
    ByteArrayInputStream dataInputStream =                                      (ByteArrayInputStream) pdfObject.getData();
      if (dataInputStream == null)
        return(null);
      else
        try
          String output = formatData((InputStream) dataInputStream);
          return(output);
        catch (Exception e)
           System.out.println(e.getMessage());
           throw new EJBException(e.getMessage());                                 
    2.) Then u can get the data from tht XML code easily & store it in the Data Base where u need.
    --> For more Details watch the " TutWD_PdfObject " Sample Application from this site .
    I Think It helps u lot.
    With Regards,
    Roop Kumar.

  • How to print the data on the form (smartform)...

    Hi,
    i got a requirement that i have to create a selection screen and from that i process the data according to the inputs in the selection screen, and after i collect the entire data in an internal table, now i want that data to be displayed in the form ,
    what is the process for this, can anybody explain me in detail.
    Regards,
    Ram

    Hi!
    To create new smartform
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.html
    Here is the procedure
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program
    REPORT ZSMARTFORM.
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    TABLES: MKPF.
    DATA: FM_NAME TYPE RS38L_FNAM.
    DATA: BEGIN OF INT_MKPF OCCURS 0.
    INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF.
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
    MOVE-CORRESPONDING MKPF TO INT_MKPF.
    APPEND INT_MKPF.
    ENDSELECT.
    At the end of your program.
    Passing data to SMARTFORMS
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
    formname = 'ZSMARTFORM'
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    FM_NAME = FM_NAME
    EXCEPTIONS
    NO_FORM = 1
    NO_FUNCTION_MODULE = 2
    OTHERS = 3.
    if sy-subrc <> 0.
    WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    TABLES
    GS_MKPF = INT_MKPF
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    check most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Or an another one:
    just check it step by step with lots of screen shots.
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Reward all helpfull answers
    Regards
    Tamá

  • Write data to table

    hallow i have table yhr_1
    and i wont to write data to her
    how can i do that?
    just from progran or other option.
    regards

    <b>Use insert command:</b>
    Inserting into the Database
    Variants:
    1. INSERT INTO  dbtab      VALUES wa. oder
    INSERT INTO (dbtabname) VALUES wa. oder
    INSERT  dbtab      FROM wa. oder
    INSERT (dbtabname) FROM wa.
    2. INSERT  dbtab      FROM TABLE itab. oder
    INSERT (dbtabname) FROM TABLE itab.
    3. INSERT  dbtab. oder
    INSERT *dbtab.
    Effect
    Inserts new lines in a database table (see relational database). You can specify the name of the database table either in the program itself in the form dbtab or at runtime as the contents of the variable dbtabname. In both cases, the database table must be defined in the ABAP Dictionary. By default, data is only inserted in the current client. Data can only be inserted using a view if the view refers to a single table and was defined in the ABAP Dictionary with the maintenance status "No restriction".
    INSERT belongs to the Open SQL command set.
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs.See Open SQL and Unicode.
    Notes
    You cannot insert a line if a line with the same primary key already exists or if a UNIQUE index already has a line with identical key field values (with regard to this UNIQUE index).
    When inserting lines using a view, all fields of the
    database table that are not in the view are set to their initial value
    (see TABLES) - if they were defined with NOT NULL in the ABAP Dictionary. Otherwise they are set to NULL.
    Authorization checks (see The SAP Authorization Concept) are not supported by the INSERT statement. You must include these in the program yourself.
    Lines specified with the INSERT command are not finally added to the database table until after a database commit (see Logical Unit of Work (LUW)). Prior to this, you can cancel any changes to the database with a database rollback (see Programming Transactions).
    In the dialog system, you cannot rely on the locking mechanism used by the database system (see Database Locking) to synchronize simultaneous access to the same database by several users. Therefore, it is often necessary to use SAP's locking mechanism (see SAP Locking).
    Variant 1
    INSERT INTO dbtab      VALUES wa. or
    INSERT INTO (dbtabname) VALUES wa. or
    INSERT  dbtab      FROM wa. or
    INSERT (dbtabname) FROM wa.
    Extras:
    1. ... CLIENT SPECIFIED
    2. ... CONNECTION con
    Effect
    Inserts one line into a database table. The line to be inserted is taken from the work area wa and the data read from left to right according to the line structure of the database table dbtab. Here, the structure of wa is not taken into account. For this reason, the work area wa must be at least as wide (see DATA) as the line structure of dbtab, and the alignment of the work area wa must correspond to the alignment of the line structure. Otherwise, a runtime error occurs.
    If the database table dbtab or the work area wa contain strings, wa must be compatible with the line structure of dbtab.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines (0 or 1).
    The Return Code is set as follows:
    SY-SUBRC = 0:
    Line was successfully inserted.
    SY-SUBRC = 4:
    Line could not be inserted since a line with the same key already exists.
    Example
    Insert the customer Robinson in the current client:
    DATA: wa TYPE scustom.
    wa-id        = '12400177'.
    wa-name      = 'Robinson'.
    wa-postcode  = '69542'.
    wa-city      = 'Heidelberg'.
    wa-custtype  = 'P'.
    wa-discount  = '003'.
    wa-telephone = '06201/44889'.
    INSERT INTO scustom VALUES wa.
    Addition 1
    ... CLIENT SPECIFIED
    Effect
    Automatic client handling is switched off. This allows
    you to process data on a cross-client basis for client-specific tables. The client field is then treated like a normal table field which the program must fill with values in the work area wa.
    The addition CLIENT SPECIFIED must be specified directly after the name of the database table.
    Example
    Insert the customer Robinson in client 2:
    DATA: wa TYPE scustom.
    wa-mandt     = '002'.
    wa-id        = '12400177'.
    wa-name      = 'Robinson'.
    wa-postcode  = '69542'.
    wa-city      = 'Heidelberg'.
    wa-custtype  = 'P'.
    wa-discount  = '003'.
    wa-telephone = '06201/44889'.
    INSERT scustom CLIENT SPECIFIED FROM wa.
    Addition 2
    ... CONNECTION con
    Effect
    The Open SQL command is not executed on the
    standard database, but on the secondary database connection specified with con. con is the name of the databse connection as it was specified in the table DBCON in the column CON_NAME. The database connection con can also be specified dynamically in the form (source_text), where the field source_text contains the name of the database connection and must be type C or STRING. The CONNECTION con addition must be specified directly after the name of the database table or after the CLIENT SPECIFIED addition.
    Variant 2
    INSERT  dbtab      FROM TABLE itab. oder
    INSERT (dbtabname) FROM TABLE itab.
    Extras:
    1. ... CLIENT SPECIFIED
    2. ... ACCEPTING DUPLICATE KEYS
    3. ... CONNECTION con
    Effect
    Mass insert: All lines of the internal table itab are inserted in one single operation. The lines of itab must fulfill the same conditions as the work area wa in variant 1.
    When the command has been executed, the system field SY-DBCNT contains the number of inserted lines.
    The Return Code is set as follows:
    SY-SUBRC = 0:
    All lines successfully inserted. Any other result causes a runtime error.
    Note
    If the internal table itab is empty, SY-SUBRC and SY-DBCNT are set to 0 after the call.
    Addition 1
    ... CLIENT SPECIFIED
    Effect
    As with variant 1.
    Addition 2
    ... ACCEPTING DUPLICATE KEYS
    Effect
    If a line cannot be inserted, the system does not
    terminate with a runtime error but only sets the return value SY-SUBRC to 4. All other lines are inserted after the command is executed.
    Addition 3
    ... CONNECTION con
    Effect
    As with variant 1.
    Variant 3
    INSERT  dbtab. or
    INSERT *dbtab.
    Extras:
    1. ... CLIENT SPECIFIED
    2. ... CONNECTION con
    The syntax check performed in an ABAP Objects context is stricter than in other ABAP areas.
    See Cannot Use Short Forms and Cannot Use * Work Areas.
    Note
    This variant is obsolete.
    Effect
    These are the SAP-specific short forms of variant 1. They have the same effect as variant 1, but the work area is not specified explicitly. Instead, the system implicitly uses the table work area dbtab or *dbtab declared using a TABLES statement.
    INSERT  dbtab. bzw.
    INSERT *dbtab.
    is equivalent to
    INSERT INTO dbtab VALUES  dbtab. or
    INSERT INTO dbtab VALUES *dbtab.
    When the command has been executed, the system field SY-DBCNT contains the number of lines inserted (0 or 1).
    The Return Code is set as follows:
    SY-SUBRC = 0:
    Line successfully inserted.
    SY-SUBRC = 4:
    Line could not be inserted, since a line with the same key already exists.
    Example
    Add a line to a database table:
    TABLES sairport.
    sairport-id   = 'NEW'.
    sairport-name = 'NEWPORT APT'.
    INSERT sairport.
    Notes
    You should always use variant 1 where you specify an explicit work area wa instead of using the implicit TABLES work area.
    If a work area is not explicitly specified, the values for the line to be inserted are taken from the table work area dbtab if the statement is in a FORM or FUNCTION where the table work area is stored in a formal parameter or local variable of the same name.
    Addition 1
    ... CLIENT SPECIFIED
    Effect
    As with variant 1.
    Addition 2
    ... CONNECTION con
    Effect
    As with variant 1.

  • Pdf form for data from another form with data, xml or pdf, tables not expanding

    Sir,
    I am using Adobe Acrobat 9 Pro and LifeCylce to do these forms. I have made several subforms for a Risk Assessment for the mission they fly. I have also made up another form with tables that would connect with each subform data. This form also will give me and others a % of the values received from the data to help us with seeing problem area towards Safety.
    I am able to connect the data to the form from the Risk Forms but when I go and add another group of data it over writes the data that was already in the data collection form. The tables are dynamic and able to expand with the generated data but when I compile several Risk Forms, xml. data into one single data group, the receiving tables will not except this data. To compile the data I am in Acrobat and using the form-manage form data-merge data to spreadsheet than enter as a report that is xml. Still not working. I also tried to save the form, with data already in the tables, and then opened it again and add data to it, it will over write the existing data in the form. This form does work great with the generated data in LiveCycle.
    Any suggestions???

    Thanks Paul
    Did as you said and for each subform binding tab made sure I have "Repeat subform for each data item" checkbox and still no change when I add the data.
    I even tried to combine the xml data and that file just has the main page and not the data pages. just another problem that is happening.
    Any other suggestions on this expanding tables and receive single forms one at a time.
    Bill

  • Problem printing date on the form

    Hello friends ,
    I am doing form for the HR . Is there any special formatting needed to print the date on the form . I am doing this .
    &t_payment-paydate& in the main window of the form .
    t_payment is the table and paydate the date of payment . But instead of printing 1/22/2006 . It is printing 3//20/07/2 some junk value . Is it the format related problem ?
    Any suggestions . You help would be greatly appreciated .
    Regards & Thanks ,
    Hari

    HI,
    You can do like this.
    You make the following changes in the program
    1. Define a character type field
         data: v_payment_date(10) type c.
    2.  Assign the date value to the character field
          write t_payment-paydate to v_payment_date.
    You make the following changes in your sapscript text element.
        instead of using field t_payment-paydate use v_payment_date.
    Thanks
    Ramakrishna

  • How to show text in encrypted form using forms

    Actually I am making an application for changing the password so I want to first confirm the old password but how can I display the password in encrypted form...
    Thanx in advance

    If you need hide password in text item you can set item's property "Conceal Data" to "Yes"
    Good Luck,
    Michael
    null

  • Offline scenario - post data from saved form to SQLServer

    This is the scenario am struggling to develop. User downloads the interactive form.  Goes offline. I mean no connection to the Web Application Server. But he will have access to a SQLServer database (it may be on his machine or in his intranet). He will fill the form and save it on his local hard disk. Now, I want his saved form data to be posted to the SQLServer.  I thought about a couple of ways to do this.
    1) Is it possible to change the control type of 'Submit' button to submit and then in the URL field, call some ASP page (this page is deployed on a local IIS) and then submit the form fields to that ASP page which takes care of database connection, posting etc. So user downloads form only once. But fills it with different data each time and clicks submit. First of all, will submit button work when the form is not opened in web browser? I mean when it is saved on a local hard disk opened in a standalone Adobe Reader?
    2) Is it possible to write some java program using any APIs and extract the data from the form saved on local hard disk? It may be possible because I have the .xdp file for the form. But I dont know if there are some APIs available to do the same.
    Any inputs whether these ideas are feasible? Any other new ideas are also welcome. Thanks in advance.

    Hi Narayana,
    if you want to export xml data from Reader to local disk you can use a command:
    xfa.host.exportData("",0);
    It works like from menu Export data from Forms.
    To your second post:
    Yes, you can save form in Adobe Live cycle designer as pdf and you can open it in Adobe Reader and test it. It will work.
    In tab Submit for your button set these properties:
    Submit Format: XML Data (XML)
    Submit to URL: url of your page
    Encoding: UTF8
    Here is a sample code in c# for asp.net. Insert method save to your asp.net page and call it from method Page_Load.
              using System;
              using System.IO;
              using System.Web;
              private void save()
                   const int coniBufferLen=1024;
                   string lsTmpFile;
                   try
                        lsTmpFile="c:\adobe\body.pdf.xml.txt";  // File on local disk where to save xml data sent by Reader. IIS needs rights to write here.
                        FileStream loFS=null;
                        try {loFS=File.Create(lsTmpFile);}
                        catch (Exception e1)
                             // TODO
                             return;
                        int liCelkem=Request.ContentLength;
                        int liNacteno=0;
                        byte[] laResponse=null;
                        int liLen=Math.Min(coniBufferLen,liCelkem-liNacteno);
                        while (liLen>0)
                             try
                                  laResponse=Request.BinaryRead(liLen);
                                  loFS.Write(laResponse,0,liLen);
                             catch (Exception e1)
                                  try {loFS.Close();}
                                  catch {}
                                  try {File.Delete(lsTmpFile);}
                                  catch {}
                                  // TODO
                                  return;
                             liNacteno+=liLen;
                             liLen=Math.Min(coniBufferLen,liCelkem-liNacteno);
                        loFS.Close();
                   catch (Exception e2)
                        // TODO
                        return;
    Michal

  • How to read/write data in Notepad?

    Hi to all,
    Im creating a simple application to write data in notepad using wireless toolkit 2.5. For that i have created a notepad file(raj.txt) manually and saved in the location "D:\WTK25\appdb\DefaultColorPhone\filesystem\root1\raja.txt". When i run in the emulator..Its shows the following exception " java.io.IOException : Root is not accessible". I got struck in this thing. For your convenience i have attached my source code also. Please correct and explain me
    1. Where should i store the notepad file in Wireless Toolkit 2.5?
    2. If i use wireless toolkit 2.5, What is the link should i give in the method Connector.open("file:///???")?
    My source code:
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import java.io.*;
    import javax.microedition.io.*;
    public class FileConnection extends MIDlet implements CommandListener
    private Display display;
    private Form form;
    Thread s=new Thread();
    public FileConnection ()
    display = Display.getDisplay(this);
    form = new Form("Write To File");
    form.setCommandListener(this);
    public void startApp() throws MIDletStateChangeException
    try
    OutputConnection connection = (OutputConnection)
    Connector.open("file://localhost/D:/WTK25/appdb/DefaultColorPhone/filesystem/root1/raj.txt", Connector.WRITE );
    OutputStream out = connection.openOutputStream();
    PrintStream output = new PrintStream( out );
    output.println( "This is a test." );
    out.close();
    connection.close();
    Alert alert = new Alert("Completed", "Data Written", null, null);
    alert.setTimeout(Alert.FOREVER);
    alert.setType(AlertType.ERROR);
    display.setCurrent(alert);
    catch( ConnectionNotFoundException error )
    Alert alert = new Alert("Error", "Cannot access file.", null, null);
    alert.setTimeout(Alert.FOREVER);
    alert.setType(AlertType.ERROR);
    display.setCurrent(alert);
    catch( IOException error )
    Alert alert = new Alert("Error", error.toString(), null, null);
    alert.setTimeout(Alert.FOREVER);
    alert.setType(AlertType.ERROR);
    display.setCurrent(alert);
    public void pauseApp() {}
    public void destroyApp(boolean unconditional) {}
    public void commandAction(Command command, Displayable displayable) {}
    }

    Kindly read the below mentioned article links. You'll understand what is going wrong in your present implementation.
    http://developers.sun.com/techtopics/mobility/apis/articles/fileconnection/
    http://today.java.net/pub/a/today/2007/03/29/working-with-java-me-fileconnection-on-physical-devices.html
    ~Mohan

  • Passing data to smart forms...

    Hi,
    I am learning smartforms and so far have done the following.
    1. Using transaction smartforms, created a Ztestsmartform with one page named "coverpage". the page contains two window elements named, vendorname and faxnum. saved and activated the form.
    2. wrote a zprogram to retrieve data from tables and pass on to the form. I have created an internal table to hold the data. i am  not clear on how to pass that data to my form ?? should i loop the itab and call the function "SSF_FUNCTION_MODULE_NAME" ?? how to pass my itab data then ??
    please explain !!
    whats the purpose of calling function FM_NAME ??
    i took the function module code from a sample available on the net.
    thanks
    REPORT  ZPROGFORSMARTFORMS.
    TABLES: LFA1, LFB1.
    DATA: BEGIN OF VENDOR_DATA OCCURS 0,
          VENDORNAME LIKE LFB1-LIFNR,
          FAXNUM LIKE LFA1-TELFX,
          END OF VENDOR_DATA.
    DATA: VENDOR_LIST LIKE VENDOR_DATA OCCURS 0 WITH HEADER LINE.
    SELECT ALIFNR BTELFX INTO TABLE VENDOR_LIST FROM LFB1 AS A INNER JOIN LFA1 AS B ON ALIFNR = BLIFNR.
    LOOP AT VENDOR_LIST.
    ENDLOOP.
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZTESTSMARTFORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
      IMPORTING
        FM_NAME                  = FM_NAME
      EXCEPTIONS
        NO_FORM                  = 1
        NO_FUNCTION_MODULE       = 2
        OTHERS                   = 3.
    if sy-subrc <> 0.
       WRITE: / 'ERROR 1'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    call function FM_NAME
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        GS_MKPF                    = INT_MKPF
      EXCEPTIONS
        FORMATTING_ERROR           = 1
        INTERNAL_ERROR             = 2
        SEND_ERROR                 = 3
        USER_CANCELED              = 4
        OTHERS                     = 5.
    if sy-subrc <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.

    Hi Sha,
    1) As client dependency is one of the drawback in the scripts, we use smart forms.
    2) When you run a Smartform it gives you a function module, using tha you can run the smart form from your driver program by calling it in the same.
    3) You give the smartform name and the function module name in the SSF_FUNCTION_MODULE_NAME.
    4) While calling the function module in the driver program, first run the smart form and call it using PATTERN, then you change the Call function name as the below example.
    5) You can pass the tables to the table parameters which will come from the function module.
    Please see the below Driver program of a smartform.
    report  zsree_temp_smart                        .
    data: it_sree type standard table of zsree_marc.
    data: x_sree1 type zsree_temp.
    parameters: p_matnr type mara-matnr.
    start-of-selection.
      perform select_data.
    end-of-selection.
      perform smart_form.
    *&      Form  SELECT_DATA
          text
    form select_data .
      select single
             matnr
             ersda
             ernam
             mtart
       from  mara
       into  x_sree1 where matnr = p_matnr.
      if x_sree1 is not initial.
        select matnr
               werks
               pstat
               lvorm
         from  marc
         into  table it_sree
         where matnr = x_sree1-matnr.
      endif.
    endform.                    " SELECT_DATA
    *&      Form  SMART_FORM
          text
    form smart_form .
      data: l_p_form type tdsfname.
      call function 'SSF_FUNCTION_MODULE_NAME'
        exporting
          formname                 = 'ZSREE_TEMP'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
        importing
          fm_name                  = l_p_form
       exceptions
         no_form                  = 1
         no_function_module       = 2
         others                   = 3.
      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 l_p_form
        exporting
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
          x_sree                     = x_sree1
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        tables
          it_zsree                   = it_sree
    exceptions
       formatting_error           = 1
       internal_error             = 2
       send_error                 = 3
       user_canceled              = 4
       others                     = 5.
      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.                    " SMART_FORM
    Please do not forget to give rewards if it can help you better.
    Thanks,
    Sreekanth

  • Hi ... Is there a way to import data from fillable form pdf to iwork numbers ???

    Can somebody tell me ., is there a way to import data from fillable form PDF to iwork numbers or do i need to write a code to do this ???

    This may help but I have never used PDF forms:
    http://helpx.adobe.com/acrobat/kb/acrobat-forms-form-data-web.html

  • Excel crashes when entering data from VBA form

    After only 6 lines of data entered via VBA form with macros enables, excel crashes everytime. The code basically looks for the next empty row and then populates sheet with data from the form.
    Is this known bug or is there something in the code causing this. I have tried on a couple of macs and get the same result.
    Will post code here and the CRASH code ....
    This is the code
    Private Sub CommandButton1_Click()
    'Dim lRow As Integer
    Dim lRow As Long
    Dim ws As Worksheet
        Set ws = Worksheets("FamilySunday")
       lRow = ws.Cells.Find(what:="*", searchorder:=xlRows, searchdirection:=xlPrevious, LookIn:=xlValues).Row + 1
       'lRow = ws.Cells.Find(what:="*", searchorder:=xlRows, searchdirection:=xlPrevious, LookIn:=xlValues).Row + 1
        With ws
        Cells(lRow, 1).Value = Me.txtName.Value
        Cells(lRow, 2).Value = Me.txtEmail.Value
        Cells(lRow, 3).Value = Me.txtFacebook.Value
        Cells(lRow, 4).Value = Me.txtMobile.Value
        Cells(lRow, 5).Value = Me.txtDate.Value
        If OptionButton1.Value = True Then
        Cells(lRow, 6).Value = "Face Book"
        ElseIf OptionButton2.Value = True Then
        Cells(lRow, 6).Value = "Twitter"
        ElseIf OptionButton3.Value = True Then
        Cells(lRow, 6).Value = "Skating Heaven web site"
    Else
        Cells(lRow, 6).Value = "Friends"
            End If
        Cells(lRow, 10).Value = Me.txtParty.Value
        End With
        'Clears the form for new entry
        Me.txtName.Value = ""
        Me.txtEmail.Value = ""
        Me.txtFacebook.Value = ""
        Me.txtMobile.Value = ""
        Me.txtParty.Value = ""
        Me.txtDate.Value = ""
        Unload Me
        frmDisclaim.Show
        ActiveWorkbook.Save
    End Sub
    Private Sub CommandButton2_Click()
    Unload Me
    ActiveWorkbook.Save
    Application.DisplayAlerts = False
    Application.Quit
    Application.DisplayAlerts = False
    End Sub
    Private Sub txtName_Change()
    'This will add date of entry which is hidden from view
    Me.txtDate.Value = Format(Date, "Medium Date")
    End Sub
    And this is the CRASH CODE
    Process:         Microsoft Excel [243]
    Path: /Users/useruser/Desktop/Microsoft Office 2004/Microsoft Excel
    Identifier:      com.microsoft.Excel
    Version:         111101 (11.6.6)
    Code Type:       PPC (Translated)
    Parent Process:  launchd [64]
    Interval Since Last Report:          12933 sec
    Crashes Since Last Report:           2
    Per-App Interval Since Last Report:  1251 sec
    Per-App Crashes Since Last Report:   2
    Date/Time:       2012-04-19 01:39:36.568 +0100
    OS Version:      Mac OS X 10.5.8 (9L31a)
    Report Version:  6
    Anonymous UUID:  1EA8AF14-BFEA-4D77-B4AD-582D3EC7D271
    Exception Type:  EXC_BAD_ACCESS (SIGBUS)
    Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000001
    Crashed Thread:  0
    Thread 0 Crashed:
    0   translate 0xb80bcd58 0xb8000000 + 773464
    1   translate 0xb80b7007 0xb8000000 + 749575
    2   translate 0xb80d49c0 0xb8000000 + 870848
    3   translate 0xb813ce79 spin_lock_wrapper + 1981
    4   translate 0xb8011b64 0xb8000000 + 72548
    Thread 1:
    0   ??? 0x800bc166 0 + 2148254054
    1   ??? 0x800c395c 0 + 2148284764
    2   translate 0xb818b6ea CallPPCFunctionAtAddressInt + 202886
    3   ??? 0x800ed055 0 + 2148454485
    4   ??? 0x800ecf12 0 + 2148454162
    Thread 2:
    0   translate 0xb81529ef spin_lock_wrapper + 90931
    1   translate 0xb8183633 CallPPCFunctionAtAddressInt + 169935
    2   translate 0xb81861e2 CallPPCFunctionAtAddressInt + 181118
    3   translate 0xb80dfb0b 0xb8000000 + 916235
    4   ??? 0x812d7856 0 + 2167240790
    Thread 3:
    0   translate 0xb815289e spin_lock_wrapper + 90594
    1   translate 0xb816e8a7 CallPPCFunctionAtAddressInt + 84547
    2   translate                              0xb80dfb0b 0xb8000000 + 916235
    3   ??? 0x81b75cb6 0 + 2176277686
    Thread 0 crashed with X86 Thread State (32-bit):
    eax: 0x00000000  ebx: 0xb80bcd30  ecx: 0x00000001  edx: 0x00000003
    edi: 0x00000001  esi: 0x80303820  ebp: 0xb7fffa08  esp: 0xb7fff9d0
       ss: 0x0000001f efl: 0x00010206  eip: 0xb80bcd58   cs: 0x00000017
       ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
    cr2: 0x00000001
    Binary Images:
    0xb8000000 - 0xb81d7fe7  translate ??? (???) /usr/libexec/oah/translate
    Translated Code Information:
    Rosetta Version:  21.03
    Args: /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp /Users/useruser/Desktop/Microsoft Office 2004/Microsoft Excel
    Exception: EXC_BAD_ACCESS (0x0001)
    Thread 0: (0xb009a83c, 0xb81529ef)
    0x00833000: No symbol
    0x00659204: /Users/useruser/Desktop/Microsoft Office 2004/Office/ShMem.bundle/Contents/MacOS/ShMem : _MerpUnregisterCFMFragment + 3156
    0x944fd074: /usr/lib/libSystem.B.dylib : __pthread_body + 40
    0x00000000: /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp :   + 0
    PPC Thread State
    srr0: 0x00000000        srr1: 0x00000000 vrsave: 0x00000000
    cr: 0xXXXXXXXX              xer: 0x00000000 lr: 0x94472fa0                        ctr: 0x9446c070
    r00: 0xffffffe1             r01: 0xf0080d60         r02: 0x00000001         r03: 0xf0080e4c         
    r04: 0x00000102         r05: 0x00000000         r06: 0x00000054         r07: 0x00003403        
    r08: 0x000003e8         r09: 0x00000000         r10: 0x000eb018         r11: 0xa076368c        
    r12: 0x9446c070         r13: 0x00000000         r14: 0x00000000         r15: 0x00000000        
    r16: 0x00000000         r17: 0x00000000         r18: 0x00000000         r19: 0x00000000        
    r20: 0x00000000         r21: 0x00000000         r22: 0x00000000         r23: 0x00000000        
    r24: 0xf0080e4c          r25: 0x00000054         r26: 0x00003403         r27: 0x000003e8        
    r28: 0x00000000         r29: 0x00000102         r30: 0x00000102         r31: 0x00663fb0        
    Thread 1: (0xb011ce20, 0xb815289e)
    0x944af1d8: /usr/lib/libSystem.B.dylib : __pthread_cond_wait + 1260
    0x91f57944: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore : _TSWaitOnConditionTimedRelative + 244
    0x91f57718: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore : _TSWaitOnSemaphoreCommon + 432
    0x91f898ac: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonC ore.framework/Versions/A/CarbonCore : _TimerThread + 72
    0x944fd074: /usr/lib/libSystem.B.dylib : __pthread_body + 40
    0x00000000: /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp :   + 0
    PPC Thread State
    srr0: 0x00000000        srr1: 0x00000000 vrsave: 0x00000000
    cr: 0xXXXXXXXX              xer: 0x20000000 lr: 0x944af218                        ctr: 0x9446c0f0
    r00: 0xffffffd9             r01: 0xf0101c90          r02: 0xa075e53c          r03: 0x00005e03        
    r04: 0x00006103         r05: 0x00000000         r06: 0x0aa34c10          r07: 0x00000000        
    r08: 0x00000000         r09: 0x00000001         r10: 0xf0101e48          r11: 0xa0763a74        
    r12: 0x9446c0f0          r13: 0x00000000         r14: 0x00000000         r15: 0x00000000        
    r16: 0x00000000         r17: 0x00000000         r18: 0x00000000         r19: 0x00000000        
    r20: 0xa035986c         r21: 0x92037570         r22: 0x92037570         r23: 0x00000000        
    r24: 0x00000000         r25: 0x00000001         r26: 0xf0101e48          r27: 0xa075ed00        
    r28: 0xa0351bc4         r29: 0xa075e53c          r30: 0xa0351bf8          r31: 0x944aed00        
    Thread 2: Crashed (0xb7fff9d0, 0xb80bcd58)
    0x767dcd34: No symbol
    0x767e25d8: No symbol
    0x7678010c: No symbol
    0x76792208: No symbol
    0x767eaa98: No symbol
    0x76773ebc: No symbol
    0x767dcd34: No symbol
    0x76808188: No symbol
    0x76815f0c: No symbol
    0x767dcd34: No symbol
    0x76767314: No symbol
    0x76773e38: No symbol
    0x767e9188: No symbol
    0x767e8cf0: No symbol
    0x767f1064: No symbol
    0x767f2f5c: No symbol
    0x7681cbcc: No symbol
    0x767fd7c0: No symbol
    0x7680563c: No symbol
    0x767e8cf0: No symbol
    0x767f1064: No symbol
    0x767e50fc: No symbol
    0x767e5020: No symbol
    0x767e54e8: No symbol
    0x7680cbbc: No symbol
    0x763d0b88: No symbol
    0x763cf824: No symbol
    0x76397520: No symbol
    0x76455e94: No symbol
    0x763abca8: No symbol
    0x763a8e68: No symbol
    0x763a8d6c: No symbol
    0x763bb110: No symbol
    0x763bb2c8: No symbol
    0x76390850: No symbol
    0x7639091c: No symbol
    0x00902e8c: No symbol
    0x7652b078: No symbol
    0x76517ff4: No symbol
    0x00971b90: No symbol
    0x7631ec60: No symbol
    0x7631ee30: No symbol
    0x765361c4: No symbol
    0x765374ac: No symbol
    0x76537ad0: No symbol
    0x7681947c: No symbol
    0x767e3e60: No symbol
    0x767e0234: No symbol
    0x767e55a4: No symbol
    0x76774cc0: No symbol
    0x7676f198: No symbol
    0x7676f248: No symbol
    0x7676f278: No symbol
    0x76781c54: No symbol
    0x767dcd34: No symbol
    0x7680faac: No symbol
    0x7682ad04: No symbol
    0x76817bdc: No symbol
    0x767dcd34: No symbol
    0x76773b58: No symbol
    0x767f168c: No symbol
    0x767f3490: No symbol
    0x763b2594: No symbol
    PPC Thread State
    srr0: 0x00000000        srr1: 0x00000000 vrsave: 0x00000000
    cr: 0xXXXXXXXX              xer: 0x20000000 lr: 0x767e25d8                       ctr: 0x7679b670
    r00: 0x767e25d8         r01: 0xbffafec0            r02: 0x177a0000         r03: 0x00000001        
    r04: 0xbffaffe8            r05: 0x177b2024         r06: 0x00000044         r07: 0x00000002        
    r08: 0xbffb0058          r09: 0xbffb0048          r10: 0x00000000         r11: 0x177bd71c        
    r12: 0x177a1094         r13: 0x15c69b48         r14: 0x00000002         r15: 0x15637d20        
    r16: 0x15637d20         r17: 0x00000001         r18: 0x156844ec         r19: 0x00001081        
    r20: 0x15c032e0         r21: 0x00000000         r22: 0x00000004         r23: 0x1ad300d0        
    r24: 0x1ad300d0         r25: 0x00000000         r26: 0x00000000         r27: 0xffffffff 
    r28: 0xfffffd37            r29: 0xbffaffe8            r30: 0xbffaff50            r31: 0xbffaffe8           

    The issues you describe have nothing to do with the other posting you are referencing. They state they have the following problem:
    (numbers on ipad) drops several of the important features that I created in the laptop version such as headers and footers, fonts, steppers, sliders, etc.
    It sounds like your having no data entry at all. There is a known issue with certain formulas causing crashes, but not every data entered like you seem to be stating.
    I might have missed it, but did you delete and reinstall Numbers on your ipad?
    If not, please write down EXACTLY the steps used to reproduce the problem, then go to http://www.apple.com/feedback and input this into a bug report for ipad numbers. Be very specific as to the steps involved to get to the crash point.
    Thanks
    Jason

Maybe you are looking for