cancel
Showing results for 
Search instead for 
Did you mean: 

set the file name dynamically and zip the same file in PI 7.11

RameshGulipall
Active Participant
0 Kudos

Hi All,

I have scenario proxy to SFTP. My requirement is target file name set dynamically and same file as zip. For example "123.zip" inside zip file "123.xml".Please provide your inputs achieve this requirement.

Regards,

Ramesh

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ramesh,

Instead, you can use the file adapter at receiver side and perform dynamic configuration.

Using the Run operating system, you can zip the file using the name of the XML file.

Regards,

RameshGulipall
Active Participant
0 Kudos

Hi  Hanumantha Rao,

Could you explan about run operating system for zip the file .

Regards,

Ramesh

RameshGulipall
Active Participant
0 Kudos

Hi All,

Using the ASMA I got dynamic file and using zip module ziped the file extension with .ZP. But my requirement is Zip filename and inside zip file  name shout be same. I am getting now ST_MXMLF_A0120120919071226.zip but inside this file i got main document file .How can i achieve this .Please provide the you inputs.

Regards,

  1. Ramesh.


baskaran_k2
Participant
0 Kudos

Hi Ramesh,

I already discussed this issue in the below thread.

Hope we can't achieve this using ASMA/Dynamic configuration. Plz refer the below thread for more details,

http://scn.sap.com/thread/3174585

Thanks

Baskaran K

markbernabe
Active Participant
0 Kudos

Hi Ramesh,

I have the same problem. I tried ASMA with PayloadZipBean but I still can't get a dynamic filename to my zipped file. May I know how you've accomplished this?

Thanks

former_member181985
Active Contributor
0 Kudos

Hi Mark,

Use Java Mapping. Refer my article : Zipping Payload in Java Mapping

- set zip entry file name in java mapping

- set zip file name using dynamic configuration code in the same java mapping

Regards,

Praveen Gujjeti

markbernabe
Active Participant
0 Kudos

Hi Praveen,

Thanks for this! However, I have a pass thru scenario (without ESR objects) so Java mapping won't work. We're still trying to achieve this without scripts or custom module.

former_member181985
Active Contributor
0 Kudos

Hi Mark,

As far as I  know, your requirement is not possible without a mapping program or a custom module.

What is your scenario (source, target) ??

Regards,

Praveen Gujjeti

markbernabe
Active Participant
0 Kudos

Hi Praveen,

I have a csv file as source and a zipped version of it as target. Zipped file must have same filename as source csv.

zameerf
Contributor
0 Kudos

Hi Ramesh,

As per the reply from Stefan in the below thread, it is not possible to set the file name dynamically using contentType.

http://scn.sap.com/thread/759529

You can try the option with adapter module using the code given by Charu Kulkarni in the same thread.

-Zameer

RameshGulipall
Active Participant
0 Kudos

Hi Zameer,

Thanks for your reply!!

Can you please confirm the advanco SFTP adapter supports PayloadZipBean.

Regards,

Ramesh

zameerf
Contributor
0 Kudos

I haven't worked with Advantco SFTP adapter yet, but the SAP help for PayloadZipBean says "You can use the module in any adapter that can be extended."

So, If you can find the module tab enabled in SFTP adapter, it should work.

iaki_vila
Active Contributor
0 Kudos

Hi Ramesh,

You could use the dymanic configuration to change the file name, you could follow the Michal's blog for this http://scn.sap.com/community/pi-and-soa-middleware/blog/2006/02/23/xi-dynamic-name-in-the-mail-attac...

To zip the file you could use the PayloadZipBean module: http://scn.sap.com/people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the... by Stefan Grube

But if you are going to use an special adapter like AS2 seeburger may be these solutions doesn't work, i can't assure you that they are supported.

Regards.

RameshGulipall
Active Participant
0 Kudos

Hi ,

Thanks for your reply!!

Both requirement in one scenario. When i use PayloadZipBean  for zip the file and variable substitution  for dynamic file name in Receiver SFTP adapter .I got error. Please provide the your thoughts.

Regards,

Ramesh