Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
_swati-singh_
Participant
1,104

While working with network file shares, you must come across a scenario where files must be exchanged between applications or systems via SMB servers. You can now utilize SAP’s latest SMB adapter to configure the connection to the SMB server to read files from the SMB server or create files or directories on the SMB server.

What is SMB?

The Server Message Block (SMB) protocol is a network file-sharing protocol for file-based operations like read, write, create, delete, etc.

What is the SMB Adapter?

Using the SMB adapter, you can easily integrate different SAP and non-SAP applications in an SMB network share environment. You can access files on a remote server securely using the latest 3.x SMB encryption protocols and the SMB Signing feature. You can improve file operations efficiency by enabling Distributed File Share.

Key Features

SMB Adapter can be used to implement various file-based solutions, a few of them are:

  • SMB Operations Support: Offers support for all major file operations: Create, Read, Write, List, and Delete files.
  • Dynamic configuration with headers and properties: Assigning dynamic values to different properties allows enhanced flexibility to your integration flows. You can also refer to dynamic parameters using SAP Cloud Integration exchange headers and properties.
  • Secure authentication and encryption for 3.x SMB dialects: Your communications over SMB network shares are done through secure and encrypted channels for all SMB dialects above 3.0.

How to use the SMB Adapter?

You can perform read and write operations with the required read lock strategy and file handling options respectively. Also, you can perform other important operations like listing files and directories, and creating or deleting files.

Create a File and List the Directory items

For the purposes of this blog, I am going to illustrate a basic operation of file creation on a remote folder in an SMB share. Secondly, we use the SMB adapter to list the contents of the folder to view properties of our newly created file.

sswati_0-1730212371172.png

The payload for SMB file operation

We use a Content Modifier to store folder and file details required for our SMB Adapter operations. The following properties are used later in the integration flow.

sswati_1-1730212371178.png

SMB Adapter Connection

You can connect to SMB using your network share credentials via a Secure Parameter artifact.

The connection tab contains the following fields:

Field

Description

Address

Specify the IP address and port name of the SMB Server.

Example: smb1.servershare.com:445

Domain

Specify the domain used for authentication.

SMB Dialect

Select the SMB dialect or version to be used for communication.

Share

Specify the SMB share folder. 

Authentication

Select the authentication type for connecting to the SMB server.

This field is set to Basic Authentication by default.

Credential Name

Specify the name of the User Credentials artifact used for authentication.

Timeout (in secs)

Specify the connection timeout duration to the SMB server.

Enable Encryption

Enable to turn on encrypted communication between the client and server. For any SMB 3.x dialect, this is a request to the server to turn on encryption if the server also supports it.

Enable DFS

Enable Distributed File System Share between the client and the server.

Enable Signing

Check to enable SMB Signing between the client and the server.

Maximum Reconnect Attempts

Specify the maximum number of retries permissible for reconnection to the SMB server before message processing starts.

This field is set to 3 by default.

Create File

Add a request-reply block to SMB Adapter to our flow. For file creation, you can utilize the correct File Handling Strategy.

sswati_2-1730212371184.png

List Directory Objects

After providing an interval of 180 seconds, we can initiate our call to list the directory objects.

sswati_3-1730212371188.png

Note: This adapter is compatible with Cloud Integration and EIC runtimes. In case, you want to connect with an SMB server in your organization's network then make use of the EIC runtime to run the integration scenario.

Quick Links

For detailed information about the adapter configuration, see the SMB Adapter Guide.

Note: The SMB Adapter is available as part of your SAP Integration Suite license.

Labels in this area