<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unicode Errors in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576689#M1271969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAPpers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the Unicode error as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upload/Ws_Upload and Download/Ws_Download are obsolete, since they are not&lt;/P&gt;&lt;P&gt; Unicode-enabled; use the class cl_gui_frontend_services&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FILENAME            = 'C:\'&lt;/P&gt;&lt;P&gt;      FILETYPE            = 'DAT'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      ACT_FILENAME        = P_FILENAME&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DATA_TAB            = I_FILE&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      CONVERSION_ERROR    = 1&lt;/P&gt;&lt;P&gt;      INVALID_TABLE_WIDTH = 2&lt;/P&gt;&lt;P&gt;      INVALID_TYPE        = 3&lt;/P&gt;&lt;P&gt;      NO_BATCH            = 4&lt;/P&gt;&lt;P&gt;      UNKNOWN_ERROR       = 5&lt;/P&gt;&lt;P&gt;      OTHERS              = 6.&lt;/P&gt;&lt;P&gt;  CASE SY-SUBRC.&lt;/P&gt;&lt;P&gt;    WHEN '1'. MESSAGE E014(ZV) WITH 'Conversion_error'.&lt;/P&gt;&lt;P&gt;    WHEN '2'. MESSAGE E014(ZV) WITH 'Invalid_table_width'.&lt;/P&gt;&lt;P&gt;    WHEN '3'. MESSAGE E014(ZV) WITH 'Invalid_type'.&lt;/P&gt;&lt;P&gt;    WHEN '4'. MESSAGE E014(ZV) WITH 'No_batch'.&lt;/P&gt;&lt;P&gt;    WHEN '5'. MESSAGE E014(ZV) WITH 'Unknown_error'.&lt;/P&gt;&lt;P&gt;    WHEN '6'. MESSAGE E014(ZV) WITH 'Others'.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to chage the function module UPLOAD to GUI_UPLOAD but the problem is importing parameter ACT_FILENAME is not their in GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to correct this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regard,&lt;/P&gt;&lt;P&gt;Rahul Sinha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2009 12:44:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-21T12:44:56Z</dc:date>
    <item>
      <title>Unicode Errors</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576689#M1271969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAPpers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the Unicode error as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Upload/Ws_Upload and Download/Ws_Download are obsolete, since they are not&lt;/P&gt;&lt;P&gt; Unicode-enabled; use the class cl_gui_frontend_services&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the below code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      FILENAME            = 'C:\'&lt;/P&gt;&lt;P&gt;      FILETYPE            = 'DAT'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      ACT_FILENAME        = P_FILENAME&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      DATA_TAB            = I_FILE&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      CONVERSION_ERROR    = 1&lt;/P&gt;&lt;P&gt;      INVALID_TABLE_WIDTH = 2&lt;/P&gt;&lt;P&gt;      INVALID_TYPE        = 3&lt;/P&gt;&lt;P&gt;      NO_BATCH            = 4&lt;/P&gt;&lt;P&gt;      UNKNOWN_ERROR       = 5&lt;/P&gt;&lt;P&gt;      OTHERS              = 6.&lt;/P&gt;&lt;P&gt;  CASE SY-SUBRC.&lt;/P&gt;&lt;P&gt;    WHEN '1'. MESSAGE E014(ZV) WITH 'Conversion_error'.&lt;/P&gt;&lt;P&gt;    WHEN '2'. MESSAGE E014(ZV) WITH 'Invalid_table_width'.&lt;/P&gt;&lt;P&gt;    WHEN '3'. MESSAGE E014(ZV) WITH 'Invalid_type'.&lt;/P&gt;&lt;P&gt;    WHEN '4'. MESSAGE E014(ZV) WITH 'No_batch'.&lt;/P&gt;&lt;P&gt;    WHEN '5'. MESSAGE E014(ZV) WITH 'Unknown_error'.&lt;/P&gt;&lt;P&gt;    WHEN '6'. MESSAGE E014(ZV) WITH 'Others'.&lt;/P&gt;&lt;P&gt;  ENDCASE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to chage the function module UPLOAD to GUI_UPLOAD but the problem is importing parameter ACT_FILENAME is not their in GUI_UPLOAD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to correct this error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please Reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regard,&lt;/P&gt;&lt;P&gt;Rahul Sinha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 12:44:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576689#M1271969</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T12:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode Errors</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576690#M1271970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPLOAD function module automatically provides a popup which is not available with GUI_UPLOAD. You have to use 2 methods. Here is a example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After File open dialog the valiable W_P_FILE will be same as ACT_FILENAME  and W_P_FILE will be used in GUI_UPLOAD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA : I_FILE_TABLE TYPE  TABLE OF FILE_TABLE, 
       W_FILETABLE  TYPE  FILE_TABLE,
       W_RC         TYPE  I,
       W_P_FILE     TYPE  STRING,
       prc_user_action TYPE I.
CONSTANTS: C_ASC(10)  TYPE  C VALUE 'ASC'. 

  W_P_FILE =  'C:\'.
     CALL METHOD CL_GUI_FRONTEND_SERVICES=&amp;gt;FILE_OPEN_DIALOG
       EXPORTING
*         WINDOW_TITLE            =
*         DEFAULT_EXTENSION       =
          DEFAULT_FILENAME        = W_P_FILE
*         FILE_FILTER             = 
*         WITH_ENCODING           =
*         INITIAL_DIRECTORY       =
*         MULTISELECTION          =
       CHANGING
          FILE_TABLE              = I_FILE_TABLE
          RC                      = W_RC 
          USER_ACTION             = prc_user_action
*         FILE_ENCODING           =
       EXCEPTIONS
         FILE_OPEN_DIALOG_FAILED = 1
         CNTL_ERROR              = 2
         ERROR_NO_GUI            = 3
         NOT_SUPPORTED_BY_GUI    = 4
         others                  = 5      .
     IF sy-subrc = 0
  AND prc_user_action NE 
  CL_GUI_FRONTEND_SERVICES=&amp;gt;ACTION_CANCEL.
 LOOP AT I_FILE_TABLE INTO W_FILETABLE.
  W_P_FILE = W_FILETABLE-FILENAME.
  EXIT  .
 ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 12:59:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576690#M1271970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T12:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode Errors</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576691#M1271971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remaining code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
      FILENAME                      = W_P_FILE
      FILETYPE                      = C_ASC
      HAS_FIELD_SEPARATOR           = 'X'
    TABLES 
      DATA_TAB                      = W_TAB
   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 NE 0.
   MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
           WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : Had to post this separately due to the character limit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:06:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576691#M1271971</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode Errors</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576692#M1271972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;WS_UPLOAD , UPLOAD etc. function modules are obsolete.&lt;/P&gt;&lt;P&gt;So use the GUI_UPLOAD and GUI_DOWNLOAD of the class &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cl_gui_frontend_services&lt;/STRONG&gt;  , that issue will be relosved&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the code - -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_upload " To upload the file into int. table
  EXPORTING
    FILENAME                = 'C:\' " Specify the full file path
*    FILETYPE                = 'ASC'  " Specify the desired file type
*    HAS_FIELD_SEPARATOR     = SPACE
*    HEADER_LENGTH           = 0
*    READ_BY_LINE            = 'X'
*    DAT_MODE                = SPACE
*    CODEPAGE                = SPACE
*    IGNORE_CERR             = ABAP_TRUE
*    REPLACEMENT             = '#'
*    VIRUS_SCAN_PROFILE      =
*  IMPORTING
*    FILELENGTH              =
*    HEADER                  =
  CHANGING
    data_tab                = I_FILE " Internal table where data will be uploaded
  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
    NOT_SUPPORTED_BY_GUI    = 17
    ERROR_NO_GUI            = 18
    others                  = 19
        .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly use the &lt;STRONG&gt;gui_download&lt;/STRONG&gt; of &lt;STRONG&gt;class cl_gui_frontend_services&lt;/STRONG&gt; to download &lt;/P&gt;&lt;P&gt;the the contents of the internal table to a file of presentation server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;CALL METHOD cl_gui_frontend_services=&amp;gt;gui_download
  EXPORTING
*    BIN_FILESIZE              =
    filename                  = 'C:\' " Specify the fine name with path
*    FILETYPE                  = 'ASC'
*    APPEND                    = SPACE
*    WRITE_FIELD_SEPARATOR     = SPACE
*    HEADER                    = '00'

      .
      .
      .
  changing
    data_tab                  = i_file " Internal table that contains the data
  EXCEPTIONS
    FILE_WRITE_ERROR          = 1
    NO_BATCH                  = 2
   .
   .
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pinaki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2009 13:54:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576692#M1271972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-21T13:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode Errors</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576693#M1271973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2009 09:15:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-errors/m-p/5576693#M1271973</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-22T09:15:32Z</dc:date>
    </item>
  </channel>
</rss>

