<?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: xml conversion of data refs with dynamic type in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-conversion-of-data-refs-with-dynamic-type/m-p/7546167#M1562949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I reached same problem with dynamic data references, the only solution I got is to used global DDIC types (also for table types !!) when creating data which needs to be serialized. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The options technical_types = 'ignore' doesn't solve the problem - it just instructs the parser to skip data references without global ddic type. The options value_handling = 'move' is very helpful as XML serialization is very picky about values beeing serialized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is summary of my observations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Global DDIC type has to be associated with data reference, otherwise only technical type is there and this is not supported (you can use OPTIONS TECHNICAL_TYPES = u2018IGNOREu2019 but this will just skip the data to be serialized to XML) u2026&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- The above means that if you are serializing data reference to table then you have to have also global DDIC type for the table-type !! Unfortunatelly there is no default table type available for transparent tables u2026. They are treated as structures not as table-types u2026 thus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- CREATE DATA lr_data TYPE &lt;STRONG&gt;&amp;lt;global_ddic_structure&amp;gt; - can be serialized&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- CREATE DATA lr_data TYPE &lt;STRONG&gt;STANDARD TABLE OF &amp;lt;global_ddic_structure&amp;gt; - cannot be serialized&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- CREATE DATA lr_data TYPE &lt;STRONG&gt;&amp;lt;global_ddic_table_type&amp;gt; - can be serialized&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- &lt;STRONG&gt;!! Unfortunatelly !!&lt;/STRONG&gt; CREATE DATA lr_data TYPE &lt;STRONG&gt;&amp;lt;type_pool_ddic_structure/ type_pool_table_type&amp;gt; - also cannot be serialized u2013 this is pitty u2026 this should be supported u2026.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 May 2011 00:44:42 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-05-23T00:44:42Z</dc:date>
    <item>
      <title>xml conversion of data refs with dynamic type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-conversion-of-data-refs-with-dynamic-type/m-p/7546166#M1562948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Colleagues,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to create an XML from a TYPE REF TO DATA, where this data is created using a dynamic internal table. By dynamic internal table i mean that the internal table is created dynamically using the class method &lt;STRONG&gt;cl_alv_table_create=&amp;gt;create_dynamic_table&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the problem that i face is when i use the statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSFORMATION id&lt;/P&gt;&lt;P&gt;      SOURCE jsag_data = im_context_b64&lt;/P&gt;&lt;P&gt;      RESULT XML lv_xml&lt;/P&gt;&lt;P&gt;      OPTIONS data_refs = 'embedded'&lt;/P&gt;&lt;P&gt;              value_handling = 'move'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to generate the XML i get a dump of type CX_XSLT_SERIALIZATION_ERROR saying "The ABAP data cannot be serialized."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a solution to avoid the dump by adding the additional option " TECHNICAL_TYPES = 'ignore' " to the  CALL TRANSFORMATION statement, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL TRANSFORMATION id&lt;/P&gt;&lt;P&gt;      SOURCE jsag_data = im_context_b64&lt;/P&gt;&lt;P&gt;      RESULT XML lv_xml&lt;/P&gt;&lt;P&gt;      OPTIONS data_refs = 'embedded'&lt;/P&gt;&lt;P&gt;              value_handling = 'move'&lt;/P&gt;&lt;P&gt;              TECHNICAL_TYPES = 'ignore'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, using this addition the dynamic type ref to data part is totally ignored from the XML generation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use a specific DDIC table type to create the data, we do not face this issue and the XML is generated as desired&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a solution to this problem as it has become a sort of blockade for our development?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and Cheers,&lt;/P&gt;&lt;P&gt;Gaurav.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jan 2011 14:15:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-conversion-of-data-refs-with-dynamic-type/m-p/7546166#M1562948</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-13T14:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: xml conversion of data refs with dynamic type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-conversion-of-data-refs-with-dynamic-type/m-p/7546167#M1562949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I reached same problem with dynamic data references, the only solution I got is to used global DDIC types (also for table types !!) when creating data which needs to be serialized. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The options technical_types = 'ignore' doesn't solve the problem - it just instructs the parser to skip data references without global ddic type. The options value_handling = 'move' is very helpful as XML serialization is very picky about values beeing serialized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is summary of my observations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Global DDIC type has to be associated with data reference, otherwise only technical type is there and this is not supported (you can use OPTIONS TECHNICAL_TYPES = u2018IGNOREu2019 but this will just skip the data to be serialized to XML) u2026&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- The above means that if you are serializing data reference to table then you have to have also global DDIC type for the table-type !! Unfortunatelly there is no default table type available for transparent tables u2026. They are treated as structures not as table-types u2026 thus:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- CREATE DATA lr_data TYPE &lt;STRONG&gt;&amp;lt;global_ddic_structure&amp;gt; - can be serialized&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- CREATE DATA lr_data TYPE &lt;STRONG&gt;STANDARD TABLE OF &amp;lt;global_ddic_structure&amp;gt; - cannot be serialized&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- CREATE DATA lr_data TYPE &lt;STRONG&gt;&amp;lt;global_ddic_table_type&amp;gt; - can be serialized&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- &lt;STRONG&gt;!! Unfortunatelly !!&lt;/STRONG&gt; CREATE DATA lr_data TYPE &lt;STRONG&gt;&amp;lt;type_pool_ddic_structure/ type_pool_table_type&amp;gt; - also cannot be serialized u2013 this is pitty u2026 this should be supported u2026.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2011 00:44:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-conversion-of-data-refs-with-dynamic-type/m-p/7546167#M1562949</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-23T00:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: xml conversion of data refs with dynamic type</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/xml-conversion-of-data-refs-with-dynamic-type/m-p/7546168#M1562950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! This solved my Problem. And with DATA_REFS = 'embedded' the Transformation now also provides json with correct hierarchy structure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 13:35:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/xml-conversion-of-data-refs-with-dynamic-type/m-p/7546168#M1562950</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-12-14T13:35:55Z</dc:date>
    </item>
  </channel>
</rss>

