<?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 ABAP DECOMPRESS to String/xml in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-decompress-to-string-xml/m-p/766714#M37668</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
  &lt;P&gt;I have a requirement to decompress a data which is stored in a table.&lt;/P&gt;
  &lt;P&gt; The data was compressed by the below code and stored in a table:&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;EXPORT xtyp = ps_req TO DATA BUFFER ls_pers-input COMPRESSION ON.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I have downloaded the compressed data to a flat file but lost on how to decompress it and view the actual contents. &lt;/P&gt;
  &lt;P&gt;P.S. I can only download the compressed data to use it in a program for decompressing task. For environmental constraints I will not be able to query the table&lt;/P&gt;
  &lt;P&gt;Any help on this is highly appreciated.&lt;/P&gt;
  &lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2019 17:22:36 GMT</pubDate>
    <dc:creator>prabhu_s2</dc:creator>
    <dc:date>2019-01-03T17:22:36Z</dc:date>
    <item>
      <title>ABAP DECOMPRESS to String/xml</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-decompress-to-string-xml/m-p/766714#M37668</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
  &lt;P&gt;I have a requirement to decompress a data which is stored in a table.&lt;/P&gt;
  &lt;P&gt; The data was compressed by the below code and stored in a table:&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;EXPORT xtyp = ps_req TO DATA BUFFER ls_pers-input COMPRESSION ON.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I have downloaded the compressed data to a flat file but lost on how to decompress it and view the actual contents. &lt;/P&gt;
  &lt;P&gt;P.S. I can only download the compressed data to use it in a program for decompressing task. For environmental constraints I will not be able to query the table&lt;/P&gt;
  &lt;P&gt;Any help on this is highly appreciated.&lt;/P&gt;
  &lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 17:22:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-decompress-to-string-xml/m-p/766714#M37668</guid>
      <dc:creator>prabhu_s2</dc:creator>
      <dc:date>2019-01-03T17:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP DECOMPRESS to String/xml</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-decompress-to-string-xml/m-p/766715#M37669</link>
      <description>&lt;P&gt;What is your question?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 20:07:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-decompress-to-string-xml/m-p/766715#M37669</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-01-03T20:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP DECOMPRESS to String/xml</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-decompress-to-string-xml/m-p/766716#M37670</link>
      <description>&lt;P&gt;As a  &lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; , I don't know what you want to do...&lt;/P&gt;&lt;P&gt;If you do something like I show bellow, you can easily import the data... Also, look in the ABAP documentation for more details of usage of IMPORT/EXPORT statements.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Pacheco.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;REPORT.

DATA: oref  TYPE REF TO data,
      input TYPE xstring.

FIELD-SYMBOLS: &amp;lt;spfli&amp;gt; TYPE STANDARD TABLE.

TRY .
    CREATE DATA oref TYPE STANDARD TABLE OF spfli WITH DEFAULT KEY.

    ASSIGN oref-&amp;gt;* TO &amp;lt;spfli&amp;gt;.

    SELECT * FROM spfli INTO TABLE &amp;lt;spfli&amp;gt; UP TO 50 ROWS.

    CALL TRANSFORMATION id SOURCE oref = &amp;lt;spfli&amp;gt; RESULT XML DATA(xml).

    EXPORT xml = xml TO DATA BUFFER input COMPRESSION ON.

    FREE: &amp;lt;spfli&amp;gt;[].
    IMPORT xml = xml FROM DATA BUFFER input.

    CALL TRANSFORMATION id SOURCE XML xml RESULT oref = &amp;lt;spfli&amp;gt;.

    cl_demo_output=&amp;gt;display( &amp;lt;spfli&amp;gt; ).

  CATCH cx_sy_create_data_error
        cx_root
  INTO DATA(err).
    cl_demo_output=&amp;gt;display( err-&amp;gt;get_text( ) ).
ENDTRY.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Jan 2019 00:21:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-decompress-to-string-xml/m-p/766716#M37670</guid>
      <dc:creator>raphael_almeida</dc:creator>
      <dc:date>2019-01-04T00:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP DECOMPRESS to String/xml</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-decompress-to-string-xml/m-p/766717#M37671</link>
      <description>&lt;P&gt;thanks &lt;A href="https://answers.sap.com/users/697/raphaelalmeida.html"&gt;Raphael Pacheco&lt;/A&gt;. This was helpful, &lt;/P&gt;&lt;P&gt;&lt;SPAN class="mention-scrubbed"&gt;sandra.rossi&lt;/SPAN&gt; &amp;amp; &lt;A href="https://answers.sap.com/users/697/raphaelalmeida.html"&gt;Raphael Pacheco&lt;/A&gt;  sorry abt the incomplete questions on the forum&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2019 19:37:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-decompress-to-string-xml/m-p/766717#M37671</guid>
      <dc:creator>prabhu_s2</dc:creator>
      <dc:date>2019-01-29T19:37:14Z</dc:date>
    </item>
  </channel>
</rss>

