cancel
Showing results for 
Search instead for 
Did you mean: 

ZIP file to extracted files

Former Member
0 Kudos

I need to pick up a ZIP file from a trading partner and extract the contents of the zip file and write them to a directory. I am picking up the zip file without issue. The challenge I am having is extracting the data. The AP_Modules/PayloadZipBean extracts the data, but in the receiver channel the "main document" only writes one of the files in the archive.

If the zip file contains multiple files, how to I extract each file through the single communication channel?

I am currently using an File/FTP channel to retreive the zip and an SFTP channel as the receiver.

Accepted Solutions (0)

Answers (4)

Answers (4)

aashish_sinha
Active Contributor
0 Kudos

Hi,

No need for IR configuration, Just need a demo setting for picking up ZIP files from Source directory and post it to target location. In Receiver Communication channel, use shell script to unzip it. File adapter contains Run OS Command after Processing, where you can give shell script. Shell script will contain commands to unzip it .

Regards

Aashish Sinha

Former Member
0 Kudos

Using PI for communication, even if there is no mapping being done is our strategic direction.

In this case, I am writing to a server with the SFTP channel -- which does not have the ability to call a script on a remote server.

-G

shivhare
Active Contributor
0 Kudos

Hey Gerry,

I am not sure solution that i am going to explain you is working or not but you can try it ..

as you told receiver is your SFTP adapter and there is no any option available to run batch file after processing ok---- now i think you can create batch file to extract data from Zip file and use OS utility like run schedule task on every 5 or 10 min and in schedule task you can mention you batch file to extract data

Regards,

Amit

Former Member
0 Kudos

If you dont have any mapping in this interface then I would say not to go for SAP PI at all. YOu can use simple scripts to handle this requirement.

former_member181985
Active Contributor
0 Kudos

use script in the receiver file channel which can does this job.

No need of IR design objects for your scenario.

Former Member
0 Kudos

The Wiki page below should help you bundling multiple messages into a single one, then the receiver file adapter will write all at once on the same file.

http://wiki.sdn.sap.com/wiki/display/XI/collectmultiplemessagesandbundlethemintoonemessage.