<?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 Re: Reg unicode issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716581#M894677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report message-id zmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of it_data ,&lt;/P&gt;&lt;P&gt;       matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;      end of it_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_final type it_data ,&lt;/P&gt;&lt;P&gt;      it_final type standard table of it_data with header line .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters:p_file type rlgrap-filename.&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;it_final-matnr = '000000323223'.&lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final-matnr = '000000323223'.&lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final-matnr = '000000323223'.&lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data : p_file TYPE rlgrap-filename value '/TCD/BI/text1.dat'.&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Display error messages if any.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE e000 with 'File cannot be opened'.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Data is downloaded to the application server file&lt;/P&gt;&lt;P&gt;LOOP AT IT_FINAL INTO WA_FINAL.&lt;/P&gt;&lt;P&gt;TRANSFER WA_FINAL TO p_file.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Close the Application server file (Mandatory).&lt;/P&gt;&lt;P&gt;CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;write: 'File downloaded in Application server' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 May 2008 11:47:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-05-03T11:47:25Z</dc:date>
    <item>
      <title>Reg unicode issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716579#M894675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    i need help on following issue,  the following code run in non unicode system and the file downloaded without any problem . now the system changed  into unicode now its giving error when executing.&lt;/P&gt;&lt;P&gt;it makes error on TRANSFER WA_FI_FINAL TO W_file , the work area contains i, c, n , type datas please give correct code for the unicode &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*data : p_file TYPE rlgrap-filename value '/TCD/BI/text1.dat'.
OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.

*Display error messages if any.
IF sy-subrc NE 0.
MESSAGE e000 with 'File cannot be opened'.
EXIT.
ELSE.

*---Data is downloaded to the application server file

CLEAR : WA_FI_FINAL.

LOOP AT IT_FI_FINAL INTO WA_FI_FINAL.
TRANSFER WA_FI_FINAL TO W_file.
ENDLOOP.
ENDIF.

*--Close the Application server file (Mandatory).
CLOSE DATASET p_file.
write: 'File downloaded in Application server'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2008 11:35:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716579#M894675</guid>
      <dc:creator>mohan_subramania</dc:creator>
      <dc:date>2008-05-03T11:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Reg unicode issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716580#M894676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Firstly, in Unicode programs, the file format must be specified more precisely for OPEN DATASET  fand, secondly, only purely character-type structures can still be written to text files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use LEGACY TEXT MODE  which ensures that the data is stored and read in the old non-Unicode format. In this mode, it is also possible to read or write non-character-type structures. However, be aware that data loss and conversion errors can occur in Unicode systems if there are characters in the structure that cannot be represented in the non-Unicode codepage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example.&lt;/P&gt;&lt;P&gt;open dataset DSN in legacy text mode for output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Saravanan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward points if useful&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2008 11:46:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716580#M894676</guid>
      <dc:creator>former_member254848</dc:creator>
      <dc:date>2008-05-03T11:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reg unicode issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716581#M894677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check this..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;report message-id zmsg.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of it_data ,&lt;/P&gt;&lt;P&gt;       matnr like mara-matnr,&lt;/P&gt;&lt;P&gt;      end of it_data .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: wa_final type it_data ,&lt;/P&gt;&lt;P&gt;      it_final type standard table of it_data with header line .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters:p_file type rlgrap-filename.&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;it_final-matnr = '000000323223'.&lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final-matnr = '000000323223'.&lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_final-matnr = '000000323223'.&lt;/P&gt;&lt;P&gt;append it_final.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*data : p_file TYPE rlgrap-filename value '/TCD/BI/text1.dat'.&lt;/P&gt;&lt;P&gt;OPEN DATASET p_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT IGNORING CONVERSION ERRORS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Display error messages if any.&lt;/P&gt;&lt;P&gt;IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;MESSAGE e000 with 'File cannot be opened'.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ELSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---Data is downloaded to the application server file&lt;/P&gt;&lt;P&gt;LOOP AT IT_FINAL INTO WA_FINAL.&lt;/P&gt;&lt;P&gt;TRANSFER WA_FINAL TO p_file.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Close the Application server file (Mandatory).&lt;/P&gt;&lt;P&gt;CLOSE DATASET p_file.&lt;/P&gt;&lt;P&gt;write: 'File downloaded in Application server' .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;venkat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2008 11:47:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716581#M894677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-03T11:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reg unicode issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716582#M894678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;WA_FI_FINAL must be of type c.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2008 11:51:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716582#M894678</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-03T11:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Reg unicode issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716583#M894679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats right it should be of type C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Saravanan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2008 11:52:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716583#M894679</guid>
      <dc:creator>former_member254848</dc:creator>
      <dc:date>2008-05-03T11:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reg unicode issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716584#M894680</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;Check your structure WA_FI_FINAL.Does it have fileds whose data types are other than C,N,D,T.If yes,then you might need to change the data type of the structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2008 13:14:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716584#M894680</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-05-03T13:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reg unicode issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716585#M894681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar issue and I solved it in this fashion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA : lf_field TYPE string,
lf_line TYPE string.
FIELD-SYMBOLS: &amp;lt;fs_field&amp;gt;,&amp;lt;fs_comp&amp;gt;.

LOOP AT p_gt_itab ASSIGNING &amp;lt;fs_field&amp;gt;.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE &amp;lt;fs_field&amp;gt; TO &amp;lt;fs_comp&amp;gt;.
IF sy-subrc &amp;lt;&amp;gt; 0.
EXIT.
ENDIF.
lf_field = &amp;lt;fs_comp&amp;gt;.
IF sy-index = 1.
lf_line = lf_field.
ELSE.
CONCATENATE lf_line lf_field INTO lf_line SEPARATED BY c_tab.
ENDIF.
CLEAR lf_field.
ENDDO.
APPEND lf_line TO p_gt_ittab.
ENDLOOP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 May 2008 16:06:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/reg-unicode-issue/m-p/3716585#M894681</guid>
      <dc:creator>former_member156446</dc:creator>
      <dc:date>2008-05-03T16:06:42Z</dc:date>
    </item>
  </channel>
</rss>

