<?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: How to create dynamic types? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699102#M1104290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers friends! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Somehow the last answer was the closest to solve the problem.&lt;/P&gt;&lt;P&gt;But finally i descided not to use dynamical types due to the fact that i would have had to change the whole programm logic without even knowing wether i would recieve better performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway thanks J.Soiné&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Nov 2008 10:28:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-11-09T10:28:56Z</dc:date>
    <item>
      <title>How to create dynamic types?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699098#M1104286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi gurus!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to refer on a strucutre, whose components' definitions are available only during runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The type which i want to refer on should be a structure with one component, which is a CHAR with variable length. (i.e. the VALUE of the component's parameter LENGTH is evaluated during runtime).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any hints are welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With best regards Jonas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Nov 2008 13:43:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699098#M1104286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-02T13:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to create dynamic types?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699099#M1104287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, Jonas Soiné,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think that following code will help you.&lt;/P&gt;&lt;P&gt;____________________________________&lt;/P&gt;&lt;P&gt; TYPES : BEGIN OF my_type,&lt;/P&gt;&lt;P&gt;  char(10) TYPE c,&lt;/P&gt;&lt;P&gt;  END OF my_type.&lt;/P&gt;&lt;P&gt;DATA my_type_variable TYPE my_type.&lt;/P&gt;&lt;P&gt;my_type_variable-char = 'asdfas'.&lt;/P&gt;&lt;P&gt;WRITE: my_type_variable-char.&lt;/P&gt;&lt;P&gt;____________________________________&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Faisal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Nov 2008 13:55:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699099#M1104287</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-02T13:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create dynamic types?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699100#M1104288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jones,&lt;/P&gt;&lt;P&gt;For your requirement you nedd to play with the Field Symbols. &lt;/P&gt;&lt;P&gt;By Field Symbosl  you can assign it to strucuture during runtime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see the link below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm" target="test_blank"&gt;http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/field_sy.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chidanand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Nov 2008 15:23:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699100#M1104288</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-02T15:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to create dynamic types?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699101#M1104289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use &lt;STRONG&gt;cl_abap_elemdescr=&amp;gt;get_c( length )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: r_stru TYPE REF TO cl_abap_structdescr,
      it_comp TYPE cl_abap_structdescr=&amp;gt;component_table,
      r_comp TYPE abap_componentdescr,
      r_elem TYPE REF TO cl_abap_elemdescr,
      r_data TYPE REF TO data.

DATA: length_of_field TYPE i VALUE 10.

FIELD-SYMBOLS: &amp;lt;fs&amp;gt; TYPE ANY.

START-OF-SELECTION.

r_elem = cl_abap_elemdescr=&amp;gt;get_c( length_of_field ).

r_comp-name = 'FIELD1'.
r_comp-type = r_elem.
append r_comp to it_comp.

r_stru = cl_abap_structdescr=&amp;gt;create( it_comp ).

CREATE DATA r_data TYPE HANDLE r_stru.

ASSIGN r_data-&amp;gt;('FIELD1') TO &amp;lt;fs&amp;gt;.

&amp;lt;fs&amp;gt; = 'ABC'.

WRITE: / &amp;lt;fs&amp;gt;.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Nov 2008 15:34:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699101#M1104289</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-02T15:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to create dynamic types?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699102#M1104290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cheers friends! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Somehow the last answer was the closest to solve the problem.&lt;/P&gt;&lt;P&gt;But finally i descided not to use dynamical types due to the fact that i would have had to change the whole programm logic without even knowing wether i would recieve better performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway thanks J.Soiné&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Nov 2008 10:28:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-create-dynamic-types/m-p/4699102#M1104290</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-11-09T10:28:56Z</dc:date>
    </item>
  </channel>
</rss>

