Senderport + Idoc number in Filename

 Requirement is to place the file with the below naming convention:


"senderport" + ORDERS + "IDoc Number" + .eof


ex. PRDORDERS_1192934631.EOF


Here, the sender port is   SAPPRD


To achieve this:


Use a UDF 








Use FORMATNUMBER function to remove the leading zeroes.




















UDF Code:


String name = null;

name =  a + "ORDERS_" + b + ".EOF";


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


if(conf!=null)

{

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

conf.put(filename, name);

}


return a;

 


--------------------------------------------------AMOR FATI---------------------------------------------------









Comments

Popular posts from this blog

HTTP Retry - Groovy + Looping Process Call

Content Modifier - Concatenate Array Inputs ( Dynamic Parent Node)

Headers and Exchange Properties