<?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: Failure in creating a dynamic structure in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/failure-in-creating-a-dynamic-structure/m-p/7814795#M1588363</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andre,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're getting the error message because the param P_STRICT of the method CREATE( ) is set to TRUE(by default).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you set the creation mode as "strict"(P_STRICT = CL_ABAP_STRUCTDESCR=&amp;gt;TRUE), no special characters are allowed in the column names! Since your component names contain a '-' you're getting the exception CX_SY_STRUCT_COMP_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you set the creation mode as "non-strict"(P_STRICT = CL_ABAP_STRUCTDESCR=&amp;gt;FALSE), following spl. characters are allowed: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;#$%&amp;amp;*-/;&amp;lt;=&amp;gt;?@^{ | }&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in your call you need to set the "non-strict" mode while creating the dynamic structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*   Get the Dynamic structure definition
    TRY.
        lo_structdescr =
          cl_abap_structdescr=&amp;gt;create(
              p_components = lt_struc_comp
              p_strict     = cl_abap_structdescr=&amp;gt;false ).
      CATCH cx_sy_struct_creation .                     "#EC NO_HANDLER
    ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i'm clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Check the source code of CREATE( ) if you want to validate &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 May 2011 05:41:19 GMT</pubDate>
    <dc:creator>SuhaSaha</dc:creator>
    <dc:date>2011-05-10T05:41:19Z</dc:date>
    <item>
      <title>Failure in creating a dynamic structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failure-in-creating-a-dynamic-structure/m-p/7814794#M1588362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i get a strange failure while creating a structure from components. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lr_out_tab ?= cl_abap_tabledescr=&amp;gt;describe_by_data( it_outtab ).&lt;/P&gt;&lt;P&gt;lr_out_struc ?= lr_out_tab-&amp;gt;get_table_line_type( ).&lt;/P&gt;&lt;P&gt;lt_out_comp  = lr_out_struc-&amp;gt;get_components( ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lr_new_struc  = cl_abap_structdescr=&amp;gt;create( lt_out_comp ). &amp;lt;-- cx_sy_struct_comp_name exception&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get this failure, when i have component-names like xxx-yyyy. Does somebody have an idea how to slove this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings &lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 May 2011 14:49:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failure-in-creating-a-dynamic-structure/m-p/7814794#M1588362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-09T14:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Failure in creating a dynamic structure</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/failure-in-creating-a-dynamic-structure/m-p/7814795#M1588363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andre,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're getting the error message because the param P_STRICT of the method CREATE( ) is set to TRUE(by default).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you set the creation mode as "strict"(P_STRICT = CL_ABAP_STRUCTDESCR=&amp;gt;TRUE), no special characters are allowed in the column names! Since your component names contain a '-' you're getting the exception CX_SY_STRUCT_COMP_NAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you set the creation mode as "non-strict"(P_STRICT = CL_ABAP_STRUCTDESCR=&amp;gt;FALSE), following spl. characters are allowed: &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;#$%&amp;amp;*-/;&amp;lt;=&amp;gt;?@^{ | }&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in your call you need to set the "non-strict" mode while creating the dynamic structure:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*   Get the Dynamic structure definition
    TRY.
        lo_structdescr =
          cl_abap_structdescr=&amp;gt;create(
              p_components = lt_struc_comp
              p_strict     = cl_abap_structdescr=&amp;gt;false ).
      CATCH cx_sy_struct_creation .                     "#EC NO_HANDLER
    ENDTRY.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope i'm clear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: Check the source code of CREATE( ) if you want to validate &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 05:41:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/failure-in-creating-a-dynamic-structure/m-p/7814795#M1588363</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-05-10T05:41:19Z</dc:date>
    </item>
  </channel>
</rss>

