Application Development and Automation 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: 
Read only

Unzip files using ABAP program

Former Member
0 Likes
747

Hi All,

Can anybody guide me how to Unzip a .zip file using ABAP program... Appreciate your immediate reply...

actually, my scenario is to check whether zip file is created in appl.server or not.., and if zip file created then i need to check whether its blank file or any content exist inside the file...

Thanks in advance

Bhasker

3 REPLIES 3
Read only

Former Member
0 Likes
566

hi

good

parameters: command(236) lower case.

data: std_lines(255) occurs 0 with header line.

call function 'RFC_REMOTE_PIPE'

destination 'SERVER_EXEC'

exporting

command = command

read = 'X'

tables

pipedata = std_lines

exceptions

communication_failure = 1

system_failure = 2.

You should put your Unix command in the command parameter. "gunzip /yourfilepath/yourfilename" works on my Unix system. Once you determine the proper Unix command, you should be set. This technique is also nice because it provides you with echos back from Unix in table std_lines. For more complex Unix activity, you may want to consider throwing together a Unix script, and calling that via this code.

reward point if helpful.

thanks

mrutyun^

Read only

0 Likes
566

Hi Mrutynjaya,

I already used above method but couldnt get any result... no error message SY-SUBRC = 0, stnd_line table was empty... can you guess whats the reason??

and when i use :

OPEN DATASET filename FOR INPUT FILTER 'uncompress' IN TEXT MODE ENCODING DEFAULT.

i got abap run-time error Pipe closed....

and when i used:

call 'SYSTEM' id 'COMMAND' field unixcom

id 'TAB' field tabl[].

i am getting only filename in my internal table tabl[]...

please advise.... Thanks

Read only

0 Likes
566

Hi All,

Can anyone advise for this issue..

Thanks