Contents Use ....................................................................................................................................................... 3 Prerequisites ........................................................................................................................................ 3 Procedure............................................................................................................................................. 3 Configure the SFTP Sender Channel ...................................................................................................... 3 Use ....................................................................................................................................................... 3 Prerequisites ........................................................................................................................................ 3 Procedure............................................................................................................................................. 4 Specifying Additional Files in the Sender SFTP Adapter ................................................................. 9 Configure the SFTP Receiver Channel ................................................................................................. 10 Use ..................................................................................................................................................... 10 Prerequisites ...................................................................................................................................... 10 Procedure........................................................................................................................................... 10 Additional Information ............................................................................................................................ 14
Configuration Guide <SFTP Adapter>
3
Use Secure File Transfer Protocol (SFTP) adapter is based on the SSH protocol. It is a secure alternative to the File Transfer Protocol. It provides secure file transfer functionality over any reliable data stream according to the Secure Shell Protocol (SSH). You use this procedure to configure the SFTP adapter on the sender and receiver channels. Prerequisites You have deployed the SFTP adapter in the SAP Process Integration environment. You have logged on to the Integration Directory using the Integration Builder. You have to create a Business Component and a Communication channel. Procedure 1. Configure the channel with the sender SFTP adapter to send file content from the SFTP server to the Integration Server/Messaging System. For more information, see Configuring the SFTP Sender Channel. 2. Configure the channel with the receiver SFTP adapter to send file content from the Integration Server/Messaging System to the recipient. For more information, see Configuring the SFTP Receiver Channel.
Configure the SFTP Sender Channel Use You use this procedure to: Specify the source server details such as SFTP server, proxy server, authentication methods, and the file to be transferred. Define action on the file to be transferred. Specify additional parameters that are adapter-specific. NOTE: Regular Expressions: On some parameters you can use regular expression. Some examples are: .* : All characters, zero or more times. \. : A dot. User1 : The name User1. User. : The names User1, User2, Usera, Userb A documentation of the syntax can be found in the java doc for the class java.util.regex. Pattern (J ava 2 Platform SE v.1.4.2). Prerequisites If you want to use the private key authentication method, you must generate SSH public/private key pair. You have selected the Sender radio button. Configuration Guide <SFTP Adapter>
4
Procedure 1. Define source parameters The below table provides more information on the source parameters and their appropriate description and values:
Section Parameter Description Additional Information SFTP Server Server Enter the TCP/IP address or the fully qualified domain name of the server.
Port Enter the port number. Contact your SFTP servers administrator to know the port of the server. Timeout(ms) Enter the timeout value in milliseconds for which the client-server communication. The value specifies the maximum permissible time interval required for establishing a new connection with the server. Also it specifies the maximum allowed idle time during which no communication occurs. In both cases, after the lapse of this time the attempted or established connection is terminated. Server Fingerprint Enter the unique server fingerprint. The adapter verifies the servers fingerprint with the value entered in this field. Each SFTP host has one unique key used to encrypt the connection. The key has a unique "fingerprint". The fingerprint can be entered as a series of hexadecimal numbers separated by colons. Contact your SFTP servers administrator to provide the fingerprint of the server. e.g. 56:45:40:67:e3:a1:72:4f:43:59:f7: 23:3f:1c:d8:5f Proxy Proxy Select the preferred type of proxy. The adapter supports the use of a SOCKS4, SOCKS5 and HTTP proxy server. For this you must state the proxy server address and the port. Optionally you can use username and password for authentication on the proxy server Server Enter the IP address or the fully qualified domain name of the server.
Configuration Guide <SFTP Adapter>
5
Section Parameter Description Additional Information Port Enter the port number of the proxy server.
Username Enter the user name to access the proxy server.
Password Enter the appropriate password to access the proxy server.
Authentication Authentication Method (Password) If you want to secure the access to the messages using password, select Password.
Username Enter the appropriate username that identifies the authentication principal on the server.
Password Enter the appropriate password.
Authentication Method (Private Key) If you want to secure the access to the messages using private key, select Private Key.
Username Enter the appropriate username that identifies the authentication principal on the server. To use this authentication technique, the SFTP server must be configured to accept the public key of the user. Please contact the SFPT server Private Key View Select the appropriate key store that you generated earlier.
Private Key Entry Select the appropriate key store entry that you generated earlier.
File Filename Enter the name of the file that you want to transfer. The input to the field is a regular expression. The file name matching the regular expression entered for name of the files would be retrieved. Directory Enter the name of the directory on the server from where the adapter retrieves files.
Additional Files Choose Additional file(s) if you want the adapter to include additional files from the same directory as attachments of the XI- For detailed procedure on how to attach additional files, see Specifying Additional Files in the Sender SFTP Adapter. Configuration Guide <SFTP Adapter>
6
Section Parameter Description Additional Information Message. Period Poll Interval (min) Enter the time (in minutes) for which the adapter should check for stored files.
2. Define processing parameters The below table provides more information on the processing parameters and their appropriate description and values:
Section Parameter Description Additional Information Processing Parameters Delete File If you want to delete the file immediately after processing, select the check box.
Process Empty File - If you want to process the file(s) by creating XI messages to be created with an empty payload, select Process Empty File. - If you want to skip processing an empty file and without creating XI messages, and no processing on them select Skip Empty File. - If you do not want to create XI messages from empty files, but if you want the processing (like deleting, archiving on
The files are processed according to the selected processing mode. Configuration Guide <SFTP Adapter>
7
Section Parameter Description Additional Information them) select Create No Message. Duplicate File Checking If you want to check for duplicate files (on the basis of file size, folder, date of modification) or if a file has been processed before and throw an error, select Duplicate file checking check box.
Interval(mSec) for modification check If you want the sender channel to poll the directory at regular intervals and check for file modifications, enter the appropriate time interval. 100 mSec is the default value. The adapter will poll after every interval and check for last modified time and size. If the file is modified, it is not processed. But if the file is not modified, it is processed as usual. Maximum file restriction If you want to restrict the file size, select the check box. In the Maximum file size text box, Enter the appropriate file size in bytes. If you want an error to be reported when file size exceeds, select the Error when restricted check box. Process Sequence You use this parameter to specify the order in which the files are to be processed. If you used placeholders when specifying the file name, define the processing sequence of the files. If you select By Name. Files are processed alphabetically by file name. If you select By Date, files are processed according to their time stamp in the file system, starting with the oldest file. Configuration Guide <SFTP Adapter>
8
Section Parameter Description Additional Information Archive faulty files If you want to archive the erronous files, check the Archive faulty files check box. Enter the Archive location in the text box. The input is a file path location. It can contain the archiving substitution parameters. Stop processing after faulty file If you want the processing of transmission to stop after a faulty file, select the check box.
Quality of Service Quality of service Specify how a message is to be processed by the Integration Engine. For more information refer: QoS
3. Define advanced parameters The below table provides more information on the additional parameters and their appropriate description and values: Section Parameter Description Adapter specific message attributes Set adapterspecific message attributes If you want to include the adapter-specific metadata with the file, select the Set adapterspecific message attributes checkbox. Enter the namespace in the text box and select other appropriate attributes. The other attributes include: File name Directory File Size Timestamp SFTP Host Archiving on SFTP Server NOTE: The following parameters are available to ensure uniqueness of the message to be archived: %SEQNUM: A sequence number, starting with 1 %RTSEQNUM: A server wide Archive files on SFTP server If you want to archive all the processed files on the SFTP server, select the check box. Enter the Archive location in the text box. The input is a file path location. It can contain the archiving substitution parameters. Configuration Guide <SFTP Adapter>
9
Section Parameter Description sequence number, starting with 1 %START: The start time of the adapter %TIME: The actual time in milliseconds In all cases the original file name will be added at the end of the file. Archiving on PI Server Archive files on PI server If you want to archive all the processed files on the PI server, select the check box. Enter the Archive location in the text box. The input is a file path location. It can contain the archiving substitution parameters. Adapter status Adapter status If you want to enable messages to be exchanged between sender and receiver channels, select Active. Suppress empty directory exceptions If you want to stop the error messages after a look up in empty directories, select the check box.
Specifyi ng Additional Files in the Sender SFTP Adapter Use In the sender SFTP adapter channel, you can specify additional files to be included in the XI message as attachments. The receiver of such messages must be able to process them. Additional files are transported unchanged without conversion options. Prerequisites You have set the Additional File(s) indicator in the sender file adapter. The additional files must be in the Source Directory. The way that the files to be transported are grouped together is defined by the file names. All file names must be identical except for a defined part (such as the suffix). You will find additional files as an attachment in the message under the name assigned in the file list. Procedure 1. Under File List, enter a name of your choice for each additional file. Separate the names of the additional files with a comma (<Additional File 1,Additional File2, ...,Additional FileN>). Configuration Guide <SFTP Adapter>
10
The specified names are used as the names of the additional attachments in the XI message and as parameter keys. 2. Enter parameters for the additional files in the table: <Additional FileN>.namePart The name of the additional file is determined from the file name that was assigned for the XI message under File Name. Specify which part of the original file name must be replaced to find additional files. .txt=.pdf The quotation marks are part of the value entered. If the file invoice.txt is found as a result of the configuration, this entry means that a search is performed for the file invoice.pdf. <Additional FileN>.optional o YES The entry is ignored and the message is sent to the Integration Server/PCK without the system finding the additional file. o NO If the file is not found, processing is canceled with an error message.
Configure the SFTP Recei ver Channel Use You use this procedure to specify The destination server details such as SFTP server, proxy server, authentication methods and input file to be transferred. Define action on the file to be transferred. Specify additional parameters that are adapter-specific. Prerequisites If you want to use the private key authentication method, you must generate SSH public/private key pair. You have selected the Receiver radio button.
Procedure 1. Define destination parameters The below table provides more information on the destination parameters and their appropriate description and values:
Section Parameter Description Additional Information SFTP Server Server Enter the path of the SFTP server.
Configuration Guide <SFTP Adapter>
11
Section Parameter Description Additional Information Port Enter the port number.
Timeout(ms) Enter the timeout value for which the client-server communication remains established.
Server Fingerprint Enter the unique server fingerprint.
Proxy Proxy Select the type of proxy preferred. The adapter supports the use of a SOCKS4, SOCKS5 and HTTP proxy server. For this you must state the proxy server address and the port. Optionally you can use username and password for authentication on the proxy server Server Enter the path of the proxy server.
Port Enter the port number.
Username Enter the user name. to access the proxy server.
Password Enter the appropriate password to access the proxy server.
Authentication Authentication Method If you want to secure the access to the messages using password, select Password. In the Username textbox, enter the appropriate username that identifies the authentication principal on the server. In the Password textbox, enter the appropriate password. If you want to secure the access to the messages using private key, select Private Key. In the Username textbox, enter the appropriate username that identifies the authentication Configuration Guide <SFTP Adapter>
12
Section Parameter Description Additional Information principal on the server. In the Private Key View list box, select the appropriate key store that you generated earlier. In the Private Key Entry list box, select the appropriate key store entry that you generated earlier. File parameter Filename Enter the name of the file that you want to transfer. You also have to state a regular expression for the name of the files you want to retrieve. Filepath Enter the path where the files are to be saved.
Create Directory If you want to create a directory for the same select the Create Directory checkbox.
Overwrite If you want the existing files that are present in the server to be overwritten, select the checkbox.
2. Define processing parameters The below table provides more information on the processing parameters and their appropriate description and values: Section Parameter Description Additional Information Processing Parameters Add Timestamp to filename If you want to add a timestamp to the file, select the check box. The file is extended by a time stamp with the format yyyyMMdd-HHmmss- SSS. Add Message-ID to filename If you want to add a message ID to the file, select the check box.
Write modus - If you want to write the file first to a temporary file, select Use Temporary File.
Configuration Guide <SFTP Adapter>
13
Section Parameter Description Additional Information - If you want to write the file directly, Select Direct. - If you want to append the file, Select Append. Maximal Concurrency If you want the adapter to process a number of messages in parallel on a cluster-node, select the checkbox. The default value is 30. Time out Enter the waiting time till an error occurs, if the maximum number of message on the cluster-node is achieved. . Time unit Select the units in which time is to be displayed in the message log.
Empty File Handling - If you want to put an empty file in the target directory after processing the transmission, select Write Empty File. - If you do not want to put any file in the target directory after processing the transmission, select Ignore.
Set Permissions If you want to change the permissions of the created file, select the check box. It uses the octal notation. Example would be 600. Store Attachments If you want to save the attachments of the message on the target folder, select the check box.
3. Define advanced parameters The below table provides more information on the additional parameters and their appropriate description and values: Section Parameter Description Variable substitution(Filepath/Filename) Variable substitution(Filepath/Filename) Variables that refer to message parameters or payload content of each message can be used in the Filename and Configuration Guide <SFTP Adapter>
14
directory fields. You can enter the Variable name and Reference in the table. Adapter specific message attributes Use Adapter-specific message attributes If you want to include the adapter-specific metadata with the file, select the Set adapterspecific message attributes checkbox. Enter the namespace in the text box and select other appropriate attributes. The other attributes include: File name Directory Filename Attribute Name Enter the attribute name in the text box. Archiving NOTE: The following parameters are available to ensure uniqueness of the message to be archived: %SEQNUM: A sequence number, starting with 1 %RTSEQNUM: A server wide sequence number, starting with 1 %START: The start time of the adapter %TIME: The actual time in milliseconds In all cases the original file name will be added at the end of the file. Archive Files on PI Server If you want to archive files on the PI server, select the checkbox. Enter the Archive location in the text box. The input is a file path location. It can contain the archiving substitution parameters. Adapter Status Adapter status If you want to enable messages to be exchanged between sender and receiver channels, select Active.
Additional Information Application Check 1. Open Internet explorer browser (do not use other browsers) and then load http://<hostname>:<port>/nwa/start-stop. This will load the Start & Stop: J ava Instances page Configuration Guide <SFTP Adapter>
15
2. Go to J ava Applications tab. Let the NWA load all applications. 3. Filter the application name with keyword sftp. 4. The entry com.sap.aii.adapter.sftp.app should exist 5. If any application is stopped (due to Lazy startup mode), start the application by selecting the application & clicking the Start button. Its expected that the application starts successfully. Communication Channel Monitor You use the communication channel monitor to call information about communication channels that are set up for the selected Adapter Engine, and to administrate these channels. For more information, see Channel Monitor.
Copyright 2012 SAP AG. All rights reserved SAP Library document classification: PUBLIC No part of this publication may be reproduced or transmitted in any formor for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, Systemi, System i5, Systemp, Systemp5, Systemx, Systemz, Systemz10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, SystemStorage, Storwize, XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli, Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the United States and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe Systems Incorporated in the United States and other countries. Oracle and J ava are registered trademarks of Oracle and its affiliates. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, ProgramNeighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems Inc. HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari, Siri, and Xcode are trademarks or registered trademarks of Apple Inc. IOS is a registered trademark of Cisco Systems Inc. RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World are trademarks or registered trademarks of Research in Motion Limited. Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of Google Inc. INTERMEC is a registered trademark of Intermec Technologies Corporation. Wi-Fi is a registered trademark of Wi-Fi Alliance. Bluetooth is a registered trademark of Bluetooth SIG Inc. Motorola is a registered trademark of Motorola Trademark Holdings LLC. Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH. SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company. Crossgate, m@gic EDDY, B2B 360, and B2B 360 Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. Disclaimer Some components of this product are based on J ava. Any code change in these components may cause unpredictable and severe malfunctions and is therefore expressively prohibited, as is any decompilation of these components. Any J ava Source Code delivered with this product is only to be used by SAPs Support Services and may not be modified or altered in any way. Documentation in the SAP Service Marketplace You can find this documentation at the following Internet address: ser vi c e.sap.c om/i nst gui des
SAP AG Dietmar-Hopp-Allee 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 w w w .sap.c om