cancel
Showing results for 
Search instead for 
Did you mean: 

Setting Dynamic values to the payload-name / Content Desc

Former Member
0 Kudos

Hi All,

I am using a PayloadZIp module and i am trying to zip the file and retain the filename.

For this i have done the following things. I have used PayloadZIp in the Sender channel. In the recv channel used the DynamicConfigurationBean and wrote the value as a part of message_interface and then using variable substitution i have configured made the filename as the sender name.zip

for eg if the file zipped at the sender side is name1.txt the recv channel would be name1.txt.zip where the variable substituiton would have the value name1.txt

but the problem is that the value of the file inside the zip is not name1,txt . I would like it to be name1.txt

I have used the messageTransformBean and stuff tried setting the ContentTypes Desc all of them take constant values. i am not able to set the real filename as the filename for the attachment.

Can anyone share their views on this and let meknow hw i can achieve this

Rgds

aditya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

> I am using a PayloadZIp module and i am trying to zip the file and retain the filename.

> For this i have done the following things. I have used PayloadZIp in the Sender channel.

If you are trying to zip a file, then why are you using the PayloadZipbean on the Sender CC, you should use the module on the Receiver CC.

> for eg if the file zipped at the sender side is name1.txt the recv channel would be name1.txt.zip where the variable substituiton would have the value name1.txt

>

> but the problem is that the value of the file inside the zip is not name1,txt . I would like it to be name1.txt

>

What file name are you getting now?

have a look at this blog : http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417700%29ID0591392850DB0143661345236723370...

Pooja.

Former Member
0 Kudos

Hi Pooja,

if the file is zipped in the recv channel the file size is not reduced. my aim is to reduce the file size

Also regarding the blog the name of the file inside is coming as file.txt and it will remain the same for eary iteration

what i want is that this filename should be dynamic it should be the filename which i am picking

Thanks for your inputs

Rgds

Aditya

Former Member
0 Kudos

ok, got your question. So when you are trying to use DynamicConfigurationBean , are you getting any error ?

or what file name are you getting?

Pooja

Former Member
0 Kudos

hi pooja,

whn i use the dynamic configuration bean its giving me the file name.. i am storing thm in the variable.. module.filename

but then whn i try to set the contentTyoe or file name of of the message parts (U can check the manifest document of any sxmb_moni message u will see a SAP:Name i would like to change that) it gives the name of the variable not the value

this is my configuration in sender channel

DynamicConfigurationBean 1

MessageTransformationBean 2

PayloadZipBean 3

1 key.00 write http://..../FileName FileName

1 value.00 module.filename

2 Transform.setContentType plain/text;filename=module.filename

3 zip.mode zipall

3 zip.keyFilename contentType (if contentType it takes values from above but if payload-name it takes values from the Manifest Document SAP:Name tag)

Rgds

Aditya

former_member187339
Active Contributor
0 Kudos

Hi Aditya,

Try this:

2 Transform.setContentType plain/text;name=module.filename

Regards

Suraj

Former Member
0 Kudos

Hi Suraj,

i tried it but it doesnt work

Rgds

Aditya

Former Member
0 Kudos

I am closing this thread, but i dont know the answer to this problem

Rgds

Aditya

Answers (0)