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

Open dataset problem

Dear all,

I tried to trasfer the contents to the path specified,but here sy-subrc = 8,ie.file could not be opened,but this works in testing and quality,but in production it produces this error,

my code is:

clear : dsn.

concatenate path 'ixxx.txt' into dsn.

open dataset dsn for output in text mode encoding non-unicode ignoring

conversion errors.

if sy-subrc = 0.

loop at itab.

transfer itab to dsn.

endloop.

endif.

close dataset dsn.

Can anyone provide a solution.

Thanks and regards,

Latha prabhu.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 04:39 AM

    Hi,

    Check whether directory path mentioned in your code is maintained in production system, you can view the directorieds from AL11 transation, you can also go to FILE transaction and check the physical path/logical path maintained in the system.

    Hope this helps,

    Rgds,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 04:36 AM

    check with basis if u have the permission to write a file on the production server....that could be the only reason if u have tested successfully in quality

    rgds,

    PJ

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 28, 2005 at 04:39 AM
    • Download internal table to Application server file(Unix)

    DATA: e_file like rlgrap-filename value '/usr/sap/tmp/file.txt'.      
    
      open dataset e_file for output in text mode.
      lOOP AT it_datatab......
        transfer it_datatab to e_file.
      ENDLOOP.
     
      close dataset e_file.

    Check this link

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 04:55 AM

    Hi,

    With continuation to my above explanation please check the function module <b>AUTHORITY_CHECK_DATASET</b>.

    Also the filename you give depends on the OS.To make the programs portable to different OS use the Function module FILE_GET_NAME.

    It checks file authorization.You can find its

    explanation from the FM's documentation.

    Please reward points if you find this explanation useful.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Dear All,

      Thank u very much for these quick and responses which solved my problem.I have given some points to all the persons who have helped to solve this problem.Problem solved.

      Thanks and Regards,

      Latha Prabhu.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 04:22 AM

    hi,

    There might be probelm with access to the particular file.

    that particular file/folder don't have write access.

    please check access for the file

    cheers,

    sasi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 28, 2005 at 04:33 AM

    Hi,

    Since it works well in Quality Server your program is doing is right.When it comes to production you may not have access rights to partcular path( drive names,....).

    Please locate the exact path you have access to and then run this code and it should work.

    Please reward points if you find this explanation useful.

    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.