01-03-2019 5:22 PM
Hi
I have a requirement to decompress a data which is stored in a table.
The data was compressed by the below code and stored in a table:
EXPORT xtyp = ps_req TO DATA BUFFER ls_pers-input COMPRESSION ON.
I have downloaded the compressed data to a flat file but lost on how to decompress it and view the actual contents.
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
Any help on this is highly appreciated.
Thank you
01-04-2019 12:21 AM
As a sandra.rossi , I don't know what you want to do...
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.
BR,
Pacheco.
REPORT.
DATA: oref TYPE REF TO data,
input TYPE xstring.
FIELD-SYMBOLS: <spfli> TYPE STANDARD TABLE.
TRY .
CREATE DATA oref TYPE STANDARD TABLE OF spfli WITH DEFAULT KEY.
ASSIGN oref->* TO <spfli>.
SELECT * FROM spfli INTO TABLE <spfli> UP TO 50 ROWS.
CALL TRANSFORMATION id SOURCE oref = <spfli> RESULT XML DATA(xml).
EXPORT xml = xml TO DATA BUFFER input COMPRESSION ON.
FREE: <spfli>[].
IMPORT xml = xml FROM DATA BUFFER input.
CALL TRANSFORMATION id SOURCE XML xml RESULT oref = <spfli>.
cl_demo_output=>display( <spfli> ).
CATCH cx_sy_create_data_error
cx_root
INTO DATA(err).
cl_demo_output=>display( err->get_text( ) ).
ENDTRY.
01-03-2019 8:07 PM
01-04-2019 12:21 AM
As a sandra.rossi , I don't know what you want to do...
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.
BR,
Pacheco.
REPORT.
DATA: oref TYPE REF TO data,
input TYPE xstring.
FIELD-SYMBOLS: <spfli> TYPE STANDARD TABLE.
TRY .
CREATE DATA oref TYPE STANDARD TABLE OF spfli WITH DEFAULT KEY.
ASSIGN oref->* TO <spfli>.
SELECT * FROM spfli INTO TABLE <spfli> UP TO 50 ROWS.
CALL TRANSFORMATION id SOURCE oref = <spfli> RESULT XML DATA(xml).
EXPORT xml = xml TO DATA BUFFER input COMPRESSION ON.
FREE: <spfli>[].
IMPORT xml = xml FROM DATA BUFFER input.
CALL TRANSFORMATION id SOURCE XML xml RESULT oref = <spfli>.
cl_demo_output=>display( <spfli> ).
CATCH cx_sy_create_data_error
cx_root
INTO DATA(err).
cl_demo_output=>display( err->get_text( ) ).
ENDTRY.
01-29-2019 7:37 PM
thanks Raphael Pacheco. This was helpful,
sandra.rossi & Raphael Pacheco sorry abt the incomplete questions on the forum