How to read and writre file into remote machine in the network

HI Experts,
   i want to write the data and read data into file in remote machine(not in application server and presentation server).is it possible in abap.
thanks in advance
With Regads
Naidu

Hi naidu,
1. We can use this type of path
computername
folder
file.ext
2. We can use this in GUI_UPLOAD
   and it will run on presentation server,
   connect to
computer
   and read the file contents.
regards,
amit m.

Similar Messages

  • How to read and XSD file in java prospective in NWDS

    Hi !!
    anybody can help me that
    how to read and XSD file in java prospective in Netweaver developer Studio
    Regards
    Abhishek Agrahari

    I guess you can make it more clear...

  • How to upload a Flat file into sap database if the file is in Appl'n Server

    Hello Sap Experts , Can you tel me
    " How to upload a Flat file into sap database if the file is in Application Server.
    what is Path for that ?
    Plz Tel Me its Urgent
    Thanks for all

    Hi,
    ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
    *& Report  ZUPLOADTAB                                                  *
    *& Example of Uploading tab delimited file                             *
    REPORT  zuploadtab                    .
    PARAMETERS: p_infile  LIKE rlgrap-filename
                            OBLIGATORY DEFAULT  '/usr/sap/'..
    DATA: ld_file LIKE rlgrap-filename.
    *Internal tabe to store upload data
    TYPES: BEGIN OF t_record,
        name1 like pa0002-VORNA,
        name2 like pa0002-name2,
        age   type i,
        END OF t_record.
    DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
          wa_record TYPE t_record.
    *Text version of data table
    TYPES: begin of t_uploadtxt,
      name1(10) type c,
      name2(15) type c,
      age(5)  type c,
    end of t_uploadtxt.
    DATA: wa_uploadtxt TYPE t_uploadtxt.
    *String value to data in initially.
    DATA: wa_string(255) type c.
    constants: con_tab TYPE x VALUE '09'.
    *If you have Unicode check active in program attributes then you will
    *need to declare constants as follows:
    *class cl_abap_char_utilities definition load.
    *constants:
    *    con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
    *START-OF-SELECTION
    START-OF-SELECTION.
    ld_file = p_infile.
    OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    ELSE.
      DO.
        CLEAR: wa_string, wa_uploadtxt.
        READ DATASET ld_file INTO wa_string.
        IF sy-subrc NE 0.
          EXIT.
        ELSE.
          SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
                                          wa_uploadtxt-name2
                                          wa_uploadtxt-age.
          MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
          APPEND wa_upload TO it_record.
        ENDIF.
      ENDDO.
      CLOSE DATASET ld_file.
    ENDIF.
    *END-OF-SELECTION
    END-OF-SELECTION.
    *!! Text data is now contained within the internal table IT_RECORD
    * Display report data for illustration purposes
      loop at it_record into wa_record.
        write:/     sy-vline,
               (10) wa_record-name1, sy-vline,
               (10) wa_record-name2, sy-vline,
               (10) wa_record-age, sy-vline.
      endloop.

  • How to drag and drop files in Time Machine Capsule?

    Hi, all
    I have recently bought a Time Machine 2 TB. I have backed up my MacBook Air over the Time Machine. I was trying to copy or drag and drop files in the time capsule, but it wont allow me. It Neither does allow me to create any new folders in the Airport Time Machine. If i try to drag and drop files in it, it says, click to Authenticate, however, there is no place or tab to authenticate. I am the administrator.
    Please advise.
    Thanks

    It sounds like you are trying to copy / paste files to the Time Capsule Finder icon, when you should be copying / pasting to the drive on the Time Capsule, which is named "Data" unless you have changed it.
    Open any Finder window and look for the Time Capsule icon under the Shared heading on the left side of the window
    Click on the Time Capsule, which will display a folder to the right named Data, unless you have changed the name of the drive
    Double-cllick on Data to mount the drive on the desktop
    You can drag / drop or copy / paste files onto the drive icon, or open the drive and drag files into the open window.
    The first time that you do this, you may be asked for the Time Capsule device or disk password.

  • How can I import eex files into Applications EUL from the unix command line

    How can I import *.eex and *.dis files into an Applications EUL from the unix command line?
    Thanks

    Hi
    The simple answer is you either have to use the client tool DIS51ADM to import files using the command line (Discoverer Admin is a windows only client tool), or the Java command line which needs a browser.
    In theory if you have a browser running on your Unix box you may be able to use the Java command line to make this work.
    Best wishes
    Michael

  • How to read/write .CSV file into CLOB column in a table of Oracle 10g

    I have a requirement which is nothing but a table has two column
    create table emp_data (empid number, report clob)
    Here REPORT column is CLOB data type which used to load the data from the .csv file.
    The requirement here is
    1) How to load data from .CSV file into CLOB column along with empid using DBMS_lob utility
    2) How to read report columns which should return all the columns present in the .CSV file (dynamically because every csv file may have different number of columns) along with the primariy key empid).
    eg: empid report_field1 report_field2
    1 x y
    Any help would be appreciated.

    If I understand you right, you want each row in your table to contain an emp_id and the complete text of a multi-record .csv file.
    It's not clear how you relate emp_id to the appropriate file to be read. Is the emp_id stored in the csv file?
    To read the file, you can use functions from [UTL_FILE|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#BABGGEDF] (as long as the file is in a directory accessible to the Oracle server):
    declare
        lt_report_clob CLOB;
        l_max_line_length integer := 1024;   -- set as high as the longest line in your file
        l_infile UTL_FILE.file_type;
        l_buffer varchar2(1024);
        l_emp_id report_table.emp_id%type := 123; -- not clear where emp_id comes from
        l_filename varchar2(200) := 'my_file_name.csv';   -- get this from somewhere
    begin
       -- open the file; we assume an Oracle directory has already been created
        l_infile := utl_file.fopen('CSV_DIRECTORY', l_filename, 'r', l_max_line_length);
        -- initialise the empty clob
        dbms_lob.createtemporary(lt_report_clob, TRUE, DBMS_LOB.session);
        loop
          begin
             utl_file.get_line(l_infile, l_buffer);
             dbms_lob.append(lt_report_clob, l_buffer);
          exception
             when no_data_found then
                 exit;
          end;
        end loop;
        insert into report_table (emp_id, report)
        values (l_emp_id, lt_report_clob);
        -- free the temporary lob
        dbms_lob.freetemporary(lt_report_clob);
       -- close the file
       UTL_FILE.fclose(l_infile);
    end;This simple line-by-line approach is easy to understand, and gives you an opportunity (if you want) to take each line in the file and transform it (for example, you could transform it into a nested table, or into XML). However it can be rather slow if there are many records in the csv file - the lob_append operation is not particularly efficient. I was able to improve the efficiency by caching the lines in a VARCHAR2 up to a maximum cache size, and only then appending to the LOB - see [three posts on my blog|http://preferisco.blogspot.com/search/label/lob].
    There is at least one other possibility:
    - you could use [DBMS_LOB.loadclobfromfile|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i998978]. I've not tried this before myself, but I think the procedure is described [here in the 9i docs|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl12bfl.htm#879711]. This is likely to be faster than UTL_FILE (because it is all happening in the underlying DBMS_LOB package, possibly in a native way).
    That's all for now. I haven't yet answered your question on how to report data back out of the CLOB. I would like to know how you associate employees with files; what happens if there is > 1 file per employee, etc.
    HTH
    Regards Nigel
    Edited by: nthomas on Mar 2, 2009 11:22 AM - don't forget to fclose the file...

  • How to read and image file in a BLOB database filed

    I’m using Oracle Reprots 10g
    I have a database filed of type BLOB ( that can be BMP, GIF, JPG, PDF ..etc .. it can be any format/extension)
    From Oracle Reports how I can display this image file

    Hello,
    Extract of the Reports Builder Help :
    Selecting an image from the database
    Note: These steps, and the steps to link an image object to a file (for paper-based reports only), allow you to include images in a wide variety of formats supported by Oracle Reports, including JPEG (all types, such as Progressive JPEG and Exif JPEG), PNG, BMP, TIFF, GIF, and CGM.
    For paper-based reports, you can also use InsertImage to import an image from a file into the report layout for images in the following formats: TIFF, JFIF, BMP, TGA, PCX, PICT, GIF, CALS, RAS, OIF, PCD.
    To select an image from the database:
    Create a query that selects a column containing images or the filenames of image objects.
    In the Data Model view, double-click the image column to display the Property Inspector.
    If the column contains the filenames of image objects, rather than the images themselves:
    Under the Column node, set the Read from File property to Yes.
    In both cases (a column containing images or a column containing the filenames of image objects): under the Column node, set the File Format property to Image.
    Regards

  • How to read an excel file into the datatable in sdk code( AddonApplication)

    Hi Experts,
    Please let me know the code ,how to write an excel file to the datatable and based on the datatable it should write to the database table.
    help would be appreciated...
    Regards,
    Vijay Kumar
    Edited by: Haroon Rasheed on Oct 29, 2011 10:40 PM

    Hi,
    You may check: Read Excel File by Sheet then put it in Matrix
    Thanks,
    Gordon

  • How to read and write files using flex?

    Using flex, we would like to make some utility that will do a
    lot of reading and writing from local files.
    The writing is what I am more worried about. How is this
    possible?
    I want to make .zip files containing many xml files, and some
    assorted media files such as .swf jpeg, html, etc.
    I am new to flex btw, I've never used it properly before, and
    this is the main concern I have with flex, which is that it doesn't
    let me write and read lots of files.
    Mainly we are looking for a good cross platform solution that
    will let us develop an app, and flex looks professional and it is
    cross platform. The "internet app" side of things, isn't so much
    what we need really.
    Would wxWidgets be better suited to our needs?

    The Flash player sand box will not allow reading and writing
    local files. If you want to use Flex to create a desktop you will
    need the Apollo runtime. The alpha is available at Adobe
    Labs.

  • How to read\write text file into oracle database.

    Hello,
    I am having text file called getInfo in c:\temp folder. I would like to populate data from text file to data base. How to proceed. Could anybody help me out.
    Thanks,
    Shailu

    Here is a web page with easy to follow instructions regarding external files: http://www.adp-gmbh.ch/ora/misc/ext_table.html.
    Now I understand what all the excitement is over external tables.
    "External tables can read flat files (that follow some rules) as though they were ordinary (although read-only) Oracle tables. Therefore, it is convenient to use external tables to load flat files into the DB." -from the above link.

  • How to read a text file into a String?

    and also write a text file from a String. I searched the forum and found this folowing code:
    // Read and append... by Example
    try{
    String fileName = "text.txt"; // Filename
    // Make the inputfile object
    FileInputStream fi = new FileInputStream(fileName);
    byte inData[] = new byte[fi.available()];
    fi.read(inData); // Read
    fi.close(); // Close
    String text = new String(inData); // Make a textstring...
    // Now, do whatever you want with the data... and append...
    String textToAppend = "kjkjhjhKJ";
    byte outData[] = textToAppend.getBytes();
    // Make the outputfile (whith the 'append' boolean set to true
    FileOutputStream fo = new FileOutputStream(fileName,true);
    fo.write(outData);
    fo.close();
    }catch(Exception oops){}but it returns funny characters to the String from the text file and vice versa in writting the text file. Can anybody please help? Thank you.
    kindo

    See here for info on encodings:
    http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html
    Some common US encodings and common uses:
    ASCII (DOS)
    Cp1252 (Windows 9x)
    UTF8 (XML)
    import java.io.*;
    public class TextFile extends File
    private static String DEFAULT_ENCODING = "ASCII";
    private File file;
    private String encoding;
    public TextFile(File file, String encoding)
         super(file.getPath());
         this.file = file;
         this.encoding = encoding;
    public TextFile(File file)
         this(file, DEFAULT_ENCODING);
    public String load() throws Exception
         FileInputStream fis = new FileInputStream(file);
         byte[] barr = new byte[fis.available()];
         fis.read(barr);
         fis.close();
         return new String(barr, encoding);
    public void save(String str) throws Exception
         FileOutputStream fos = new FileOutputStream(file);
         fos.write(str.getBytes(encoding));
         fos.close();
    }

  • Read and Write file in Remote system Drive

    Hi all,
    I am try to create the file in Remote system,
    in example i find the method to create file in remote system , ie //computer_name/Share_name/fileName
    the above sample , i know the computer name but i dont know Share name of the computer ,
    Its any possible to find the share name in java ?
    please give some idea to solve my problem ?
    With Regards,
    Ganesh Kumar.L

    tlgkumar wrote:
    in example i find the method to create file in remote system , ie //computer_name/Share_name/fileName
    the above sample , i know the computer name but i dont know Share name of the computer ,
    Its any possible to find the share name in java ?Sure. Ask the person who is writing the requirements which share you should use. Don't settle for incomplete requirements.

  • How to read a flat file into a report?

    The file format is like below:
    Company Code : BUKRS(header)
    Posting Period :3(header)
    Then The items data is started as a table format.
    Line items in table format.
    If anybody knows the answer please share with me.

    Use the GUI_UPLOAD Program to upload the file from Presentation server to SAP.
    Sample code:
    *& Report  Z_UPLOAD_MUNCPCODE                                          *
    REPORT  z_upload_muncpcode.
    PARAMETERS : p_fname   LIKE rlgrap-filename.
    TYPES: BEGIN OF ty_munc,
            land1     TYPE tzone-land1,
            zone1     TYPE tzone-zone1,
            vtext TYPE tzont-vtext,
           END OF ty_munc.
    DATA: i_munc   TYPE STANDARD TABLE OF ty_munc,
          i_tzone  TYPE STANDARD TABLE OF tzone,
          i_tzont  TYPE STANDARD TABLE OF tzont,
          wa_munc  TYPE ty_munc,
          wa_tzone TYPE tzone,
          wa_tzont TYPE tzont.
    CONSTANTS: c_path     TYPE char20 VALUE 'C:\',
               c_mask     TYPE char9  VALUE ',*.*,*.*.',
               c_mode     TYPE char1  VALUE 'O',
               c_filetype TYPE char10 VALUE 'ASC',
               c_x        TYPE char01 VALUE 'X'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_fname.
    *-- Browse Presentation Server
      PERFORM f4_presentation_file.
    START-OF-SELECTION..
    *-- Read presentation server file
      PERFORM f1003_pre_file.
      LOOP AT i_munc INTO wa_munc.
        wa_tzone-mandt = wa_tzont-mandt = sy-mandt.
        wa_tzone-land1 = wa_tzont-land1 = wa_munc-land1.
        wa_tzone-zone1 = wa_tzont-zone1 = wa_munc-zone1.
        wa_tzont-spras = sy-langu.
        wa_tzont-vtext = wa_munc-vtext.
        APPEND wa_tzont TO i_tzont.
        APPEND wa_tzone TO i_tzone.
        CLEAR: wa_munc, wa_tzont, wa_tzone.
      ENDLOOP.
    END-OF-SELECTION.
    Modify Table TZONT
      PERFORM enqueue_table USING text-001.
      MODIFY tzont FROM TABLE i_tzont.
      PERFORM dequeue_table USING text-001.
    Modify Table TZONE
      PERFORM enqueue_table USING text-002.
      MODIFY tzone FROM TABLE i_tzone.
      PERFORM dequeue_table USING text-002.
      WRITE: 'Tables TZONE & TZONT are updated'.
    *&                  Form  f4_presentation_file
    *&                F4 Help for presentation server
    FORM f4_presentation_file .
      CALL FUNCTION 'WS_FILENAME_GET'
        EXPORTING
          def_path         = c_path
          mask             = c_mask
          mode             = c_mode
          title            = text-001
        IMPORTING
          filename         = p_fname
        EXCEPTIONS
          inv_winsys       = 1
          no_batch         = 2
          selection_cancel = 3
          selection_error  = 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.                    " f4_presentation_file
    *&                      Form  f1003_pre_file
    *&                         Upload File
    FORM f1003_pre_file .
      DATA: lcl_filename TYPE string.
      lcl_filename = p_fname.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                = lcl_filename
          filetype                = c_filetype
          has_field_separator     = c_x
        TABLES
          data_tab                = i_munc
        EXCEPTIONS
          file_open_error         = 1
          file_read_error         = 2
          no_batch                = 3
          gui_refuse_filetransfer = 4
          invalid_type            = 5
          no_authority            = 6
          unknown_error           = 7
          bad_data_format         = 8
          header_not_allowed      = 9
          separator_not_allowed   = 10
          header_too_long         = 11
          unknown_dp_error        = 12
          access_denied           = 13
          dp_out_of_memory        = 14
          disk_full               = 15
          dp_timeout              = 16
          OTHERS                  = 17.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
    ENDFORM.                    " f1003_pre_file
    *&                         Form  enqueue_table
    *&                           Enqueue Table
    FORM enqueue_table USING p_tabname.
      CALL FUNCTION 'ENQUEUE_E_TABLE'
        EXPORTING
          tabname        = p_tabname
        EXCEPTIONS
          foreign_lock   = 1
          system_failure = 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.
    ENDFORM.                    " enqueue_table
    *&                        Form  dequeue_table
    *&                           Dequeue Table
    FORM dequeue_table USING p_tabname.
      CALL FUNCTION 'DEQUEUE_E_TABLE'
        EXPORTING
          tabname = p_tabname.
    ENDFORM.                    " dequeue_table
    Prakash.

  • How to read a gif file into the java file?

    i want to read an image(*.gif) file into my appication. can u plz help me in this?

    Hi
    I have made a program that display images here is the code i hope it helps
    package ImageProcessing;
    import java.awt.Image;
    import java.awt.image.ImageObserver;
    import java.awt.image.RenderedImage;
    import java.io.File;
    import java.io.IOException;
    import javax.imageio.ImageIO;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class ImageProcessing
         public static Image imRead(String imagePath)
              Image im = null;
              try
                   File imageFile = new File(imagePath);
                   im = ImageIO.read(imageFile);
              catch(Exception e)
                   e.printStackTrace();
              return im;
         public void imWrite(Image im,String fileFormat,String imagePath) throws IOException
              File outputFile = new File(imagePath);
              ImageIO.write((RenderedImage) im, fileFormat, outputFile);
         public static void imShow(String imagePath)
              ImageObserver io = null;          
              JFrame frame = new JFrame();
              Image im = imRead(imagePath);
              ShowImage imShow = new ShowImage(im);
              frame.add(imShow);          
              frame.setVisible(true);
              frame.setTitle(imagePath);
              frame.setSize(im.getWidth(io),im.getHeight(io));
              frame.setResizable(false);
              frame.show();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         public static void main(String[] args) throws IOException
              imShow("D:\\My Computer\\Images\\Cash2.gif");          
    package ImageProcessing;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.Panel;
    public class ShowImage extends Panel
           Image im;
           public ShowImage(Image inputIm)
             im = inputIm;
           public void paint(Graphics g)
             g.drawImage(im, 0, 0, null);
    }

  • How to Run an applicatio​n on multiple machines on the network

    Hello,
    I am making an application seeking information from the serial number and signed licenseregistered in the labview.
    But wanted to make this application to seek information on computers that are on the network without having to install the same application on each machine.
    Can anyone help me? I'm not getting.
    Thank you.

    Could you be more descriptive about the scope of the application?
    Have you tried/considered setting up the application as a "Remote Panel" on a machine, and then have the other machines that need access to the application connect via their web browser?

Maybe you are looking for

  • How do I put a DVD in and transfer it as one file to my external?

    How do I put a DVD in and transfer it as one file to my external?

  • New nokia lumia 520

    my new nokia lumia 520 hangs.  its been only 20 days i brought my new lumia 520. Case : I just completed call. the screen got blacked out. we can still get incoming calls. we have the option to switch off. when it asks to slide down. it never happens

  • Excess tax occuring in miro

    Hi expert I am doing a miro when simulating i am getting excess taxes, my tax are like  BED 821%, VAT 12.5% + Add Vat 2.5% - Non set off........my po taxes amount is 1000 when i m doing miro its calculating 1200. some can explain me y its taking exce

  • Send Ex factory date from R3 to APO and populate in PO in APO as start date

    Hi , Need your expertise in one scenario. SAP IS retail is combined with SAP APO. 1) Purchase Order is ciffed to APO. 2) Based on delivery date in PO in R3....APO calcualated date for distribution demand at source location by taking lead time from tl

  • How to show the content for a perticular time period(consider 30 days)

    Hi, There is a requirement that content should reside the portal only for 30 days and then it should be archived. Archiving means that it should be searchable from portal but it should not be visible on the portal. How would that happen?. Kindly tell