<?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: Unicode, assignment. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693063#M889304</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;In Unicode environment while moving values between variables, the variables of same type. For this you need to do try lile this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zaRs
       no standard page heading
       line-size 255.

begin of struct1,
  x1(1) type x,
end of struct1.

data: xcontent  type xstring,
      content   type string,
      conv      type ref to cl_abap_conv_in_ce,
      len       type i.

struct1-x1 = '1C'.

xcontent = struct1-x1.                       

conv = cl_abap_conv_in_ce=&amp;gt;create( input = xcontent ).
conv-&amp;gt;read( importing data = content len = len ).

struct2-c1 = content.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Apr 2008 15:09:34 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2008-04-14T15:09:34Z</dc:date>
    <item>
      <title>Unicode, assignment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693059#M889300</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; I have a question related to the Unicode System...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a piece of code writeen in non-unicode...&lt;/P&gt;&lt;P&gt;  data:&lt;/P&gt;&lt;P&gt;     begin of struct1,&lt;/P&gt;&lt;P&gt;        x1(1) type x,&lt;/P&gt;&lt;P&gt;     end of struct1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;   begin of struct2,&lt;/P&gt;&lt;P&gt;       c1(10) type c,&lt;/P&gt;&lt;P&gt;   end of struct2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct1-x1 = '1C'.&lt;/P&gt;&lt;P&gt;struct2-c1 = struct1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*struct2-c1 = struct1. this type of assigment is not allowed in Unicode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how can i assign this in unicode System...&lt;/P&gt;&lt;P&gt;it's ugrent ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 12:50:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693059#M889300</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T12:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode, assignment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693060#M889301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;begin of struct1,&lt;/P&gt;&lt;P&gt;x1(1) type x,&lt;/P&gt;&lt;P&gt;end of struct1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;begin of struct2,&lt;/P&gt;&lt;P&gt;c1(10) type c,&lt;/P&gt;&lt;P&gt;end of struct2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct1-x1 = '1C'.&lt;/P&gt;&lt;P&gt;struct2-c1 = struct1-X1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 12:53:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693060#M889301</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T12:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode, assignment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693061#M889302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;    Unlike in Non-Unicode systems, we can not move data from one structure to other directly in Unicode enabled systems. We have to explicitly move field by field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Non-Unicode system:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;WA_FINAL&amp;gt; = &amp;lt;WA_IN&amp;gt;. " Is Valid&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Unicode System:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;WA_FINAL&amp;gt; = &amp;lt;WA_IN&amp;gt;. " Not Valid&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&amp;lt;WA_FINAL&amp;gt;-FLD1 = &amp;lt;WA_IN&amp;gt;-FLD1.
&amp;lt;WA_FINAL&amp;gt;-FLD2 = &amp;lt;WA_IN&amp;gt;-FLDn.
...&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below extract from Unicode document can help you understand conversions:&lt;/P&gt;&lt;P&gt;&amp;#149; Conversion between flat structures&lt;/P&gt;&lt;P&gt;To check whether conversion is permitted at all, the Unicode fragment view of&lt;/P&gt;&lt;P&gt;the structures is set up initially by combining character and byte type groups&lt;/P&gt;&lt;P&gt;and alignment gaps as well as any other components. If the type and length of&lt;/P&gt;&lt;P&gt;the fragments of the source structure are identical in the length of the shorter&lt;/P&gt;&lt;P&gt;structure, conversion is permitted. Assignment is allowed subject to the&lt;/P&gt;&lt;P&gt;fulfillment of the following conditions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;1. The fragments of both structures up to the second-last fragment of the
shorter structure are identical.
12
2. The last fragment of the shorter structure is a character or byte type group.
3. The corresponding fragment of the longer structure is a character or byte
type group with a greater length.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the target structure is longer than the source structure, the character-type&lt;/P&gt;&lt;P&gt;components of the remaining length are filled with blank characters. All other&lt;/P&gt;&lt;P&gt;components of the remaining length are filled with the type-adequate initial&lt;/P&gt;&lt;P&gt;value, and alignment gaps are filled with zero bytes. Since longer structures&lt;/P&gt;&lt;P&gt;were previously filled with blanks by default, using initial values for noncharacter-&lt;/P&gt;&lt;P&gt;type component types is incompatible. This incompatible change is,&lt;/P&gt;&lt;P&gt;however, rather an error correction. For reasons of compatibility, charactertype&lt;/P&gt;&lt;P&gt;components are not filled with initial values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;BEGIN OF struc1, 	BEGIN OF struc2,
a(1) TYPE C, 		  a(1) TYPE C,
x(1) TYPE X, 		  b(1) TYPE C,
END OF struc1. 		END OF struc2.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The assignment struc1 = struc2 is not allowed under Unicode since struc1-x in&lt;/P&gt;&lt;P&gt;contrast to struc2-b occupies only one byte.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;BEGIN OF struc3, 	BEGIN OF struc4,
a(2) TYPE C, 		  a(8) TYPE C,
n(6) TYPE N, 		  i TYPE I,
i TYPE I, 		  f TYPE F,
END OF struc3. 		END OF struc4.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The assignment struc3 = struc4 is allowed since the fragment views of the&lt;/P&gt;&lt;P&gt;character-type fields and the integer are identical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;BEGIN OF struc5, 	BEGIN OF struc6,
a(1) TYPE X, 		  a(1) TYPE X,
b(1) TYPE X, 		  BEGIN OF STRUC3,
c(1) TYPE C, 		    b(1) TYPE X,
END OF struc5. 		    c(1) TYPE C,
			  END OF struc3,
			END OF struc6.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struc5 = struc6 is again not permitted since the fragment views of both&lt;/P&gt;&lt;P&gt;structures are not identical due to the alignment gaps before struc3 and struc3-&lt;/P&gt;&lt;P&gt;c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;BEGIN OF struc7, 	BEGIN OF struc8,
p(8) TYPE P, 		  p(8) TYPE P,
c(1) TYPE C, 		  c(5) TYPE C,
END OF struc7. 		  o(8) TYPE P,
			END OF struc8.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The assignment struc7 = struc8 works since the Unicode fragment views are&lt;/P&gt;&lt;P&gt;identical with regard to the length of structure struc1.&lt;/P&gt;&lt;P&gt;For deep structures, the operand types must be compatible as usual. As an&lt;/P&gt;&lt;P&gt;enhancement measure, we slightly generalized the convertibility in case of&lt;/P&gt;&lt;P&gt;object references and table components.&lt;/P&gt;&lt;P&gt;&amp;#149; Conversion between structures and single fields&lt;/P&gt;&lt;P&gt;The following rules apply for converting a structure into a single field and vice&lt;/P&gt;&lt;P&gt;versa:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;1. If a structure is purely character-type, it is treated like a C field during
conversion.
2. If the single field is of type C, but only part of the structure is charactertype,
conversion is only possible if the structure begins with a character13
type structure and if this structure is at least as long as the single field.
Conversion now takes place between the first character-type group of the
structure and the single field. If the structure is the target field, the
character type sections of the remainder are filled with blanks, and all other
components are filled with the type-adequate initial value.
3. Conversion is not permitted if the structure is not purely character-type and
if the single field is not of type C.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As with the assignment between structures, filling non-character-type&lt;/P&gt;&lt;P&gt;components with the initial value is incompatible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;raam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Apr 14, 2008 11:23 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 12:58:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693061#M889302</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T12:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode, assignment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693062#M889303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi PBS,&lt;/P&gt;&lt;P&gt;   Thanks for ur time , but my problem is not yet solved.&lt;/P&gt;&lt;P&gt;when i try to assign struct1 = struct2-x1. &lt;/P&gt;&lt;P&gt;then the values are internally getting changed, that can be seen in debugging mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for my code it's something like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Debug Mode:&lt;/P&gt;&lt;P&gt;In non-unicode :&lt;/P&gt;&lt;P&gt;     struct1-x1 = C1&lt;/P&gt;&lt;P&gt;     struct1 = C1&lt;/P&gt;&lt;P&gt;     struct2-c1 = 1C202020202020202020.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In unicode :&lt;/P&gt;&lt;P&gt;     struct1-x1 = C1&lt;/P&gt;&lt;P&gt;     struct2-c1 = 31432020202020202020.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how i can get the same value what there in non-unicode&lt;/P&gt;&lt;P&gt;in unicode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Syed Abdul Adil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 15:00:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693062#M889303</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T15:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode, assignment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693063#M889304</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;In Unicode environment while moving values between variables, the variables of same type. For this you need to do try lile this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

report zaRs
       no standard page heading
       line-size 255.

begin of struct1,
  x1(1) type x,
end of struct1.

data: xcontent  type xstring,
      content   type string,
      conv      type ref to cl_abap_conv_in_ce,
      len       type i.

struct1-x1 = '1C'.

xcontent = struct1-x1.                       

conv = cl_abap_conv_in_ce=&amp;gt;create( input = xcontent ).
conv-&amp;gt;read( importing data = content len = len ).

struct2-c1 = content.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 15:09:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693063#M889304</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-04-14T15:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Unicode, assignment.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693064#M889305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the post it was realy helpful,&lt;/P&gt;&lt;P&gt;on the similar issue i have one more question .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In non-uncode system:&lt;/P&gt;&lt;P&gt;data: &lt;/P&gt;&lt;P&gt;   begin of struct,&lt;/P&gt;&lt;P&gt;       x1(1) type x,&lt;/P&gt;&lt;P&gt;   end of struct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;    c1 type c value 'C'.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;struct1 = c1.&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;In unicode system &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;struct1 = c1 is not allowed.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If i assign struct1-x1 = c1, intenally the values value are getting changed that can be seen in debug mode .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so how can i assign this in unicode system with out the values to be changed ...&lt;/P&gt;&lt;P&gt;please reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Syed Abdul Adil.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Apr 2008 19:44:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/unicode-assignment/m-p/3693064#M889305</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-14T19:44:24Z</dc:date>
    </item>
  </channel>
</rss>

