on 02-16-2016 11:30 AM
hi all,
proxy to file in sap pi 7.31
scenario created. complexity is a file needs to be output in dir B, which is inside dir A, which is inside root folder - for example, let say the root folder is \root, then the file tmp.xml needs to be created inside \root\A\B directory.
then the directory A needs to be zipped to get a tar file with name say A.tar - then this A.tar needs to be gzip to get A.tar.gz in the \root folder.
so how to get it done through file adapter - we have PI on a window server - tar and gzip are unix commands? or tar and gzip can run in windows os.
any idea, pls. thx. all helpful replies will be appreciated.
Hi Stewart,
I have a same kind of requirement.
Please let me know how you have achieved this ?
Thanks much..
Regards,
Akhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stewart!
You could try to do this using OS script with option "Execute OS command after message processing".
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Stewart,
as already mentioned above you can do it with a java mapping or adapter module by using
java.util.zip.GZIPOutputStream
and
org.apache.commons.compress.archivers.tar.TarArchiveOutputStream
Regards
Mathias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi inaki,
payloadzipbean would zip the output file only right?
my requirement is to create the file under dir B under dir A - so i create dir A, dir B and then tmp.xml inside dir B - something like \root\A\B\tmp.xml
so if i just use payloadzipbean - would it just create a zip file containing only tmp.xml file and produce tmp.gz - right? how to include the directory strucuture A\B\tmp.xml in the zip file - can payloadzipbean do it?
also my requirement is to have tmp.tar.gz - so first a .tar file having directory structure A\B\tmp.xml and then gzip it - any idea how to get it?
Hi Stewart,
AFAIK with payloadzipbean you can zip all the files in one directory, but if you have n files you will have n zip files. Check these examples SAPTechnical.COM - Zipping Files/Payloads using Module PayloadZipBean or this one
I'm sorry, i missunderstood you requirement with only one zip file. I think the only way is to do an own module or your initial idea with a OS batch file.
Regards.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.