<?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 Exchange XML document containing serialized DDIC objects in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/exchange-xml-document-containing-serialized-ddic-objects/m-p/2014917#M411670</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;Suppose you have an itab "z_table" with generic linetype. The table may contain any ddic structure or table. &lt;/P&gt;&lt;P&gt;Furhter you want to exchange the itab "z_table" between the Systems A and B using XML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using the following code to serialize the itab "z_table" in system A:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: g_ixml TYPE REF TO if_ixml,
        g_stream_factory TYPE REF TO if_ixml_stream_factory,
        g_encoding TYPE REF TO if_ixml_encoding,
        ostream TYPE REF TO if_ixml_ostream.

  CONSTANTS: encoding TYPE string VALUE 'utf-8'.

  g_ixml = cl_ixml=&amp;gt;create( ).
  g_stream_factory = g_ixml-&amp;gt;create_stream_factory( ).
  g_encoding = g_ixml-&amp;gt;create_encoding(
    character_set = encoding
    byte_order = 0 ).

  ostream = g_stream_factory-&amp;gt;create_ostream_xstring( string = ex_xml_string ).
  ostream-&amp;gt;set_encoding( encoding = g_encoding ).

  CALL TRANSFORMATION id_indent
    SOURCE z_table = z_table
    RESULT XML xml_string
    OPTIONS data_refs = 'heap'
            xml_header = 'full'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the following code to deserialize the itab in system B:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL TRANSFORMATION id_indent
    SOURCE XML xml_string
    RESULT z_table = z_table.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The serialization in System A creates an XML document containing &amp;lt;dic:z_structure&amp;gt; tags. If you now try to deserialize this document ("z_table")&lt;/P&gt;&lt;P&gt;in System B, the deserialization fails in case z_table contains DDIC structures which are not known in system B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to have the definition (e.g. type + length) of those ddic structures included in the XML document, so that&lt;/P&gt;&lt;P&gt;a deserialization is possible even if the ddic structure is not known in system B? e.g. Rendered into a XML scheme, or directly as an &lt;/P&gt;&lt;P&gt;attribute into the &amp;lt;dic:..&amp;gt; tag for instance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas are appreciated..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Georg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Mar 2007 08:01:17 GMT</pubDate>
    <dc:creator>former_member256416</dc:creator>
    <dc:date>2007-03-16T08:01:17Z</dc:date>
    <item>
      <title>Exchange XML document containing serialized DDIC objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exchange-xml-document-containing-serialized-ddic-objects/m-p/2014917#M411670</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;Suppose you have an itab "z_table" with generic linetype. The table may contain any ddic structure or table. &lt;/P&gt;&lt;P&gt;Furhter you want to exchange the itab "z_table" between the Systems A and B using XML.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are using the following code to serialize the itab "z_table" in system A:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  DATA: g_ixml TYPE REF TO if_ixml,
        g_stream_factory TYPE REF TO if_ixml_stream_factory,
        g_encoding TYPE REF TO if_ixml_encoding,
        ostream TYPE REF TO if_ixml_ostream.

  CONSTANTS: encoding TYPE string VALUE 'utf-8'.

  g_ixml = cl_ixml=&amp;gt;create( ).
  g_stream_factory = g_ixml-&amp;gt;create_stream_factory( ).
  g_encoding = g_ixml-&amp;gt;create_encoding(
    character_set = encoding
    byte_order = 0 ).

  ostream = g_stream_factory-&amp;gt;create_ostream_xstring( string = ex_xml_string ).
  ostream-&amp;gt;set_encoding( encoding = g_encoding ).

  CALL TRANSFORMATION id_indent
    SOURCE z_table = z_table
    RESULT XML xml_string
    OPTIONS data_refs = 'heap'
            xml_header = 'full'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the following code to deserialize the itab in system B:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
  CALL TRANSFORMATION id_indent
    SOURCE XML xml_string
    RESULT z_table = z_table.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The serialization in System A creates an XML document containing &amp;lt;dic:z_structure&amp;gt; tags. If you now try to deserialize this document ("z_table")&lt;/P&gt;&lt;P&gt;in System B, the deserialization fails in case z_table contains DDIC structures which are not known in system B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to have the definition (e.g. type + length) of those ddic structures included in the XML document, so that&lt;/P&gt;&lt;P&gt;a deserialization is possible even if the ddic structure is not known in system B? e.g. Rendered into a XML scheme, or directly as an &lt;/P&gt;&lt;P&gt;attribute into the &amp;lt;dic:..&amp;gt; tag for instance?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas are appreciated..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Georg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 08:01:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exchange-xml-document-containing-serialized-ddic-objects/m-p/2014917#M411670</guid>
      <dc:creator>former_member256416</dc:creator>
      <dc:date>2007-03-16T08:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange XML document containing serialized DDIC objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exchange-xml-document-containing-serialized-ddic-objects/m-p/2014918#M411671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use FM &lt;/P&gt;&lt;P&gt;call function 'TR_NAMETAB_GET'&lt;/P&gt;&lt;P&gt;  exporting&lt;/P&gt;&lt;P&gt;    iv_tabname                 = 'SLFIGHT'&lt;/P&gt;&lt;P&gt;    iv_get_lengths_in_charmode = ' '&lt;/P&gt;&lt;P&gt;    iv_get_texts               = 'X'&lt;/P&gt;&lt;P&gt;  importing&lt;/P&gt;&lt;P&gt;    et_dfies                   = lt_dfies&lt;/P&gt;&lt;P&gt;  exceptions&lt;/P&gt;&lt;P&gt;    not_found                  = 1&lt;/P&gt;&lt;P&gt;    others                     = 2.&lt;/P&gt;&lt;P&gt;if sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;*--- Do nothing in this particular case&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;to get the table definition and use call transformation to convert this itab to xml  to get the table definition details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2007 07:27:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exchange-xml-document-containing-serialized-ddic-objects/m-p/2014918#M411671</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2007-03-18T07:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Exchange XML document containing serialized DDIC objects</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/exchange-xml-document-containing-serialized-ddic-objects/m-p/2014919#M411672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Raja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks first for your answer. I tried the FM and got a table with the definition details I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I'm not really sure, how to continue working with the definition details. There are still some questions open: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- How do I proficient include these table details into my xml with my original table z_table? Would it be possible to include the table details in a way, that a "call transformation" can easily deserialize my z_table with this table details?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- How do I convert the lt_dfies table definition details back to a ddic object that I can use? Can this be done in memory only, so that I don't have to create real ddic objects on the target system?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks and kind regards, Oliver&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&amp;lt;b&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2007 11:34:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/exchange-xml-document-containing-serialized-ddic-objects/m-p/2014919#M411672</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-23T11:34:34Z</dc:date>
    </item>
  </channel>
</rss>

