Skip to Content
author's profile photo Former Member
Former Member

Dataset

Hi,

could anyone explain wats meant by

open dataset p_file for input in text mode

read dataset p_file for input in text mode.

thanks,

Ponraj.s.

ponraj_rec@yahoo.com

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Jun 19, 2006 at 02:17 PM

    open dataset p_file for input in text mode

    <b>To open a file on the application server for reading.</b>

    read dataset p_file for input in text mode.

    <b>To read the opened file .</b>

    Regards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2006 at 02:17 PM

    hi Ponraj,

    1. the first statement open dataset is for <b>opening the file</b> from the application server.

    2. the second statement is for <b>reading the file</b>( existing ) from the application server.

    Hope i have answered your question

    Have a look at this program for further queries

    http://www.sapdevelopment.co.uk/file/file_uploadsap.htm

    Regards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 19, 2006 at 02:19 PM

    The DATASET statements are the statement that you use to read a file from the application server. You open the file using the OPEN dataset statement, you then read it using the READ dataset statement.

    
    report zrich_0001.
    
    Parameters: d1 type localfile default '/usr/sap/TST/SYS/Data1.txt'.
            
    
    data: itab type table of string.
    data: wa type string.
    
    
    start-of-selection.
    
      open dataset d1 for input in text mode.
      if sy-subrc = 0.
        do.
          read dataset d1 into wa.
          if sy-subrc <> 0.
            exit.
          endif.
          append wa to itab.
        enddo.
      endif.
      close dataset d1.
    
    
    

    http://help.sap.com/saphelp_webas620/helpdata/en/fc/eb3d42358411d1829f0000e829fbfe/frameset.htm

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 19, 2006 at 02:20 PM

    Hi,

    1. Opens the specified file.

    OPEN ... FOR INPUT opens the file in read mode.

    2. Imports a record from a sequential file whose index and name are specified in dsn into the data object

    Rgds,

    Prakash

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 19, 2006 at 02:37 PM

    Hi Ponraj,

    Please check your email.

    Regards,

    Ferry Lianto

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.