Skip to Content
Author's profile photo Bhavesh Kantilal

HCI/HCP-IS: SFTP Adapter – Search for HCI Messages using FileName


PI developers are aware of our ASMA Parameters ( Adapter Specific Message Attributes ) and how these can be used for User Defined Message Searches in PI.What about HCP-IS/ HCI? Can we search for the messages by FileName in the Message Monitoring of HCI when using Sender SFTP Adapter?

This blog is an extension to this blog of mine : HCI/HCP-IS: IDoc Adapter Deciphered – Part 2 – Using IDoc Numbers/Other Fields to search for your message in HCI and while I would recommend to read that blog as a per-requiste, you can also read this independently as well.


Lets consider a very simple SFTP –> HCI –> SFTP Scenario. A Sender SFTP Adapter picks up a file and then pushes it to to a Receiver SFTP Channel. How would you search for the status of a Message by File Name? The Receiver SFTP Adapter configuration is not of significance to us and the receiver adapter can be any adapter you like.

This is what your typical SFTP –> HCI –> SFTP Point to Point Integration Flow looks like,

Add a Content Modifier to Enable File Name based Search for Messages

  • Content Modifier Tab : Header
  • Name: SAP_ApplicationID
  • Type: Header
  • DataType: java.lang.String
  • Value: CamelFileName

That’s it! With this simple configuration you can now search for messages using your SFTP File Name.

Testing your Configuration

  • Test Case#1: Name of File Processed by HCI – orders20160810035742.xml. Search within Message Monitoring successful

  • Test Case 2#: Search for a filename that does not exist will lead to no messages found info

  • Test Case3#: Wild Card Characters. Not Supported šŸ™   ( As On the 1st publication of this blog. Do check SAP documentation as this could change in the future )


Setting up search for messages in HCI with SFTP FileName is as simple as adding a Content Modifier Step.

In SAP PI configuring User Defined Message Search was much more complicated. In HCI, defining User Defined Search criteria is as simple as adding a Content Modifier step and using the Header SAP_ApplicationID. While this blog deals with the SAP_ApplicationID being assigned a CamelFileName Header, you can also use other fields from the Payload using XPATH as well ( Topic for another blog? )

Unfortunately at this moment (at the point of publishing this blog) only one Key can be used per message but this could still prove to be a very useful feature to use in your Integration Flow as you start building complex Integration Patterns and have a high volume of Interchanges!

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Apu Das
      Apu Das

      Thanks for sharing this Bhavesh. Really good one .



      Author's profile photo Harish Mistri
      Harish Mistri

      Another great blog for HCI learning. Thanks for sharing.

      Author's profile photo Former Member
      Former Member


      I want to send csv reports generated from ByD to SFTP server via HCI.

      the files are coming, but the filesname are converted to ID-vsa3318385-53531-1512938368566-99-7

      could you please advise me how to retain the names of the files like in ByD (Customers_2017-11-30T14:19:43 CET.csv)



      Author's profile photo Sidharth VR
      Sidharth VR


      Step 1: Add a content modifier and declare Message Header asĀ CamelFileName , Type as Expression, Value asĀ ${file:onlyname}. Leave the SFTP channel as blank. you will get the file name.



      Sidharth VR