Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

Issue while creatinf UDF

$
0
0
We are using a UDF to get the file path into the target field as below :
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
String ourSourcePath = conf.get(key);
return ourSourcePath;
Now my requirement is to write another UDF that extract the values form last back slash.....
For eg if the file path is  AUSYDSRVC4441\Test\PM\Inbound\Citec\Measurement Documents\3300
(The above UDF extracts the filepath)
I want the 3300 to be extracted....
I have tried writing another UDF for the same in a way that the above existing UDF output is input to this UDF in below manner::
String code  = ourSourcePath.substringourSourcePath.lastIndexof("\") + 1);
return code;
This shows syntax error ....
Can anyone please help on this?

Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>