<?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: Conversion between single field and structure in unicode in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720025#M314319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the problem is to do conversation exactly to the structure,that consists not only from char fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Nov 2006 07:16:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-13T07:16:39Z</dc:date>
    <item>
      <title>Conversion between single field and structure in unicode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720022#M314316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to do conversation between data, stored in large char variable, and structure, that consists not only from char fields. In non-Unicode system "MOVE charstring TO structure" worked fine, but now this way isn't possible.&lt;/P&gt;&lt;P&gt;How can change the code to make it compatible with unicode?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2006 08:22:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720022#M314316</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-11T08:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion between single field and structure in unicode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720023#M314317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aleksandr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  I know it is pain taking but the way to go is explicitly moving to each field separately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Eg:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;    move: charstring+0(18) to struc-matnr,
              charstring+18(4) to struc-werks
    ------&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2006 09:07:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720023#M314317</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-11T09:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion between single field and structure in unicode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720024#M314318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Aleksandr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A more dynamic approach is demonstrated in the following sample coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: 
  ls_struc      TYPE &amp;lt;your table/structure&amp;gt;,
  lt_dfies       TYPE ddfields,
  ls_dfies      TYPE dfies.

FIELD-SYMBOLS:
  &amp;lt;ld_fld&amp;gt;     TYPE any.

  CALL FUNCTION 'DDIF_FIELDINFO_GET'
    EXPORTING
      tabname              = &amp;lt;name of table/structure&amp;gt;
    TABLES
      DFIES_TAB            = lt_dfies
    EXCEPTIONS
      NOT_FOUND            = 1
      INTERNAL_ERROR       = 2
      OTHERS               = 3.
  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.
  

  LOOP AT lt_dfies INTO ls_dfies.
    ASSIGN COMPONENT (ls_dfies-fieldname) OF STRUCTURE ls_struc TO &amp;lt;ld_fld&amp;gt;.

   &amp;lt;ld_fld&amp;gt; = ld_string+ls_dfies-offset(ls_dfies-intlen).
  ENDLOOP.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine for all character-based fields. However, I have not found yet an elegant solution if the field has &amp;lt;b&amp;gt;INTTYPE = 'P'&amp;lt;/b&amp;gt; (e.g. QUAN or DEC fields) because there can be a difference in length between INTLEN and OUTPUTLEN.&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;  Uwe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2006 15:41:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720024#M314318</guid>
      <dc:creator>uwe_schieferstein</dc:creator>
      <dc:date>2006-11-11T15:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion between single field and structure in unicode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720025#M314319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But the problem is to do conversation exactly to the structure,that consists not only from char fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 07:16:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720025#M314319</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T07:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Conversion between single field and structure in unicode</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720026#M314320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aleksandr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try as below:&lt;/P&gt;&lt;P&gt;1. Use FM: GET_COMPONENT_LIST to extract the structure definition. This FM will give us the details of the fields and their lengths.&lt;/P&gt;&lt;P&gt;2. Using the above info, we know where exactly we need to split the string to each individual field of the structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So by the above method, we can dynamically pass the data of the string to respective fields of the structure without going through more pain.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eswar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Nov 2006 07:26:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/conversion-between-single-field-and-structure-in-unicode/m-p/1720026#M314320</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-13T07:26:27Z</dc:date>
    </item>
  </channel>
</rss>

