cancel
Showing results for 
Search instead for 
Did you mean: 

Issue getting the additional filename details pulled from SFTP Sender Channel.

0 Kudos

Hi All,

I have a scenario to pull one .XML file as main payload and multiple .doc / .pdf / .jpg files as attachments.

Configured SFTP sender to have additional files to pull attachments in the message.

The issue here is all the attachment's content type are getting defaulted to (application.xml) irrespective of the attachment extensions (.pdf,.jpeg..) which is causing an issue while sending it to target system.

The dynamic configuration in SFTP channel has no details of the additional files, the only details available are of the actual file.

Is there a way where we can get the additional file name details in dynamic configuration ? or a way to get the attachment name within java mapping so that I can set the content type reading each attachment name.

Couldn't find any option to get the attachment name within the API.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor

Add multipartheaderbea in sender channel and you can see the attachment name in DC then you may read those via java in mapping.

https://archive.sap.com/discussions/thread/3956705

0 Kudos

Hi Manoj,

Thanks for the inputs , adding the MultipartHeaderBean worked in setting up the dynamic configuration for the additional files read from SFTP.

<SAP:Record namespace="http://sap.com/xi/XI/System" name="Part[1].Content-Disposition">attachment;filename="PO_12345.pdf"</SAP:Record>

<SAP:Record namespace="http://sap.com/xi/XI/System" name="Part[2].Content-Disposition">attachment;filename="PO_12345.jpg"</SAP:Record>

Answers (1)

Answers (1)

former_member190293
Active Contributor
0 Kudos

Hi Kowshik!

Manoj is absolutely right: you can add attachment's properties to Dynamic Configuration using MultipartHeaderBean.

Another option is to use custom adapter module to get the same data using com.sap.engine.interfaces.messaging.api.Payload class to read attachment's properties.

Regards, Evgeniy.

Hi Evgeniy,

Thanks for your time in replying , As suggested by Manoj "MultipartHeaderBean" did the trick and relied on java mapping to read the filename from the dynamic configuration.

Regards,

Kowshik.