[SAP CPI] – HOW TO USE DYNAMIC CONFIGURE FOR SFTP RECEIVER ADAPTER

Hi guys, in this article I want to discuss about How to use dynamic config for SFTP receiver adapter. As you know, in scenario integration between CPI and SFTP, we have to set hardcode value of SFTP as address, directory, filename, credential… in integration flow with SFTP receiver. For example

In many cases, we have to parameter all of this variable. How to do that ?

Actually, We can use externalize parameter. In newest release, CPI support type DYNAMIC for Proxy Type and Authentication dropdown. If choose this value, configuration will get value from property as

AttributeSAP property Type Values
Proxy Type SAP_FtpProxyTypeStringinternet/onPremise
AuthenticationSAP_FtpAuthMethodStringkey/user/dual
Timeout                                   SAP_FtpTimeout                   int      Values of type integer
Max. Reconnect AttemptsSAP_FtpMaxReconnect intValues of type integer
Reconnect DelaySAP_FtpMaxReconDelay intValues of type integer
Automatically DisconnectSAP_FtpDisconnectboolean, stringtrue/false
Change Directories StepwiseSAP_FtpStepwiseboolean, stringtrue/false
Create DirectoriesSAP_FtpCreateDirboolean, stringtrue/false
Use Fast Exists Check SAP_FtpFastExistsCheckboolean, stringtrue/false
Use Fast Exists Check SAP_FtpAfterProcStringOverwrite/Append/Fail/Ignore
Flatten FilenamesSAP_FtpFlattenFileNameboolean, stringtrue/false

Configuration dynamic for SFTP Address

  • Add Content Modifier component into integration flow
  • Add header as
NameSource TypeSource valueData Type
addressexpression{{address}}java.lang.String
credentialNameexpression{{credentialName}}java.lang.String
userNameexpression{{userName}}java.lang.String
  • Add property for content modifier as
NameSource TypeSource valueData Type
SAP_FtpProxyTypeexpression{{sftpProxy}}java.lang.String
SAP_FtpAuthMethodexpression{{sftpUser}}java.lang.String

If you select DYNAMIC for dropdown proxy type and Credential in iFlow, you have to define propery SAP_FrpProxyType and SAP_FtpAuthMothod. If no, you will take error.

Test configuration

Choose Artifact and click configuration to set value for parameters

Summary

In this article, I discuss about How to configuration for SFTP dynamic. I also talk about Externalize Parameter to set value for parameter from artifact configuration. Thanks for your reading and any question, kindly leave your comment below this article.

Thanks.

Joseph.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.