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

issue with dataset

I am executing the program which has to create a file

however I am getting sy-subrc as 8 after executing the below code.

OPEN DATASET v_file_name FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.

So is it authorization issue or what is the issue exactly.

How can I explain to my functional consultant about the issue.

she is asking what is the problem ?

Thanks in advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2009 at 04:50 PM

    Max I double clicked and I found Z_I0571_OUTBOUND_PATH against logical path.

    What I need to insert in my case If I need to ?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2009 at 04:11 PM

    Hi Experts,

    The problem here I found is file path does not exist in the application server.

    When I checked the transaction code : al11 for the below directory,

    /data/interface/CTLOG/I057.10000009941.T it does not exists.

    However in debugging the program, I removed u201CCTLOGu201D folder in the abovefile path, the program executed well with /data/interface/I057.10000009941.T .

    I wrote the above explanation to my functional consultant, she replied me like below

    "What do I have to do in order to get this to successfully execute in the system.

    Where do I remove the CTLOG from"

    HOW TO EXPLAIN HER THIS SOLUTION or WHAT I NEED TO CONVEY HER ?

    -


    Below is the code where file path is derivated :

    IF p_prvmod NE c_marked.

    CALL FUNCTION 'NUMBER_GET_NEXT'

    EXPORTING

    nr_range_nr = '01'

    object = 'ZNR_571'

    quantity = '1'

    subobject = space

    toyear = '2008'

    ignore_buffer = space

    IMPORTING

    number = v_file_num

    EXCEPTIONS

    interval_not_found = 1

    number_range_not_intern = 2

    object_not_found = 3

    quantity_is_0 = 4

    quantity_is_not_1 = 5

    interval_overflow = 6

    buffer_overflow = 7

    OTHERS = 8.

    IF sy-subrc NE 0.

    CLEAR v_file_num.

    ENDIF.

    CALL FUNCTION 'FILE_GET_NAME'

    EXPORTING

    client = sy-mandt

    logical_filename = p_lgfnam

    operating_system = sy-opsys

    parameter_1 = p_phyfna

    parameter_2 = v_file_num

    IMPORTING

    file_name = v_file_name

    EXCEPTIONS

    file_not_found = 1

    OTHERS = 2.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      I think the problem is how the path to be used is defined.

      If a logical path is being used, it need to runs the trx FILE and change the path of the logical file there.

      Probably here a path like this is set:

      /data/interface/CTLOG/<PARAM>

      So it should be /data/interface/<PARAM>

      Max

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2009 at 04:33 PM

    What I need to do here Max?

    I am not taht export of logical and phiysical file paths...

    Could you please explain me bit clearly ,what I need to do or what I need to suggest ?

    THANKS IN ADVANCE FOR YOUR REPLY

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi

      Do a double click on one of those hits and check the attributes

      For example, in my system I've defined the logica path Z_FILE_CAMBI where I've inserted this path:

      /usr/sap/trans.<SYSID>/BTCI/ftp/<FILENAME>

      That means in my production system the file will be stored in path /usr/sap/trans.PRD/BTCI/ftp

      So in your system u should see a path like /data/interface/CTLOG/, can u see it?

      Max

  • author's profile photo Former Member
    Former Member
    Posted on Aug 05, 2009 at 07:50 PM

    If your application server is on Unix the directory name will be case sensistive. First make sure that the output directory you are writing this file exists and matches the case that you are giving in the open dataset statement. If it is not a directory issue then it is most probabaly authorization issue(Normaly gives a dump). You should contact the Unix team in that case.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 05, 2009 at 08:40 PM

    have break point at the open dataset statment and have a look at the variable... v_file_name it need to be exactly the same as the path appears when u see in AL11 like sap\Temp\Dev.... T and D is caps and and rest are lower case....

    parameter : p_filepathe type ....... lower case. " is the addition you might have to use if you are getting it from a parameter selection element.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2009 at 05:07 PM

    (Actually this is quality system ) I navigated inside as you suggested ....

    I have a Physical file path of

    /data/interface/<SYSID>CLNT<CLIENT>/OUT/CTLOG/<FILENAME>

    I tried to change file path , however I got a popup saying :

    "Changes to Repository or cross-client Customizing are not permitted" in quality system

    However looks like I have acces to change the above path in Development system .

    What can I do now ?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI

      BANG

      You're in the right point.

      /data/interface/<SYSID>CLNT<CLIENT>/OUT/CTLOG/<FILENAME>

      <SYSID> is the System ID

      <CLIENT> is the client

      So u should check in your dev system in the path above exists, u need to replace <SYSID> with the system ID and <CLIENT> with the client of your login.

      For example: if system id of development system is DEV and the client is 100, u should see (by AL11) the path

      /data/interface/DEVCLNT100/OUT/CTLOG

      If the path exists, you've a problem, because it means a similar path in production system is not created yet; u can change the path in development system in according to production path, but then your report can't work in development or quality system.

      So before changing the path u should ask which right logical path has to be inserted there:

      if it's /data/interface/<SYSID>CLNT<CLIENT>/OUT/CTLOG/, it means u need to ask your basis to create the path in production system and u don't need to change any data by FILE transaction.

      Max

  • author's profile photo Former Member
    Former Member
    Posted on Aug 11, 2009 at 06:51 PM

    I APPRECIATE YOUR ASSISTANCE.

    THANK YOU VERY MUCH Max. 😊

    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.