Open dataset - return code 8

I am getting sy-subrc = 0 on the function call but I am still getting a return code of 8 (permission denied) on the open dataset. Here is my code.
HELP!!
call function 'AUTHORITY_CHECK_DATASET'
EXPORTING
program = 'ZBS_PRODUCT_OUTBOUND_INTERFACE'
activity = 'WRITE'
filename = '
saberdev\blacksmith\ftpout\bsproduct.txt'
EXCEPTIONS
no_authority = 1
activity_unknown = 2
others = 3.
check sy-subrc = 0.
data: MSG(100).
pfilename = '
saberdev\blacksmith\ftpout\bsproduct.txt'.
CLEAR MSG.
OPEN DATASET pfilename FOR OUTPUT IN TEXT MODE MESSAGE MSG.
IF SY-SUBRC <> 0.
CONCATENATE 'file error: ' MSG INTO MSG.
MESSAGE E208(00) WITH MSG.
ENDIF.

Janet - Might be worth it to check the permissions/owner on the directory.  You might be able to use function module SUBST_GET_FILE_LIST  and trans SE37 to do this.
Regards,
Lawrence Schmit
Message was edited by: Lawrence Schmit
Keep in mind that the authority check only verifies your authorization level --> it doesn't verify that the drive/path/filename is valid.  Also, it looks as if you're attempting to write to a network drive (assumed because of the back-slashes "
").  If you're writing to a Unix directory, use forward slashes '/'.

Similar Messages

  • Error opening dataset, return code:        8

    Hi,
    I'm passing the information from a txt to a transparente table. The problem is that it throws me the following message: Error opening dataset, return code:        8  .
    When I debug it the first row of information enters to the internal table but after it this erro comes.
    The code is the following:
    DATA: BEGIN OF record,
    data element: TABNAME
            tablename_001(030),
    data element: DESCR40
            des_002(040),
    data element: TYKLA
            tipo_003(015),
    data element: QUANTITY_I
            quan_004(011),
    data element: PRICE
            precio_005(021),
    data element: TOT01
            total_006(017),
          END OF record.
    End generated data section ***
    DATA:
    BEGIN OF i_tabla OCCURS 0,
    dest(40),
    type(15),
    quan(10),
    precio(15),
    tot(15),
    END OF i_tabla.
    PARAMETERS:
    p_user LIKE apqi-userid OBLIGATORY DEFAULT  sy-uname,
    p_fich LIKE rlgrap-filename OBLIGATORY
    DEFAULT: 'C:\Documents and Settings\lseri\My Documents\Book1.txt'.
    START-OF-SELECTION.
      CALL FUNCTION 'UPLOAD'
       EXPORTING
      CODEPAGE                      = ' '
         filename                      = p_fich
         filetype                      = 'DAT'
        TABLES
          data_tab                      = i_tabla
       EXCEPTIONS
         conversion_error              = 1
         invalid_table_width           = 2
         invalid_type                  = 3
         no_batch                      = 4
         unknown_error                 = 5
         gui_refuse_filetransfer       = 6
         OTHERS                        = 7
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      PERFORM open_dataset USING dataset.
      PERFORM open_group.
      LOOP AT i_tabla FROM 2.
    PERFORM bdc_dynpro      USING 'SAPLSETB' '0230'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'DATABROWSE-TABLENAME'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ANLE'.
        PERFORM bdc_field       USING 'DATABROWSE-TABLENAME'
                                      record-tablename_001.
        PERFORM bdc_dynpro      USING '/1BCDWB/DBZSTOCK_TEST' '0101'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'ZSTOCK_TEST-TOTAL'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=SAVE'.
        PERFORM bdc_field       USING 'ZSTOCK_TEST-DES'
                                      record-des_002.
        PERFORM bdc_field       USING 'ZSTOCK_TEST-TIPO'
                                      record-tipo_003.
        PERFORM bdc_field       USING 'ZSTOCK_TEST-QUAN'
                                      record-quan_004.
        PERFORM bdc_field       USING 'ZSTOCK_TEST-PRECIO'
                                      record-precio_005.
        PERFORM bdc_field       USING 'ZSTOCK_TEST-TOTAL'
                                      record-total_006.
        PERFORM bdc_dynpro      USING '/1BCDWB/DBZSTOCK_TEST' '0101'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/EBACK'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'ZSTOCK_TEST-DES'.
        PERFORM bdc_dynpro      USING 'SAPLSETB' '0230'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/EBACK'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'DATABROWSE-TABLENAME'.
        PERFORM bdc_transaction USING 'SE16'.
      ENDLOOP.
      PERFORM close_group.
      PERFORM close_dataset USING dataset.
    Please help me!
    Thanks

      open dataset                                                       *
    FORM OPEN_DATASET USING P_DATASET.
      OPEN DATASET P_DATASET
                   FOR INPUT IN TEXT MODE
                   ENCODING DEFAULT.
      IF SY-SUBRC <> 0.
        WRITE: / TEXT-E00, SY-SUBRC.
        STOP.
      ENDIF.
    ENDFORM.
      create batchinput session                                          *
      (not for call transaction using...)                                *
    FORM OPEN_GROUP.
      IF SESSION = 'X'.
        SKIP.
        WRITE: /(20) 'Create group'(I01), GROUP.
        SKIP.
      open batchinput group
        CALL FUNCTION 'BDC_OPEN_GROUP'
             EXPORTING  CLIENT   = SY-MANDT
                        GROUP    = GROUP
                        USER     = USER
                        KEEP     = KEEP
                        HOLDDATE = HOLDDATE.
        WRITE: /(30) 'BDC_OPEN_GROUP'(I02),
                (12) 'returncode:'(I05),
                     SY-SUBRC.
      ENDIF.
    ENDFORM.
    I'm using these performs because they appeared automatically when the recording became a program.

  • Open dataset - return code 8 - msg - Permission Denied

    This is the first time this company has tried to write files to the application server. They are running under Windows. The network admin set up a folder and I am getting a return code of 8 on 'open dataset'.  When I use this function to get more information I am getting
    a run-time error that the ABAP is bad.
    What is wrong with this function call?
    pfilename =
    saberdev\blacksmith\ftpout\bsproduct.txt
    call function 'AUTHORITY_CHECK_DATASET'
    EXPORTING
    program = 'ZBS_PRODUCT_OUTBOUND_INTERFACE'
    activity = 'WRITE'
    filename = pfilename
    EXCEPTIONS
    no_authority = 1
    activity_unknown = 2
    others = 3.

    Thanks, Santosh, that helped.
    Now I am getting sy-subrc =  0 on the function call but I am still getting a return code of 8 on the open dataset.  Here is my code.
    HELP!!
       call function 'AUTHORITY_CHECK_DATASET'
             EXPORTING
                  program          = 'ZBS_PRODUCT_OUTBOUND_INTERFACE'
                  activity         = 'WRITE'
             filename         = '
    saberdev\blacksmith\ftpout\bsproduct.txt'
             EXCEPTIONS
                  no_authority     = 1
                  activity_unknown = 2
                  others           = 3.
         check sy-subrc = 0.
        data: MSG(100).
        pfilename = '
    saberdev\blacksmith\ftpout\bsproduct.txt'.
        CLEAR MSG.
        OPEN DATASET pfilename FOR OUTPUT IN TEXT MODE MESSAGE MSG.
        IF SY-SUBRC <> 0.
          CONCATENATE 'file error: ' MSG INTO MSG.
          MESSAGE E208(00) WITH MSG.
        ENDIF.

  • BDC for transaction AC02, error opening dataset returning 0.

    Here is the code.
    Help me ASAP..             
    <unreadable code removed by moderator>
    Moderator message: please do some own research before posting, only posts text with less than 5000 characters, check formatting before posting, do not use terms like "ASAP".
    Edited by: Thomas Zloch on Jan 13, 2012

      open dataset                                                       *
    FORM OPEN_DATASET USING P_DATASET.
      OPEN DATASET P_DATASET
                   FOR INPUT IN TEXT MODE
                   ENCODING DEFAULT.
      IF SY-SUBRC <> 0.
        WRITE: / TEXT-E00, SY-SUBRC.
        STOP.
      ENDIF.
    ENDFORM.
      create batchinput session                                          *
      (not for call transaction using...)                                *
    FORM OPEN_GROUP.
      IF SESSION = 'X'.
        SKIP.
        WRITE: /(20) 'Create group'(I01), GROUP.
        SKIP.
      open batchinput group
        CALL FUNCTION 'BDC_OPEN_GROUP'
             EXPORTING  CLIENT   = SY-MANDT
                        GROUP    = GROUP
                        USER     = USER
                        KEEP     = KEEP
                        HOLDDATE = HOLDDATE.
        WRITE: /(30) 'BDC_OPEN_GROUP'(I02),
                (12) 'returncode:'(I05),
                     SY-SUBRC.
      ENDIF.
    ENDFORM.
    I'm using these performs because they appeared automatically when the recording became a program.

  • Does we need to Create a file Before using Open dataSet

    Hi Guys,
                Can  any body tell me whether we have to create a File before using Open dataset  for writing files in Application Server.
               Can anybody write a program for EKPO table to store it in application Server using OpendatasSet ?Is there any specific care we have to take for Executing   pgm in Background?
    I wrote the pgm for Foreground using GUI- Download.
    PGM.
          select * into table it_ekpo  from  ekpo .
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    filename ='c:\EKPO.xls'
    filetype = 'ASC'
    WRITE_FIELD_SEPARATOR = 'X'
    TABLES
    data_tab = it_ekpo
    *fieldnames = l_heading
    EXCEPTIONS
    file_write_error = 1
    no_batch = 2
    gui_refuse_filetransfer = 3 .
                       Plzzzzzzzzz Make the changes for existing Pgm.any help is awarded with points.Its Urgent.
    Thanks,
    Gopi.

    Hi Guys,
                 Thanks for ur immediate response.I am sending the code just confirm me whether is correct r not?
    DATA : wa_EKPO_file   TYPE file_table-filename.
    select * into table it_ekpo  from  ekpo .
      OPEN DATASET wa_EKPO_file FOR OUTPUT         "Write to appl. server
                                          IN TEXT MODE
                                          ENCODING DEFAULT.  "Open dataset Return code
    IF sy-subrc = 0.
    LOOP at IT_EKPO into WA_EKPO.
    TRANSFER wa_ekpo to wa_ekpo_file.
    ENDLOOP.
    ENDIF.
                                             I want write the data into SPREAD Sheet .Can u guys  tell me how to write into Spread Sheet using Open data Set.
    Thanks,
    Gopi.

  • Open Dataset for XML not reading the XML file, Returning Code 8.

    Dear all,
    Im trying to open an XML file using Open Dataset, since i have to execute this report in background and GUI_upload doesnt work in background.
    The XML file is available in my C:\, say, C:\xmlfile.xml.
    But  the open dataset is not reading any value into the g_xml_line . it is returning sy-subrc = 8.
    Below is my code for that, can anybody help me out to resolve.
    DATA : lv_filename LIKE rlgrap-filename.
      CLEAR: lv_filename.
      lv_filename = p_input.
      OPEN DATASET lv_filename FOR INPUT IN BINARY MODE.
      IF sy-subrc ne 0.
        WRITE:/ 'invalid file'.
      else.
      DO.
        READ DATASET lv_filename INTO  g_xml_line.
        IF sy-subrc EQ 0.
          APPEND g_xml_line TO g_xml_table.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE DATASET lv_filename.
       ENDIF.
    TYPES: BEGIN OF t_xml_line,
            data(256) TYPE x,
          END OF t_xml_line.
    DATA: g_xml_table       TYPE TABLE OF t_xml_line,
          g_xml_line        TYPE t_xml_line,
          g_xml_table_size  TYPE i.
    GET REFERENCE OF gt_person INTO gs_result_xml-value.
      gs_result_xml-name = 'IPIX'.
      APPEND gs_result_xml TO gt_result_xml.
    Perform the XSLT stylesheet
      TRY.
          CALL TRANSFORMATION zaum_manh_sync_rpt
          SOURCE XML g_xml_table
          RESULT (gt_result_xml).
        CATCH cx_root INTO gs_rif_ex.
          gs_var_text = gs_rif_ex->get_text( ).
          MESSAGE gs_var_text TYPE 'E'.
      ENDTRY.
    Kindly suggest me a solution. Points assured
    regs,
    raja

    After saving the file , below is the code i wrote, but it gives a runtime error with message
    No roll storage space of length 3788808 available for internal storage.
    ***Coding****
    PARAMETERS: p_file TYPE pathintern LOWER CASE DEFAULT '/usr/sap/DEV/SYS/global/XMLABAP2.XML'.
    DATA : lv_filename LIKE rlgrap-filename.
      CLEAR: lv_filename.
      lv_filename = p_file.
      DATA: l_fname TYPE filename-fileintern. " File name
    *GET THE FILENAME FROM THE APPLICATION SERVER
      CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
        EXPORTING
          directory        = p_file
          filemask         = '*'
        IMPORTING
          serverfile       = l_fname
        EXCEPTIONS
          canceled_by_user = 1
          OTHERS           = 2.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
        WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    */usr/sap/DEV/SYS/global/substanc
      lv_filename = l_fname.
      OPEN DATASET lv_filename FOR INPUT IN BINARY MODE.
      IF sy-subrc NE 0.
        WRITE:/ 'invalid file'.
      ELSE.
        DO.
          READ DATASET lv_filename INTO  g_xml_line.
       IF sy-subrc EQ 0.
          APPEND g_xml_line TO g_xml_table.
       ELSE.
         EXIT.
       ENDIF.
        ENDDO.
        CLOSE DATASET lv_filename.
      ENDIF.

  • Return code 8 on OPEN DATASET

    Hi All,
    i try to migrate a file with ISU-Migration workbench.
    in the Display option I can see the file. All looks fine.
    When I press IMPORT I got the message "migration executed" but actually it did not read anysthing. So I debugged and came to the OPEN DATASET.
    There I get a sy-subrc of 8.
    Do not remember what this means...probably the directory is protected or something...
    Who knows?
    Thanks in advance
    Thomas

    hi Thomas,
         hi thomas u can  do authority check as stated below..
    if sy-subrc is 8 it means too many parameters (fields, values). Maximum allowed is 10. I have also added the other sy-subrc condition so that u can benifit...
         AUTHORITY-CHECK OBJECT object
        ID name1  FIELD f1
        ID name2  FIELD f2
        ID name10 FIELD f10.
    object
    Field which contains the name of the object for which the authorization is to be checked.
    name1 ...
    Fields which contain the names of the
    name10
    authorization fields defined in the object.
    f1 ...
    Fields which contain the values for which the
    f10
    authorization is to be checked.
    AUTHORITY-CHECK checks for one object whether the user has an authorization that contains all values of f (see SAP authorization concept).
    You must specify all authorizations for an object and a also a value for each ID (or DUMMY).
    The system checks the values for the IDs by AND-ing them together, i.e. all values must be part of an authorization assigned to the user.
    If a user has several authorizations for an object, the values are OR-ed together. This means that if the CHECK finds all the specified values in one authorization, the user can proceed. Only if none of the authorizations for a user contains all the required values is the user rejected.
    If the return code value in SY-SUBRC is 0, the user has the required authorization and may continue.
    The return code value changes according to the different error scenarios. The return code values have the following meaning:
    4
    User has no authorization in the SAP System for such an action. If necessary, change the user master record.
    8
    Too many parameters (fields, values). Maximum allowed is 10.
    12
    Specified object not maintained in the user master record.
    16
    No profile entered in the user master record.
    24
    The field names of the check call do not match those of an authorization. Either the authorization or the call is incorrect.
    28
    Incorrect structure for user master record.
    32
    Incorrect structure for user master record.
    36
    Incorrect structure for user master record.
    hope i had answered u.. rewward if u find it useful.
    Regards,
    Rajkumar.G.

  • OPEN DATASET code

    Hi all,
    I have the following code to output data.
    OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE encoding default.
    my question is what the format of output file should be? Is there any specific requirement? And if I run this code successfully, I should save the file onto server. How can I see the file? Thanks in advance!
    Linda

    u need to declare an internal table which contains all fields of type c and length as correspodning to itab fields.
    loop at itab.
      tab-field1 = itab-field1.
      tab-field2 = itab-field2...and so...on
      append tab.
    endloop.
    so, tab will be having data which is in character format.
    now, this internal table can be used to download to application server using datasets.

  • Open dataset not working in ECC 5.0, returning 8

    Gurus,
    Open data set is returning 8. The file is there on application server as selected by KD4 function module when I try to do open dataset it retruns 08.
    REPORT XXX message-id zdolfemsg.
    Data Declaration
    data: v_mfile type C,
          v_ffile type C.
    data: w_mpath type string,
          w_fpath type string.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME
                                       TITLE text-001.
    PARAMETERS: p_master like rlgrap-filename obligatory,
                            p_func like rlgrap-filename obligatory,
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_master.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
          CHANGING
          file_name = p_master.
    w_mpath = p_master.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_func.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        EXPORTING
          static    = 'X'
        CHANGING
          file_name = p_func.
          w_fpath = p_func.
    start-of-selection.
      perform initilaization_for_master.
      perform initialization_for_func.
      if v_mfile ='X' and V_FFILE = 'X'.
        message e001 with sy-repid.
      ELSEIF V_mfile = 'X'.
        message e000 with p_master sy-repid.         "Error opening file
      ELSEIF V_FFILE = 'X'.
        message e000 with p_func sy-repid.         "Error opening file
      endif.
    close dataset p_master.
    close dataset p_func.
    *&      Form  initilaization
          text
    -->  p1        text
    <--  p2        text
    FORM initilaization_for_master .
      open dataset w_mpath for output in text mode encoding default.
      if sy-subrc <> 0.
        v_mfile = 'X'.
      endif.
    ENDFORM.                    " initilaization
    *&      Form  initialization_for_func
          text
    -->  p1        text
    <--  p2        text
    FORM initialization_for_func .
      open dataset w_fpath for input in text mode ENCODING DEFAULT.
      if sy-subrc <> 0.
        v_ffile = 'X'.
      endif.
    ENDFORM.                    " initialization_for_func
    Please help.
    Regards,
    Rajsh.

    Thanks Rob. How can I open the file on presentation server. I have to read the data from the file and fill in internal table.
    Regards,
    Rajesh.

  • 'Open Dataset' command - add ASCII code in a unicode system

    Hi,
    I use following comand in order to save a file on an application server. 
    open dataset <path> for output in text mode encoding default.
    Is it possible to convert file to ASCII code instead of the system setting unicode and to ignore conversion errors? If yes, please tell me how.
    Thanks!

    problem exporting text in hebrew
    Similar kind of problem has been solved here.. check that link first
    Use the class CL_ABAP_CONV_OUT_CE and use it to convert file from unicode to ascii.

  • SY - System fields and return codes in ABAP

    Hi
    I'm new to ABAP, where do I find what the meaning of the system field return codes are ?
    example SY-SUBRC returns a number of codes 0, 2, 4, 8 etc what do they mean.
    Is there a resource somewhere that provides this information for all the system fields.
    I have searched high and low and have found little, they must be defined somwhere ?
    cheers Hugh

    Here is a listing of all of the system fields.
    http://help.sap.com/saphelp_scm50/helpdata/en/7b/fb96c8882811d295a90000e8353423/frameset.htm
    As for what the return codes( 0, 4, 8) for SY-SUBRC mean,  that is a little tricky.  The meanings of the values are dependent on what statement was used previously. They would mean different things when used with different statements.  For example, if you check SY-SUBRC after a FIND statement, the return code value 4, would mean something different than if you had check the SY-SUBRC value after doing an OPEN DATASET.  So you need to look at the specific statements in help.sap.com and see what it says about the SY-SUBRC values for each statement.
    http://help.sap.com/saphelp_scm50/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
    Regards,
    Rich Heilman

  • OPEN Dataset - Peculiar problem

    Hello experts!
    I am facing a peculiar problem with ABAP keyword OPEN DATASET.
    I have a directory to which I am adding new files using OPEN DATASET FOR OUTPUT.. this works perfectly fine in the Consolidation system. But the same thing does'nt work in the Production system! It return SY-SUBRC = 8
    After reading several other posts on SDN and other forums, the following causes were touted.
    1) Path incorrect 
    2) No Authorization
    But upon checking, neither of the wo are possible because the path is maintained properly and the authorizations at OS level are given (R/W) to this folder. Moreover, the user has S_DATASET auth object!!
    Then I read somewhere else that having multiple Application Servers could be a possible cause and that running the code as a background job would be afix.. Is it so?
    Even if it is, the application is in ABAP Web Dynpro and is launched from the portal.. hence launching it as a background job is not an option... Any solutions?????
    Any help on this would be appreciated...
    Thanks in advance, Amith

    Hi,
    Yes this is true that if we are having the multiple application server then this kind of error occures if your specified directory is not mapped on the alll the avaiable sAP application servers.
    I guess when ever you are running your application then system will pick the appkication server based on the present load. Hence if your directory is not mapped in that application server then you wil get this kind of issues,
    so i guess check with you basis team that spctified path is avaiable in all the application server.

  • File not found in shared folder when transferred through Open Dataset

    Dear Experts,
    I am transferring a file to a shared folder using open dataset .
    The sy-subrc value returns as 0 . But i am not able to find the file in the destined path.
    But when i try to retrieve the file from the same path through CG3Y to my local PC ,  i am able to retrieve the file.
    Could you please throw some light into this as to why this is happening.
    With Regards,
    Syed Ibrahim G

    Hi venkat,
    Sorry for the delayed response . The Authority check FM also returns the sy-subrc value 0 .
    But still not able to find the File . I am Trying to paste the data through FTP_R3_To_SERVER . But it is not supporting Non-English Characters. Is there any way to paste the file through FTP ( with Non English Characters ).
    {code}
    call function 'FTP_CONNECT'
       exporting
         user            = user
         password        = pwd
         host            = host
         rfc_destination = dest
       importing
         handle          = hdl.
    if sy-subrc = 0.
       CALL FUNCTION 'FTP_R3_TO_SERVER'
         EXPORTING
           handle               = hdl
           fname                = FNAME
    *      BLOB_LENGTH          =
          character_mode       = 'X'
    TABLES
    *  BLOB                 =
          text                 = it_data1
        EXCEPTIONS
          tcpip_error          = 1
          command_error        = 2
          data_error           = 3
          OTHERS               = 4.
    endif.
    {code}
    With Regards,
    Syed Ibrahim G

  • Open dataset (UNICODE) for english en polish characters

    Hi,
    I have a problem on my multi language project on where I need to manage English language and polish language.
    I have a table (that we can call TABLE) I manage the translation on it. When I am connected in English I can see some squares instead some polishes characters. When I am connected in polish, I have the right characters. Any way I don&#8217;t think it&#8217;s a problem, cause if I copy/paste the square on Word, I find back the corrects characters.
    My problem is after.
    I have a structure with the collon name and an internal table with data.
    I use the module function DDIF_TABL_GET on my table TABLE to have the collon name corresponding to the language wanted.
    I am building a string with that and some carry return.
    (Here in English I have again some square, but always the good character if I paste it on Words.)
    Now I would like to put this string in a file using the good encoding.
    I have tried lot of &#8216;opening dataset&#8217; and lot of &#8216;encoding&#8217;.
    I have a file on SAP (transaction FILE)
    (Here in English I have again some square, but always the good character if I paste it on Words.)
    If I download this file on my computer, I have wrong characters.
    Could I have help?
    My wrong code:
      OPEN DATASET lv_filename FOR OUTPUT IN TEXT MODE ENCODING UTF-8.
      TRANSFER u_contenu TO lv_filename.
      CLOSE DATASET lv_filename.

    Hi,
       Use this
      OPEN DATASET File_path  FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE
      WITH SMART LINEFEED
    it will definitely work.
    Regards,
    Manesh. R

  • Open dataset for input don't work after upgrade from 46C to 47

    We did an upgrade from 46C to 47, after that all the Z programs that have the sentence "open dataset for input" alwas send a sy-subrc = 8, the curios things is that the sentece "open dataset for output" works ok.
    Please I need help to solve this?
    En example of code.
    PARAMETERS: P_ARCHF(60) OBLIGATORY DEFAULT
                'C:\20050900.txt' LOWER CASE.
    OPEN DATASET P_ARCHF FOR INPUT IN TEXT MODE.
    IF SY-SUBRC <> 0. MESSAGE i001 WITH ARCHIVO. stop. endif.

    Well, it's telling you that the datset doesn't exist. From the help in 4.7:
    OPEN DATASET
    Addition 1a
    ... FOR INPUT
    Effect
    OPEN ... FOR INPUT opens the file in read mode.
    If the file does not exist, OPEN ... FOR INPUT fails with Return Code SY-SUBRC = 8.
    Note
    If OPEN DATASET is not executed in a Unicode program and if the user has write authorization for the file, the file is opened in read and write mode. Otherwise, it is only opened in read mode.
    Rob

Maybe you are looking for

  • Planner table changes transport in SPRO

    Hi all, I have created a new planner in SPRO and using menu 'Table View'->Transport, I have saved the changes of the planner table under one request number, but I dont see any info under this in se10. Is this right approach or else I missed anything?

  • Serious problem adobe presenter addin

    I am using Office 2010 32 bit version and have presenter 7.07 installed. It still brings the "serious problem with add-in" and wants to know whether I want to disable it. I said no and then reopened PowerPoint.How can I avoid this problem? Thanks for

  • How to programmatically move the cursor to the "To" field of a new AppointmentItem?

    I need to move the cursor to the "To" field of all new AppointmentItems which are created through my Outlook Addin. How I can achieve this? Thanks in advance. Thanks Prasad

  • Accessing msn mail using Apple Mail

    I'm helping my father migrate to a mac and have been trying to configure Apple Mail so it can access his existing msn mail account. I've tried to locate the account settings on his "butterfly web browser" but cannot locate them. Can anyone help out?

  • How to use ldaprealm security in weblogic6.1

    Hi, How would I use weblogic6.1 ldaprealm to authenticate the user using iplanet directory server 5.1