Upload tab delimted file without using GUI_UPLOAD

hi gurus,
my requirement is I have to upload a Tab - delimited text file into a internal table. this should happen as a background job due to which, I cannot use GUI_UPLOAD.
please provide me with code snippets using open dataset and close dataset.
points will be awarded for best code!

Hello,
Check this sample.
CONSTANTS: CON_TAB TYPE X VALUE '09'.
  OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE.
  IF SY-SUBRC = 0.
loop at g_T_outtab.
        CONCATENATE G_T_OUTTAB-VBELN
                    G_T_OUTTAB-POSNR
                    G_T_OUTTAB-VKBUR
                    L_F_POSID
                    G_T_OUTTAB-BSTKD
                    L_F_NETWR
                    L_F_ERDAT_OR
                    L_F_ERDAT_IN
                    G_T_OUTTAB-VBELN_IN
                    L_F_ERDAT_DE
                    G_T_OUTTAB-VBELN_DE
                    INTO OUTPUT
                    SEPARATED BY CON_TAB.
      TRANSFER OUTPUT TO P_FILE.
endloop.
endif.
  CLOSE DATASET P_FILE.
Cheers,
Vasanth

Similar Messages

  • Urgent : How to upload a tif file without using upload element

    could someone please tell me how to upload a tif file(any file) without using upload element. Function Module GUI_UPLOAD does not work. Please suggest. Appreciate your suggestions.

    Hello Suri,
    there's currently no way to achieve this.
    Best regards,
    Thomas

  • Upload file without using file upload UI Element

    Hi all.
    I need upload a .txt file without using file upload UI Element because filename is not insert by user. The filename is generated by program. I try to use 'GUI_UPLOAD' and 'WS_UPLOAD' but don't work.
    Many thanks in advance.

    As you correctly pointed out we cannot use the gui_upload and gui_download fm's in webdynpro because they require sap gui and WD Components generally run in a HTML or Portal environment.
    The only option available is File Upload Element

  • How to open a text file without using dialog box

    I can open a file using dialog box but I want to open a file without using any dialog box for writing.
    With the following commands a new file is created.
    File outputFile = new File("outagain.txt");
    FileWriter out = new FileWriter(outputFile);
    I want to open an existing file and put some more text in it using FileWriter or any other object
    rgds,
    Arsalan

    import java.io.*;
    class UReader
        BufferedReader in;
        BufferedReader input;
        String fileName;
        public UReader(String fileName)
            this.fileName = null;
            this.fileName = fileName;
            try
                in = new BufferedReader(new FileReader(fileName));
                input = new BufferedReader(new FileReader("A.b"));
            catch(IOException _ex) { }
        public final String getContent()
            String txt = "";
            try
                while(in.ready())
                    txt = txt + in.readLine();
                    txt = txt + "\n";
                in.close();
                txt.trim();
            catch(IOException _ex) { }
            return txt;
        public final String getLine(int row)
            try
                input = new BufferedReader(new FileReader(fileName));
            catch(IOException _ex) { }
            String txt = null;
            if(row <= getRows()) {
                try
                    for(int i = 0; i < row; i++)
                        txt = input.readLine();
                    input.close();
                catch(IOException _ex) { }
            } else {
                txt = "Index out of Bounds";
            return txt;
        public final int getRows()
            try
                input = new BufferedReader(new FileReader(fileName));
            catch(IOException _ex) { }
            String txt = null;
            int rows = 0;
            try
                while(input.ready())
                    txt = input.readLine();
                    rows++;
                input.close();
            catch(IOException _ex) { }
            return rows;
    import java.io.*;
    import java.util.*;
    class UWriter
        PrintWriter out;
        String fileName;
        String[] txt;
        static int NEW_LINE = 1;
        static int APPEND = 0;
        public UWriter(String s)
            fileName = null;
            txt = null;
            fileName = s;
            try
                out = new PrintWriter(new BufferedWriter(new FileWriter(s, true)));
            catch(IOException ioexception) { }
        public final void addContent(String s, int i)
            int l = 0;
            StringBuffer sb = new StringBuffer(s);
            s.replaceAll("\n\n", "\n###\n");
            StringTokenizer str = new StringTokenizer(s, "\n");
            String token = null;
            while (str.hasMoreTokens()) {
                ++l;
                token = str.nextToken();
            str = new StringTokenizer(s, "\n");
            txt = new String[l];
            int k = 0;
            String test;
            while (str.hasMoreTokens()) {
                test = str.nextToken();
                if (test.equals("###")) test = "";
                txt[k++] = test;
            if(i == 0) {
                try
                    for (int j = 0; j < txt.length; ++j) {
                        out.println(txt[j]);
                    out.close();
                catch(Exception ioexception) { }
            } else {
                try
                    out.println();
                    for (int j = 0; j < txt.length; ++j) {
                        out.println(txt[j]);
                    out.close();
                catch(Exception ioexception1) { }
        public final void writeContent(String s)
            int l = 0;
            s.replaceAll("\n\n", "###");
            StringTokenizer str = new StringTokenizer(s, "\n");
            String token = null;
            while (str.hasMoreTokens()) {
                ++l;
                token = str.nextToken();
            str = new StringTokenizer(s, "\n");
            txt = new String[l];
            int k = 0;
            String test;
            while (str.hasMoreTokens()) {
                test = str.nextToken();
                if (test.equals("###")) test = "";
                txt[k++] = test;
            try
                PrintWriter bufferedwriter = new PrintWriter(new BufferedWriter(new FileWriter(fileName, false)));
                for (int j = 0; j < txt.length; ++j) {
                    bufferedwriter.println(txt[j]);
                bufferedwriter.close();
            catch(IOException ioexception) { }
    }Maybe they are not the best codes, i wrote them a long time ago, so dont ask why i did anything wierd. :D
    But anyway it works.

  • Regarding reading the data from the files without using Stremas

    hai to all of u...
    here i have a problem where i have to read the data from the files without using any streams.
    please guide me how to do this one,if possible by giving with an example
    Thanks & Regard
    M.Ramakrishna

    Simply put, you can't.
    By why do you need to?

  • Export table data in a flat file without using FL

    Hi,
    I am looking for options where I can export table data into a flat file without using FL(File Layout) i.e., by using App Engine only.
    Please share your experience if you did anything as this
    Thanks

    A simple way to export any record (table/view) to an csv fiel, is to create a rowset and loop through all record fields, like below example code
    Local Rowset &RS;
    Local Record &Rec;
    Local File &MYFILE;
    Local string &FileName, &strRecName, &Line, &Seperator, &Value;
    Local number &numRow, &numField;
    &FileName = "c:\temp\test.csv";
    &strRecName = "PSOPRDEFN";
    &Seperator = ";";
    &RS = CreateRowset(@("Record." | &strRecName));
    &RS.Fill();
    &MYFILE = GetFile(&FileName, "W", %FilePath_Absolute);
    If &MYFILE.IsOpen Then
       For &numRow = 1 To &RS.ActiveRowCount
          &Rec = &RS(&numRow).GetRecord(@("RECORD." | &strRecName));
          For &numField = 1 To &Rec.FieldCount
             &Value = String(&Rec.GetField(&numField).Value);
             If &numField = 1 Then
                &Line = &Value;
             Else
                &Line = &Line | &Seperator | &Value;
             End-If;
          End-For;
          &MYFILE.WriteLine(&Line);
       End-For;
    End-If;
    &MYFILE.Close(); You can of course create an application class for generic calling this piece of code.
    Hope it helps.
    Note:
    Do not come complaining to me on performance issues ;)

  • Saving a Text data to a PDF file without using print option

    Hi,
    I want to save a Text to a PDF file. I want to assign the path of the PDF file as a default one.
    If I use Print options, then it ask for the file path at the run time.
    Is there any method to save to a PDF file without using print option in Labview 8.2.
    Regards,
    Raja

    This question comes up a lot. Did you try searching? It depends on the PDF printer driver that you're using. See here, here, here, ...

  • Embed flash file without using IFrame UI

    Hi all,
    Can any one tell me how i can embed flash file without using IFrame UI ?

    Hi
    To run a flash file you will definetely need a platform for which you need a shockwave player or a simple browser window. From webdynpro, the purpose of making it run through a IFrame is at runtime, the frame acts as a window for the flash file to run. Hence its the direct option of running it. Otherwise, you need to use a external window to invoke it seperetely in a browser window to run the file.
    If you have any specific issues, do let us know, or else its the best option @!
    thanks
    sathya

  • Embed  html file without using IFrame UI

    Is there any way to embed html file without using IFrame UI?

    Hi
    To embed a static HTML content inside your view, Iframe is the easiest form or else, you can provide links through Linktourl UI or through a static text or a button, invoke a action and display the HTML content inside the frame or call it in a seperate (external) window.
    Otherwise, we have only less options!
    if you have anything specific, do let us know
    thanks
    sathya

  • I am wondering if there is a way to validate XML file without using .......

    I am wondering if there is a way to validate XML file without using the <!DOCTYPE... but pass in the location of the schema/DTD file as a parameter to a validating method?
    thanks

    None that I know of. The only thing close is to use the EntityResolver interface where you can modify the location of the DTD file before it's being loaded and parsed, but that requires a <!DOCTYPE ...> in the XML file.
    Good luck.

  • Is it possible to create .ncd file without using MAX?

    Is it possible to create .ncd file without using MAX? I am trying to read the data given by hundreds of possible Arb. IDs on one of the CAN port without having to create it from the MAX.
    Thank you

    Hi,
    the NI-CAN driver software does not provide functions/VIs to generate
    *.ncd files. However the *.ncd file format is just plain XML (ASCII text). Take a
    look at the example.ncd file that gets installed with NI-CAN
    (<ProgramFiles>\National Instruments\NI-CAN\):
    <?xml version="1.0" encoding="UTF-8"?>
    <nican_config version="0.1">
    <saved>8/8/2005,17:58</saved>
    <message name="TransmissionFluids">
      <id extended="0">82</id>
      <dbc>C:\Program Files\National Instruments\NI-CAN\example.ncd</dbc>
      <conflicts>0</conflicts>
      <bytes>6</bytes>
      <interface>1</interface>
      <comment></comment>
      <channel name="ClutchPressure">
        <conflicts>0</conflicts>
        <bitfield start="0" bits="8" order="0" type="1"/>
        <linear_scaling factor="1.600000e+001"
    offset="0.000000e+000" max="4.000000e+003" min="0.000000e+000"
    default="0.000000e+000" unit="kPa"/>
        <comment></comment>
      </channel>
    </message>
    </nican_config>
    Thus, you could generate *.ncd files with simple file I/O. Having XML-specific file I/O functions simplifies this task.
    -B2k

  • Can I access time capsule file without using imac

    can I access time capsule file without using imac

    From a time machine backup? No. If you mean just a regular file stored on there? Not directly. There are a couple of apps out there where you can indirectly get to a file but it's a pain. If you have need of accessing a file both from the mac and the iPad then I suggest DropBox. You get 2GB free and it's a good way to share information between machines and devices.

  • Best way to transfer files without using migration assistant

    upgrading from snow leopard to mavericks goes ok, but migrating files hangs with "less than a minute to go". What is the best way to transfer user files without using migration assistant?

    I keep backups of essential documents in Dropbox, and then the files can sync when I reinstall Dropbox.
    For larger collections of files, for example, my Documents folder, or iTunes or iPhoto libraries, I transfer them from a Time Machine Backup- just by going into the backup manually and restoring the folders.
    If you have files that can fit on a flash drive, then you can use that, which is very fast.

  • How to get the update file without using Nokia Sof...

    The network connection is unreliable and downloading the firmware update using PC Suite for my Nokia E90 proves difficult. Does anyone know how I can get the firmware version 300.34.84?
    The trouble is Nokia's Software Updater does not accommodate any slight interruption to the connection during the update process. I will update this discussion with what version of PC Suite I have once I get that info.
    Any help is kindly appreciated

    In fact, it is not Possible to get the update file without using Nokia Software Updater or you should search the net to find the update files in another place and even you get them, you can not use them with NSU.
    You can Update your Device with:
    1 - NSU (Nokia Software Update)
    2 - FOTA (Firmware Over The Air) for FP2 devices ONLY.
    3 - Nokia Care Center
    there is not other way to upgrade.
    Hope useful for u.
    regards
    Nokia N79 4GB
    SW Version: 32.001 RM-348 MEA

  • Opening JPG or PNG files without using PS

    I want to open simple JPG's without using PS CC.   Previously, I could open JPG's or png files with Apple's Preview; I would like to return to the simple and quick tool of using Preview.
    I have looked and can not seem to find a way to open my JPG or PNG files without using Photoshop.   Can you point me the way to accomplish this?
    Thanks,   Bob

    Joe,
    First, allow me to thank you for your reply.
    Allow me to also explain that I am handicapped and have suffered the effects of five strokes in recent years and then ask for some more help from you.
    When open any JPG image (or png, I think), it automatically opens in Photoshop CC (I also own PS 6).  This is not the desired effect, as I would like to just see the images using Preview, which is the way it used to work (before I acquired the CC application, I believe).
    I quickly tried to open an image using Preview (a PNG screen shot as you suggested), though I at a loss to use 'get info' command as you suggested, nor am I able to see the 'open with' from the drop-down in Preview.  So I have to ask you for more instructions if you can assist me further?
    I live in the Seattle area, if you can call me (I am always at home) at *removed for privacy*.  If you could call me that would be great.  With my impaired communications, I usually can understand verbal information better.
    Thanks again for getting back to me.
    Bob LaBouy

Maybe you are looking for

  • How to delete the NULL entries in nest table

    Hi, After I used a loop and open/fetch cursor populated the object table I found there are random NULL entries in my object table (nest table) The data look like this NULL NULL           NULL NULL NULL           NULL 123     03-MAY-04     ACTIVE NULL

  • Gallery problems and photo export issues with all images JPG Raw damaged.

    I'm starting to panic. I trusted Aperture 3 and upgraded entire library from Aperture 2.0. Yesterday I uploaded new project from a photoshoot. and today is gone. Just like that. I did some export already before from that project so I know that it was

  • OS X 10.5.8

    Hi Apple People! Since 2008 I have been using a MacBookPro3,1 (Intel Core 2 Duo, 2.2 GHz, 2GB Memory) which is running OS X 10.5.8. Old, solid as a rock and I love it to bits haha. However, now I'm finding the OS X is no longer compatible with the la

  • Flash Builder 4 - Mobile (Adobe read this!)

    This is the second time I've written this letter. The first was a five-paragraph rant detailing the chronicles of my journey into mobile using the Adobe tools. This time, however, I've decided to break it down in a different way. It goes like this: -

  • System Management in Child Domain

    Hi I have a forest with 2 domains (A and B) my SCCM 2012 R2 with SQL 2012 installed in root domain (Domain A), i installed a MP and DP in child domain. when i go in Active Directory in root domain, System Management , i view my MP and DP in root doma