on 09-05-2014 1:03 PM
Hi,
I am working on SAP SFTP adapter (SAP PI7.4).
SFTP receiver channel is placing the file with correct filename as generated by dynamic configuration code but sftp channel is adding an extra .txt extension in filename while archiving.
Example: Actual Filename: CCBGI.SSEN_TNG.BATCH0000000000000052.sft
At archive folder : CCBGI.SSEN_TNG.BATCH0000000000000052.sft.txt
Please suggest resolution for this.
Thanks & Regards,
Nida Fatima
Hi Nida,
You can change the file name in SFTP using the ASMA configuration, in this way you would need ESR development.
To use ASMA configuration, check these links:
SAPTechnical.COM - Dynamic File name using ASMA (Adapter Specific Message Attributes) in XI / PI
Another solution is to use OS command.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is an SAP-note 1817747 on this which tells you: "It's not a bug, it's a feature".
http://service.sap.com/sap/support/notes/1817747
Symptom
At the sender side of SFTP Adapter, the flag "Archive Files on PI Server" is checked and the field "Archive name" is configured to archive the files on PI Server. During message processing, it is noticed, that, files are being archived in the archive directory with ".txt" extension.
Reason and Prerequisites
This feature has been added as a part of security so that the files will be saved with ".txt" extension in the archive directory. If it is allowed to be saved with original name on the PI server, then an external attack can manipulate the path where the file has been archived and gain access to OS related path and modify the files. Hence, to avoid such security issues, the file extension is always changed to ".txt".
Anyway, you might have a look at SAP-note 1815655 as there is an advanced parameter mentioned to add a "default extension" to a file. http://service.sap.com/sap/support/notes/1815655
Also, an advanced mode parameter "addDefaultFileExtension" has been introduced. If this parameter is set to 'true', then, while archiving the files on SFTP server, the additional check will be performed to check whether the file has ".txt" extension or not. If not, then the ".txt" extension will be added with the file name. Else, normal execution continues i.e. files will be archived on the SFTP server with their original name.
The default value for the parameter "addDefaultFileExtension" is 'false'.
Hi Souvik,
I can't see any option for filetype in SFTP receiver channel. Could you please recheck and confirm with screenshot.
Regards,
Nida
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nida,
Here is my assumption of your interface
You are using UDF in message mapping for dynamic configuration of file name.
In the receiver SFTP channel, apart from placing the file on the target SFTP server directory (where you are getting proper file name from dynamic configuration) you also wish to archive the file on the local application server for reference purpose for which you must be using standard Archiving Module and provided by SAP in Module tab of SFTP adapter to do this.
If my assumption are correct then i would suggest check and confirm if you have specified name as .txt in that. Also, if you are facing same file name issue on SFTP server directory also then i would suggest check the UDF code once if there you have put .txt extension.
If the above does not help then, please provide more details about dynamic configurations so that we can analyse.
Thanks,
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amit,
For archiving we are not using any module. I have used standard archiving functionality provided in channel.
File placed at sftp server has correct filename but the file which is archived at our local server is adding additional .txt in complete filename.
So i don't think there is any issue with UDF .
Thanks & Regards,
Nida
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.