cancel
Showing results for 
Search instead for 
Did you mean: 

proxy to SFTP with attachment-Payload Query.

0 Kudos

Hi Experts,

I have an issue while sending an attachment from proxy to SFTP server, I have created a proxy structure to read the file with filed as filename and used UDF to read the file and i have mapped with root node, ABAP ECC system is sending a pdf file and passing through PI, but in SFTP server along with the PDF file , as well as another file withXML structure is also been posted.

My requirement is just to place the PDF file with file name but not the XML file.

At present am using classical scenario with SFTP receiver channel.

Plz provide me the solution if i go with ICO also.

thanks in Advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182412
Active Contributor
0 Kudos

Hi Madhukar,

Try swap the payload using PayloadSwapBean and uncheck the store attachments parameter in channel configuration then you can only write one file into target.

Regards,

Praveen.

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Praveen,

PayloadSwapBean with What parameters in Module configuration ?

Br,

Manoj

Former Member
0 Kudos

You can find an explanation here: Step by Step Mail To File Scenario - Process Integration - SCN Wikihttp://wiki.scn.sap.com/wiki/display/XI/Step+by+Step+Mail+To+File+Scenario?original_fqdn=wiki.sdn.sa...

It's simple:

swap.keyName: Name of the field - e.g. Content-Description

swapt.keyValue: Name of the content - e.g. The name of the Attachment you want to swap to the main payload

Of course, you need to disable "write attachments" in the receiver.

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Heiko ,

As per given in the link it describes for Mail scenario ,but in our case it is SFTP does the parameter remain same ?

And also you have given swap.keyValue :as name of the attachment , the name of the attachment is not constant it changes every time , we are using udf in message mapping to get the filename from one filed and mapped that to root node using UDF ..

So can you please clarify more on this ??

Br,

Manoj

former_member182412
Active Contributor
0 Kudos

Hi Manoj,

you can just mention extension name like .pdf like below then PayloadSwapBean will consider all pdf files.

Regards,

Praveen

Former Member
0 Kudos

Praveen is right! (Thanks for the hint - didn't know this yet)

You can use the module in almost every adapter with those parameters.

OSS-Message 794943 also describes the usage quite well:

XI 3.0 Adapter Framework provides a standard module for replacing the

application payload with one of the other payloads in the message.

The new application payload can be selected based on its payload attributes

(payload-name, payload-description) or its content attributes

(content-type, content-disposition, content-description, etc).

[Module Name]

  AF_Modules/PayloadSwapBean

[Module Parameters]

The following parameters are used for this module

swap.keyName          the name of a supported attribute.

swap.keyValue         the value of a partial string that is required to appear.


The supported attributes (swap.keyName) include the payload attributes

such as payload-name, payload-description and any content attributes

such as content-type, content-disposition, content-description, etc.

Former Member
0 Kudos

Hi Praveen,

In my case We will get attachment from proxy without extension. How can I handle this using swapbean.

And if I get any file with extension how can I remove the Extension from PI.

Thanks,

Gayathri.

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Gayathri,

Try using PayloadSwapBean with parameter Content-Type as application/pdf so in this case it dosn't tmatter what your pdf name is (with / without extension)

.

regard,

Manoj

Former Member
0 Kudos

Hi Manoj,

Can you tell me what should I change in the below screenshot and also let me know What should I keep in FileName.

Former Member
0 Kudos

HI Madhukar,

Suggested option will be ICO. As i understand your current scenario is Proxy(XI)-->PI-->SFTP

I presume your file will all come in that one XML field of the proxy structure..How are you picking up only the content of the field to create a file at the receiver end(Basically your module config)??

Regards,

Sriram

0 Kudos

Hi sriram,

thanks for your reply.

Here we are not getting complete data in one field. we are getting the pdf file from ECC along with that a field contains file name is also coming to PI where we have manintained a proxy structure to read the file name.

Here we are mapping the file name to root node and also we have maintained a UDF.

In the target only pdf file should be placed not the proxy structure, but here PI is posting both PDF and XML file.