cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Receiver File adapter Authentication

former_member285898
Participant
0 Kudos

Hello Experts,

Kindly help for below mentioned queries.

Scenario:

Proxy (ECC)-> PI-> (FTP) Third party

Requirements:

1) Dynamic IP,Port,User credential and Folder path configuration in Receiver FTP Adapter

2) In case connectivity to particular File system fails then switching to other File system and dumping data in Real time.

Queries:

1) For 1st requirement, I assigned IP details using Variable substitution method, but it is not working. Getting Unknown host exception

2) Using ASMA parameter (for 1st requirement) or Custom Adapter module, both requirements can be achievable?

Please let me know in case any query or info required.

Regards,

Karan Kholakiya

Accepted Solutions (1)

Accepted Solutions (1)

former_member285898
Participant
0 Kudos

Hello All,

For above mentioned requirement, In SAP PI/PO there is less options available.

So for this requirement i used "Directory API" feature given in SAP PI/PO.

We implemented this feature in ERP side as below design.

1) First SFTP server detail is stored in custom table which is configured in SAP PI channel.

2) Before sending data, target SFTP server will be pinged for connectivity check.

Success : Then data will be send to Interface using SOAP-XI adapter.

Failure : In case of ping is failed, then Directory API feature will be used , and SFTP server details will be changed to Communication channel from ERP and custom table will be updated with new SFTP server details which configured in SAP PI channel.

So this way we can change SFTP channel details in runtime using ABAP codes in ERP side.

This is the best solution i can think of for this requirement. Also there are many blogs available for "Directory API" so i am not mentioning here any URL for the same.

I hope this answer will be helpful. In case there is better design solution, then feel free to share. 🙂

Regards,

Karan K.

Answers (1)

Answers (1)

former_member607993
Contributor
0 Kudos

Hi Karan,

Ideally its very rare to have Dynamic IP address, port number and user account. Variable substitution is for target directory and file name scheme.

Folders/sub folders and file name scheme(i.e. file name and path directory) and can be handled dynamically using ASMA if required inputs are passed from Source system.

public StringASMAFilename(String REFNO, String CREDAT, String CRETIM, String basedirectory, Container container) throws StreamTransformationException{

String filename = new String("");

DynamicConfiguration conf1 = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");

filename = "GY" + "_" + REFNO+ "_" + "_" + CREDAT + "_" + CRETIM + ".csv"; conf1.put(key1,filename);

DynamicConfigurationKey key2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");

String forwardslash = "/";

String outputdirectory = basedirectory + REFNO + forwardslash;

conf1.put(key2,outputdirectory);

return filename;

You can deliver the message to 2 different business components always instead of switching over of components/file system.

Thanks and Regards - Rajesh PS

former_member285898
Participant
0 Kudos

Hi Rajesh,

Thanks for your inputs... I have shared my inputs above for the same. Please check and let me know in case of any.

Regards,

Karan K.