<?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 Problem in downloaded data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849099#M667538</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is I need to download the data from table to application server. I coded the program so that it downloads the data into application server, But the problem is some fields like CURR (Data type) are downloading as special characters.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code, can any one check my code and suggest me what to do.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ws_prps OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE prps.&lt;/P&gt;&lt;P&gt;DATA  END   OF ws_prps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF prps_file OCCURS 0,&lt;/P&gt;&lt;P&gt;       filler(255) TYPE c,&lt;/P&gt;&lt;P&gt;      END OF prps_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF mtab_data OCCURS 0,&lt;/P&gt;&lt;P&gt;        line(132) TYPE c,&lt;/P&gt;&lt;P&gt;      END OF mtab_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-100.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: so-pbukr FOR prps-pbukr,&lt;/P&gt;&lt;P&gt;                so-erdat FOR prps-erdat&lt;/P&gt;&lt;P&gt;                DEFAULT sy-datum&lt;/P&gt;&lt;P&gt;                    TO sy-datum&lt;/P&gt;&lt;P&gt;                OPTION  nb&lt;/P&gt;&lt;P&gt;                  SIGN  i,&lt;/P&gt;&lt;P&gt;                so-pspnr FOR prps-pspnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN SKIP 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: pa-lpc RADIOBUTTON GROUP x1,&lt;/P&gt;&lt;P&gt;            pa-dsn RADIOBUTTON GROUP x1 DEFAULT 'X'.&lt;/P&gt;&lt;P&gt;PARAMETERS: pa-name LIKE rlgrap-filename DEFAULT '/tmp'.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM prps INTO ws_prps WHERE pbukr IN so-pbukr&lt;/P&gt;&lt;P&gt;                                    AND erdat IN so-erdat&lt;/P&gt;&lt;P&gt;                                    AND pspnr IN so-pspnr.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      APPEND ws_prps.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   PERFORM download_prps.&lt;/P&gt;&lt;P&gt;  PERFORM write_dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM download_prps.&lt;/P&gt;&lt;P&gt;*download to local pc.&lt;/P&gt;&lt;P&gt;  name = 'C:\prps.dat'.&lt;/P&gt;&lt;P&gt;  typ  = 'ASC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BIN_FILESIZE                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      filename                      = name&lt;/P&gt;&lt;P&gt;     filetype                      = 'ASC'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                      = ws_prps&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     file_write_error              = 1&lt;/P&gt;&lt;P&gt;     no_batch                      = 2&lt;/P&gt;&lt;P&gt;     gui_refuse_filetransfer       = 3&lt;/P&gt;&lt;P&gt;     invalid_type                  = 4&lt;/P&gt;&lt;P&gt;     OTHERS                        = 5&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM write_dataset.&lt;/P&gt;&lt;P&gt;  CONCATENATE pa-name '/prps_' sy-datum '.dat' INTO pa-name.&lt;/P&gt;&lt;P&gt;  OPEN DATASET pa-name FOR OUTPUT IN TEXT MODE. "encoding default.&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    LOOP AT ws_prps. " into wa_prps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      TRANSFER ws_prps TO pa-name LENGTH 9999.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CLOSE DATASET pa-name.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;sample downloaded data.,&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;RM        3                                                                                00000000OC                0000001                                   INST RISER (STALK-ON) @ BADP-A                       00000000                              00000000                  000000000000     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2007 08:28:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-19T08:28:18Z</dc:date>
    <item>
      <title>Problem in downloaded data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849099#M667538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is I need to download the data from table to application server. I coded the program so that it downloads the data into application server, But the problem is some fields like CURR (Data type) are downloading as special characters.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code, can any one check my code and suggest me what to do.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF ws_prps OCCURS 0.&lt;/P&gt;&lt;P&gt;        INCLUDE STRUCTURE prps.&lt;/P&gt;&lt;P&gt;DATA  END   OF ws_prps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF prps_file OCCURS 0,&lt;/P&gt;&lt;P&gt;       filler(255) TYPE c,&lt;/P&gt;&lt;P&gt;      END OF prps_file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: BEGIN OF mtab_data OCCURS 0,&lt;/P&gt;&lt;P&gt;        line(132) TYPE c,&lt;/P&gt;&lt;P&gt;      END OF mtab_data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-100.&lt;/P&gt;&lt;P&gt;SELECT-OPTIONS: so-pbukr FOR prps-pbukr,&lt;/P&gt;&lt;P&gt;                so-erdat FOR prps-erdat&lt;/P&gt;&lt;P&gt;                DEFAULT sy-datum&lt;/P&gt;&lt;P&gt;                    TO sy-datum&lt;/P&gt;&lt;P&gt;                OPTION  nb&lt;/P&gt;&lt;P&gt;                  SIGN  i,&lt;/P&gt;&lt;P&gt;                so-pspnr FOR prps-pspnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN SKIP 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: pa-lpc RADIOBUTTON GROUP x1,&lt;/P&gt;&lt;P&gt;            pa-dsn RADIOBUTTON GROUP x1 DEFAULT 'X'.&lt;/P&gt;&lt;P&gt;PARAMETERS: pa-name LIKE rlgrap-filename DEFAULT '/tmp'.&lt;/P&gt;&lt;P&gt;SELECTION-SCREEN END OF BLOCK 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT * FROM prps INTO ws_prps WHERE pbukr IN so-pbukr&lt;/P&gt;&lt;P&gt;                                    AND erdat IN so-erdat&lt;/P&gt;&lt;P&gt;                                    AND pspnr IN so-pspnr.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      APPEND ws_prps.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END-OF-SELECTION.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   PERFORM download_prps.&lt;/P&gt;&lt;P&gt;  PERFORM write_dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM download_prps.&lt;/P&gt;&lt;P&gt;*download to local pc.&lt;/P&gt;&lt;P&gt;  name = 'C:\prps.dat'.&lt;/P&gt;&lt;P&gt;  typ  = 'ASC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  BIN_FILESIZE                  =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;      filename                      = name&lt;/P&gt;&lt;P&gt;     filetype                      = 'ASC'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  FILELENGTH                    =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      data_tab                      = ws_prps&lt;/P&gt;&lt;P&gt;   EXCEPTIONS&lt;/P&gt;&lt;P&gt;     file_write_error              = 1&lt;/P&gt;&lt;P&gt;     no_batch                      = 2&lt;/P&gt;&lt;P&gt;     gui_refuse_filetransfer       = 3&lt;/P&gt;&lt;P&gt;     invalid_type                  = 4&lt;/P&gt;&lt;P&gt;     OTHERS                        = 5&lt;/P&gt;&lt;P&gt;            .&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM write_dataset.&lt;/P&gt;&lt;P&gt;  CONCATENATE pa-name '/prps_' sy-datum '.dat' INTO pa-name.&lt;/P&gt;&lt;P&gt;  OPEN DATASET pa-name FOR OUTPUT IN TEXT MODE. "encoding default.&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    LOOP AT ws_prps. " into wa_prps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      TRANSFER ws_prps TO pa-name LENGTH 9999.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;  CLOSE DATASET pa-name.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;sample downloaded data.,&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;RM        3                                                                                00000000OC                0000001                                   INST RISER (STALK-ON) @ BADP-A                       00000000                              00000000                  000000000000     &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 08:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849099#M667538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T08:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in downloaded data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849100#M667539</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; try using  'DAT' instead of 'ASC'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GUI_DOWNLOAD'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;BIN_FILESIZE =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;filename = name&lt;/P&gt;&lt;P&gt;filetype = 'DAT'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;FILELENGTH =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;data_tab = ws_prps&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;file_write_error = 1&lt;/P&gt;&lt;P&gt;no_batch = 2&lt;/P&gt;&lt;P&gt;gui_refuse_filetransfer = 3&lt;/P&gt;&lt;P&gt;invalid_type = 4&lt;/P&gt;&lt;P&gt;OTHERS = 5&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 09:14:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849100#M667539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T09:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in downloaded data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849101#M667540</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;Before downloading just copied this field to a 'char' field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kuntal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 09:25:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849101#M667540</guid>
      <dc:creator>former_member376453</dc:creator>
      <dc:date>2007-09-19T09:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in downloaded data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849102#M667541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I  used DAT instead of ASC but unable to create file in application server if I user DAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me what to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Line&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 10:07:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849102#M667541</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T10:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in downloaded data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849103#M667542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u can use OPEN dataset .. and closedataset to download the files to application server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;chet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 11:14:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-in-downloaded-data/m-p/2849103#M667542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T11:14:02Z</dc:date>
    </item>
  </channel>
</rss>

