cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in PayloadZipBean

Former Member
0 Kudos

Hi Mentors,

I am doing a Scenario in which I need to zip files and retrieve them at target side.

Earlier we used Java mapping to do it. Now I want to use PayloadZipBean in Module tab in Channel.

I am able to zip it. But at target side I am getting "Main Document" and other files with different extensions as they zipped the PAYLOAD only.

Could you tell the way so that I can get the same files like in WINZIP i.e. Csv are picked up and when I will extract them it should be csv only with same name ??

Thanks in advance...

Regards

Rasav Malhotra

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi All,

I just wanted to Zip the Files and put at target directory without changing the name or extension.

As Winzip or winrar do just Zip and at target i can extract with same name.

So can i use Module Tab ??

waiting for reply ?

Regards

Rasav

Former Member
0 Kudos

Hi @Rahul, @Grzegorz , @ Baskar

I have used these parameters :

AF_Modules/TransformMessageBean-->Lejbs-->contentType

and ContentType-->Transform.ContentType-->text/plain;name="name.csv"

So what it is giving me ---> 1. it is creating individual zip files but I am using zipALL.

                                            2. All file which are picked having name "name.csv".

Required :

I just want to pick up all files --> Zip it at target side---> At target Name & extension should be same.

Is it possible to do with module ?

Regards

Rasav

former_member184681
Active Contributor
0 Kudos

Hi Rasav Malhotra,

Did I get it correctly that you want to zip all payloads into one file? If so, use the attribute:

zip.Mode = zipAll

as described here:

http://help.sap.com/saphelp_nw04/helpdata/en/45/da9358a1772e97e10000000a155369/content.htm

Regards,

Greg

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You have to use MessageTransformBean to set the content type where you can set the file name and that will be created as output.

Please go through stefan blog and you have to follow the sequence of bean as described and you will also see the file name created (in screenshot) as desired.

http://scn.sap.com/people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the...

Former Member
0 Kudos

I never tried this but looks like if you do this it should work

●      zip.filenameKey

This parameter is only relevant for compressing.

Specify the information to be used to generate the file name of the compressed file:

○       payloadName

The name of the payload is used as the file name for the compressed file.

This is the default value.

○       contentType

For example, the content type is Content-Type: text/csv; name="name.csv".

The name of the compressed file is name.zip.