cancel
Showing results for 
Search instead for 
Did you mean: 

Filename extension in Payload Swap bean

0 Kudos

Hi Experts

I have a scenario Proxy to FTPS , where I have to send an excel attachment. I have used payload swap bean in receiver channel and it is working fine as I am now able to see attachment in final destination folder however since the file name is coming from ECC and we are using dynamic configuration in PI to handle this. excel attachment is missing the extention .xls when it is being triggered from ECC and therefore in FTP folder file is getting generated but with no extention.

I have added the extention .xls (as per the MIME header) in dynamic config and also tried to use concat function to achieve this extention to be added as final name of the file but when I did above adjustments I can see the correct name being generated in Main payload in SAP PI receiver channel monitoring but not in final destination folder, file still looks same as earlier (without any extention) , I believe since I am using payloadswapbean in module whatever I am getting in Mainpayload is being swapped by excel attachment values but not sure why the correct extention is not being shown up at final destination folders.

Please suggest how can I get the correct file name in destination folder with the help of SAP PI, I know I can do this if ECC will add .xls in attachment name.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182412
Active Contributor
0 Kudos

Hi Mohit,

I have tested the same scenario and it is working with PayloadSwapBean and DynamicConfiguration in the mapping and the file name correctly placed in the target.

Receiver File CC:

Dynamic Configuration:

Target Directory:

If your file name correctly set in dynamic configuration then the target file will be created correctly.

Regards,

Praveen.

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Mohit,


Please suggest how can I get the correct file name in destination folder with the help of SAP PI, I know I can do this if ECC will add .xls in attachment name.

I think in windows, there is an option in the folder settings that hides the extensions of known file types. Check if this is checked in your system.

Regards,

Mark

0 Kudos

Hi Mark

We are placing file in FTPS server. so unable to do it

engswee
Active Contributor
0 Kudos

Hi Mohit

It's always helpful if you provide what version of PI/PO you are using along with SP level and whether it is single or dual stack.

If you are on PI 7.3x and above, can you add MessageLoggerBean both before and after the PayloadSwapBean (refer to following blog for details how to)

After you have the logging, please provide the screenshot of the Dynamic Configuration values both before and after.

On single stack, you can view the DC if you select the message, click "Open Message", select the logged version and view the "Message Attributes" tab.

Rgds

Eng Swee