Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Uncompress file with ABAP

Former Member
0 Kudos

Hello,

I'm using function 'FTP_COMMAND' with COMPRESS = 'Y' option

and I have successful download but <b>I don't know how to uncompress file</b>

is someone can help me?

thanks

call function 'FTP_COMMAND'

exporting

handle = v_hdl

command = v_cmd

COMPRESS = 'Y'

tables

data = tt_result

exceptions

tcpip_error = 1

command_error = 2

data_error = 3.

if sy-subrc ne 0.

write :/5 'Unable to transfer Data'.

exit.

else.

write: /5 'Transfered Data to Ftp Destination'.

if v_close = 'X'.

clear v_close.

delete dataset p_file.

if sy-subrc = 0.

write : /5 'File Deleted From appl.Server after Reading'.

endif.

endif.

endif.

1 REPLY 1

0 Kudos

Hi David,

Have a look at class <b>CL_ABAP_GZIP</b> it has compress and decompress methods for zip file. Then click on the <b>method document icon</b> to see detail documentation on the signature of the method to understand how to use it.

If you were asking how to decompress the file on your desktop and not in SAP system then you should look at software like <b>winzip</b>.

Or alternatively decompress it in SAP System with CL_ABAP_GZIP and download it as text file with <b>GUI_DOWNLOAD</b> function module.

Hopping this answer your question.

Sincerely,

Alain Gauthier