How to create a flat files and how i used this

hi Guys and gals,
I am david. I want to know how to create a flat files. I don't know about it also. pls explain it and also pls help me to create a flat files. If u have any program for creating pls send me.
I want to know about retrive the datas from flat files and also insert a record into it.
pls guide me
i need this immediately
david

void newMethod() throws Exception {
     // Reading from a flat file
     String data;     
     BufferedReader br = new BufferedReader(new FileReader("c:\filename1.txt"));
     while ((data = br.readLine()) != null) {
          System.out.println(data);
     // Writing to a flat file
     BufferedWriter bw = new BufferedWriter(new FileWriter("c:\filename2.txt"));
     bw.write("sample data");
     // After writing the data close the file
     bw.close();
}

Similar Messages

  • How we create a flat file on the application server

    hi,
    how we create a flat file on the application servere,this file have the header data and corresponding item data also.
    i.e. how we use the AT NEW and ATEND. statement in this file creation.
    pls send me some code related to this.
    thanks,
    vipin

    Hi Grafl,
    Chk this link
    Folder creation in AL11 using ABAP program
    try this code.This works on UNIX servers
    data: unixcom like   rlgrap-filename.
    data: begin of tabl occurs 500,       
            line(400),    
          end of tabl.
    dir = unixcom = 'mkdir mydir'. "command to create dir
    "to execute the unix command 
    call 'SYSTEM' id 'COMMAND' field unixcom
                      id 'TAB' field tabl[].
    <b>Reward Points if Useful</b>
    Regards
    Gokul

  • How to create a Custom UIView and How to instantiate that ?

    How to create a Custom UIView and How to instantiate that ?
    In Flash, all we need to do is create a MovieClip and assign it a class name in the library.
    Instantiation is a simple matter of:
    var newclass:CustomClass = new CustomClass({initialization_data:1652});
    addChild(newclass);
    At this current point in time, my understanding of creating custom UIView in xcode is limited to the understanding that you have to:
    1: Forward declare the class in the header.
    2:
    ]newclass *CustomClass in @interface's {}
    and THEN
    @property (nonatomic, retain) newclass *CustomClass;
    in the header file also.
    3: Nib initialization in the implementation file in viewDidLoad and do "addSubview".
    ==============================
    Based on my limited understanding at this point, I find the need to
    @property (nonatomic, retain) newclass *CustomClass;
    at the header somewhat limiting...as it denotes you must know how many instance you will create in the application before hand.
    I believe I am wrong here, hence, my question is, how do I add custom UIViews with initialization codes in real time ?

    hi,
    one workaround i could think of is using the CM views to search for content that belongs to a category and display it in a custom way.
    http://www.oracle.com/technology/products/ias/portal/html/plsqldoc/pldoc904/wwsbr_api_view.html
    this only allows you to search for the meta-data available in the CM views but not the content of an item that is available when doing a search.
    in the next major portal release we will have a publich search API that can be used for these type of requirements. you can execute your search and format the results in the way you want.
    regards,
    christian

  • How to create a job card and how to add waranty card in sales order

    I have one scenario for CS.the scenario is realted to automotive industry. Basically its a trading industry of HCV,MCV,LCV apart from that they will do servicing also. First the customer comes for a service.he is having free services. he will have waranty for spare parts of the vehicle. once he comes for servicing first the executive will take complains from the customer after that a Job card will be issued to the customer. there his chasis no ,engine no and registration no will be there. once enter the chasis no entire customer details has to come. how many free services he is having for how many kilo meters.then job card will go to the spare parts dept.that dept will issue the spare parts.then they will invoice the customer. he will pay the payment.and finally the gate pass will be given to the customer to deliver the vehicle.
    painful area is how to create a job card and how to add waranty in sales order.
    Regards,
    Venkat

    Hi,
    Have u resolved it then Please let me know !!! It is a very interesting problem and owuld like to know the solution...
    Regards
    Krishna

  • How to create the log file in remote system using log4j.

    Hi,
    How to create the log file in remote system using log4j. please give me a sample code or related links.The below example i used for create the log file in remote system but it return the below exception.Is there any authandication parameter for accessing the remote path? Please help.
    public class Logging
    Logger log=null;
    FileAppender fileapp=null;
    public Logging(String classname)
    try
    log = Logger.getLogger(classname);
    String path=" [\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt|file://\\192.168.0.14\\c$\\LOG\\d9\\May_08_2008_log.txt]";
    fileapp = new FileAppender(new PatternLayout("%r [%t] %-5p %c %x - %m%n"),path, true);
    log.addAppender(fileapp);
    log.info("Logger initilized");
    }catch(Exception ex)
    ex.printStackTrace();
    java.io.FileNotFoundException: \\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt (The network path was not found)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:290)
    at org.apache.log4j.FileAppender.<init>(FileAppender.java:109)
    at annwyn.logger.BioCapLogger.<init>(Logging.java:23)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Please help.
    Thanks in advance.
    Saravanan.K

    Sorry path is missing for the above request.
    path="\\192.168.0.14\c$\LOG\d9\May_08_2008_log.txt ";
    please help.
    Saravanan.K

  • Can any one tell me how to write the properites files and how to acces

    can any one tell me how to write the properites files and how to acces thoose files
    plz let me no
    thanks in advance

    http://www.exampledepot.com/egs/java.util/Props.html

  • Plz tell me how to create authority check objects and how to usein prg

    dear sir,
    plz tell me how to create authority check objects and how to usein prg

    http://help.sap.com/saphelp_46c/helpdata/en/5c/deaa74d3d411d3970a0000e82de14a/content.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/52/6716a6439b11d1896f0000e8322d00/content.ht
    Create custom authorization – Customer specific object
    If you have requirements that cannot be met using the P_ORGIN and P_ORGXX authorization objects (for example, because you want to build your authorization checks on additional fields of the Organizational Assignment infotype (0001) that are customer-specific), you can include an authorization object in the authorization checks yourself.
    Create the authorization object using transaction SU21. Make sure you keep to the customer name range (Z/Y). To be able to use the new authorization object you have created in the master data authorization check, the object must contain the INFTY, SUBTY, and AUTHC fields. You can use any of the fields of the Organizational Assignment infotype (0001) for the other fields. You can also use customer-specific additional fields provided they are CHAR or NUMC type fields.
    After you have created the object, you must start the RPUACG00 report. This report overwrites the MPPAUTZZ standard include with the code that is needed to evaluate the authorization object you created. Note: Technically speaking, this involves a modification. However, SAP fully supports this procedure. And you should not have more maintenance work as a result of this modification.
              Note: that if you use customer-specific authorization objects, you must maintain these objects in transaction SU24 (Maintain Assignment of Authorization Objects to Transactions) in the same way as you maintain the authorization objects P_ORGIN, P_ORGXX, and P_PERNR
    AUTHORITY CHECK OBJECT Object_name
                ID fieldname1 FIELD fieldvalue1
                ID fieldname2 FIELD fieldvalue2
                ID fieldname3 FIELD fieldvalue3.
                 If sy-subrc eq 0.   "Authorization exists
                 Endif.
    http://articles.techrepublic.com.com/5100-6329_11-5110893.html
    Edited by: JackandJay on Jan 16, 2008 10:21 AM

  • How to create the Export Data and Import Data using flat file interface

    Hi,
    Request to let me know based on the requirement below on how to export and import data using flat file interface.....
    Please provide the steps involved for the same.......
    BW/BI - Recovery Process for SNP data. 
    For each SNP InfoProvider,
    create:
    1) Export Data:
    1.a)  Create an export data source, InfoPackage, comm structure, etc. necessary to create an ASCII fixed length flat file on the XI
    ctnhsappdata\iface\SCPI063\Out folder for each SNP InfoProvider. 
    1.b)  All fields in each InfoProvider should be exported and included in the flat file. 
    1.c)  A process chain should be created for each InfoProvider with a start event. 
    1.d)  If the file exists on the target drive it should be overwritten. 
    1.e)  The exported data file name should include the InfoProvider technical name.
    1.f)  Include APO Planning Version, Date of Planning Run, APO Location, Calendar Year/Month, Material and BW Plant as selection criteria.
    2) Import Data:
    2.a) Create a flat file source system InfoPackage, comm structure, etc. necessary to import ASCII fixed length flat files from the XI
    ctnhsappdata\iface\SCPI063\Out folder for each SNP InfoProvider.
    2.b)  All fields for each InfoProvider should be mapped and imported from the flat file.
    2.c)  A process chain should be created for each InfoProvider with a start event. 
    2.d)  The file should be archived in the
    ctnhsappdata\iface\SCPI063\Archive directory.  Each file name should have the date appended in YYYYMMDD format.  Each file should be deleted from the \Out directory after it is archived. 
    Thanks in advance.
    Tyson

    Here's some info on working with plists:
    http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Introduc tion/chapter1_section1.html
    They can be edited with any text editor. Xcode provides a graphical editor for them - make sure to use the .plist extension so Xcode will recognize it.

  • How to Create a Flat File using FTP/File Adapter

    Can any body done workaround on creating the Flat file using FTP/File Adapter?.
    I need to create a simple FlatFile either using of delimiter/Fixed length. using the above said adapters we can create XML file, i tried concatinating all the values into a single String and writing into a file, but it does not have proper structure
    Can any body help me out on this..
    Thanks
    Ram

    You can create a text schema while creating a File Adapter. If schema is specified for File Adapter, it takes care of converting XML into fixed length or delimited format.
    Thanks,
    -Ng.

  • How to load a flat file into BW-BPS using Web Browser

    Hello, i have a problem with the "How to do Paper". I want to upload a Excel CSV file , but the paper only describes a txt file Uplaod. Does anybody can help me ?Thanks !

    You need to parse the line coming in from the flat file...
    You can do this with generic types in your flat file structure (string). 
    Then you loop through the table of strings that is your flat file and parse the string so that it breaks up the line for each comma.  There is an ABAP command called: SPLIT - syntax is as follows:
    SPLIT dobj AT sep INTO
          { {result1 result2 ...} | {TABLE result_tab} }
          [IN {BYTE|CHARACTER} MODE].
    Regards,
    Zane

  • How to create table.maint.generator and enduser should use using ztcode

    Hi,
           can any one guide me how to create table maintanence generator and after creating,enduser must use using ztcode.
             any help can be appreciated.
    Thanks & Regards,
    Sandeep.

    Hi,
    Table Maintenance generator is required to do Manual entries in the Table. If the requirement is to update the table only programmatically and not manually then table maint. generator is not required.
    Manual entries in table can be maintained ( New record can be inserted / existing can be modified ) using transaction SM 30, if the table maintenance for the table is generated.
    How to activate Table maint.
    Goto SE11 and open the table.
    Click UTILITIES -> Table Maint. Generator, Enter the details and click on Save. Then activate the table.
    chk a sample 1.
    refer.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc
    some more helps
    Check out this thread:
    table maintenance
    http://help.sap.com/saphelp_erp2005/helpdata/en/a7/513520407a11d1893b0000e8323c4f/frameset.htm - a link for basics on Table Maintenance.
    Also, Check out this weblog on table maintenance:
    /people/sudheer.cheedella/blog/2006/02/20/extracting-data-in-table-maintenance
    <b>how to create a a T-code of that</b>
    Go to se93.
    Then create the new T.code.
    Under that select parameter Transaction.
    Then give the sm30 in the t.code in default values tab.
    check the checkbox skip initial screen.
    in classification tab.
    click checkbox inherit gui attributes..
    Now below..
    In the default values..
    WRITE
    viewname = give ur table name.
    show = X
    save and check it once...
    now u can able to call ur table through ur new t.code...
    rgds
    anver
    if hlped pls mark points

  • How to create new .dat file and its contents?

    Hi There
    Can anybody let me know the procedure of how to create new .ctl or .dat file to load data to tables.
    i working on 2day dba chapter 8. it shows me how to creat table and use .dat file to load data. but doesnot giv any clue how new .dat file and its contents can be created. please help.
    thanks in advance.

    Thanks for ur help
    I ve created txt file in notepad and saved it as dat file. tried to load that data thru Enterprise manager. used load data from User files everything went well and job was showing suceeded but dont know why that data is not showing in the table. i ve tried it now for three four times. used right table and pathe but dont know. has anybody got idea why that ll be?
    Thanks

  • How to Extract data from a flat file and how to upload it into table

    Hi
    i want to extract the data from a web page, that data i want to keep in text file.
    from the text file i want to read it and i want to upload into table
    can any one help me its very urgent

    here is my 20min try without debugging (needs a rs232 and loopback connector )
    use the probe and highlight the dataflow to see how it works.
    as always:  there are many ways to solve your problem
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'
    Attachments:
    read write file to RS232.vi ‏69 KB

  • How to:Create a blank document, and how to make a font available for editin

    Two questions:
    1: How do I create a new PDF document? All I see is to create from an existing document or scanner. If I'm creating something from scratch, do I really have to load an existing PDF, delete everything and then start my new document? That's the way it seems, which is nuts!
    2: I have tried to edit the text in a document. I did not not create it, but it is open to editing. The font used in the document is "Arial", a very common font that comes with windows. The font is installed and I use it all the time in other Adobe apps. However when I try to edit a ducument using that font, I get a message that "the font is unavailable for editing" and it substitutes some random font. So why is it not available, and how do I make it available?
    Thanks!
    I'm using Adobe Acrobat XI Pro v.11.0.10 with Adobe Creative Cloud 2014 and Windows 7, all shown as up to date.

    For the first item...
    Here is a sample from the Acrobat SDK - JavaScript section:
    trustedNewDoc = app.trustedFunction( function (nWidth, nHeight)
            app.beginPriv();
                switch( arguments.length ) {
                    case 2:
                        app.newDoc( nWidth, nHeight );
                        break;
                    case 1:
                        app.newDoc( nWidth );
                        break;
                    default:
                        app.newDoc();
            app.endPriv();
        app.addSubMenu({ cName: "New", cParent: "File", nPos: 0 })
        app.addMenuItem({ cName: "Letter", cParent: "New", cExec:
            "trustedNewDoc();"});
        app.addMenuItem({ cName: "A4", cParent: "New", cExec:
            "trustedNewDoc(420,595)"});
        app.addMenuItem({ cName: "Custom...", cParent: "New", cExec:
            "var nWidth = app.response({ cQuestion:'Enter Width in Points',\
                cTitle: 'Custom Page Size'});"
            +"if (nWidth == null) nWidth = 612;"   
            +"var nHeight = app.response({ cQuestion:'Enter Height in Points',\
                cTitle: 'Custom Page Size'});"
            +"if (nHeight == null) nHeight = 792;"
            +"trustedNewDoc(nWidth, nHeight) "});
    Copy it into a text file and give it a name with a "*.js" file extension.
    Place the JS file in the JavaScripts folder:   C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Javascripts\
    Relaunch Acrobat and you should have a new menu item named "New"

  • How to create cookies in webdynpro and How to read from cookies

    Hi all
    Please let us know how to create cookies and how to store and retrieve the data from cookies in webdynpro.
    we have the following requirement in each and every webdynpro form we have dropdownbox UI element , when ever a user logins into portal then he will select his state from the dropdownbox UI element then when even again the same user logs into portal and select the state field then the previously existing value which ever used in cookies that should be selected as dropdownbox.
    can you please send sample codes how to create and read the data from cookies in webdynpro?
    if you have any useful links or documents on this cookies in webdynpro then it would be great help to us.
    Thanks in advance.
    Regards
    Kalki reddy

    Hi,
    Have a look at the following thread:
    Re: How to use Cookies in Web DynPro?
    This may help you.
    Regards.
    Rajat

Maybe you are looking for

  • Error when trying drop table

    Why ? SQL> drop table SYSADM.TMP_FATOR cascade constraints; drop table SYSADM.TMP_FATOR cascade constraints ORA-00054: resource busy and acquire with NOWAIT specified

  • Windows home server 2011 Backup with PC Windows 8 Pro - Backup failed (Unsuccessful)

    On the PC under Windows 8 Pro, Event message: Backup job 1 on HCGSERVER did not succeed.  Reason: ClientVssProblem, System.String[]  Windows Operating System; Version: 6.1.8800.16385; ID: 514; On the Server, following message:An error prevented backu

  • Role permissions all screwed up in Catalog

    If a user is assigned a role that is granted Open access (Read + Traverse) to a subfolder somewhere below Shared Folders, and the administrator elects to grant Traverse access back to the root, the user will still not be able to see the subfolder in

  • Issue with java on production system help!

    We just started getting this error when we have a portlet showing over twenty listings and a user selects the next but to view more of the list. We just wen't live this morning what could be wrong? Help java.lang.ArrayIndexOutOfBoundsException at jav

  • Data visualization source code

    If I use: java -jar c:\Flex Builder 3\sdks\3.0.0\lib\DMV-source.jar      "C:\Documents and Settings\All Users\Application Data\Adobe\Flex\"      c:\temp\dataviz_source I get : Exception in thread "main" java.lang.NoClassDefFoundError: flex/license/Lo