Hi Gayathri,
It is very simple . Whenever you use ASMA with SFTP use namespace of File adapter that is -
In your UDF , change http://sap/com/xi/XI/System/SFTP to http://sap/com/xi/XI/System/File.
It will solve your problem. For reference on UDF code follow -
regards,
Vikas