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: 

Unzipping files from a zipped folder

Former Member
0 Kudos

Hi,

I need unzip files stored in .zip folder using ABAP. Could you please tell me of a utility/Funtion Module or any other method which exists for the same?

Thanks a lot

Shujath

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I've tried using CL_GUI_FRONTEND_SERVICES=>EXECUTE but I do not know what to pass in the 'PARAMETER' argument.

Should it be some command to unzip? Please advise.

Thanks

Shujath

6 REPLIES 6

FredericGirod
Active Contributor
0 Kudos

Hi Mohammed,

you just have to execute an external program from your ABAP.

For example, if the ZIP file is in the client computer you have to use the WS_EXECUTE.

Have fun

Frédéric

0 Kudos

WS_EXECUTE is obsolete and should be avoided. Try CL_GUI_FRONTEND_SERVICES=>EXECUTE instead.

If you are a very recent support package level you might have the class CL_ABAP_ZIP. (I'm not sure what SP this is, it might not even be delivered yet). You can read the file to ABAP as a binary stream and then unzip it with this class. This class is different than CL_ABAP_GZIP in that it understands the ZIP file format and the CRC check. CL_ABAP_GZIP can only compress and decompress data streams.

0 Kudos

Hi Thomas,

your CL_GUI_F... is from the release 4.6 or 4.7 ?

Regards

Frédéric

0 Kudos

At least 4.6C. I don't have any systems older than that to check on. The class itself has a created on date of 12/14/1998.

Former Member
0 Kudos

Hi,

I've tried using CL_GUI_FRONTEND_SERVICES=>EXECUTE but I do not know what to pass in the 'PARAMETER' argument.

Should it be some command to unzip? Please advise.

Thanks

Shujath

0 Kudos

Hi,

When calling the "Execute" method, give "Winzip32.exe" in the "APPLICATION" exporting parameter and in the exporting parameter "PARAMETER" give the value "-E <zipfile - with full path> <Folder to be extracted>"

hope this helps....

Thanks & Regards,

Renjith