Skip to Content
0
Former Member
May 10, 2016 at 11:50 PM

Dynamic File name SFTP (SFTP ADAPTER 1.0)

146 Views

Hello,

I am using simple SFTP (SFTP ADAPTER 1.0) to proxy scenario in our SAP PO.

I am trying to assign source file name using below UDF:

public String getFileName(Container container) throws StreamTransformationException{

try{

DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);

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

String SourceFileName = conf.get(key);

if( SourceFileName == " " )

{

SourceFileName = " LTB_CBUR_MissingFile" ;

}

conf.put(key, SourceFileName);

}

catch (Exception e)

{

String exception = e.toString();

return exception;

}

return "1";

We are getting null pointer exception.. I have tick marked set adapter specific message attributes on sender CC.

Thank you

John