Skip to Content
0
Apr 18, 2017 at 05:34 PM

B2B Add-on NRO(Number range Object) usage in file name construction

1952 Views Last edit Apr 20, 2017 at 07:42 PM 6 rev

Hello,

My interface is Proxy(xml)->PI->SFTP(EDIFACT).

I would like to use the sequential number generated by NRO to construct the filename(Ex; EDI_DELFOR_<NRO unique sequential Number>). So i have implemented dynamic configuration UDF in mapping along with required NRO module in receiver file channel but not able to get unique sequential number to filename, rather I am getting a constant value as $B2B_UEBNRTestNRO$B2B_END_UEBNR.

I am able to get a sequential number in file if i mapp this($B2B_UEBNRTestNRO$B2B_END_UEBNR) to one of the field in target structure.

Module:

FileName UDF:

public String FileName(String a, 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"); conf.put(key,a); return a;

}

catch (Exception e)

{

String exception = e.toString();

return exception;

} }

Attachments

nro.jpg (33.1 kB)
filename.jpg (16.8 kB)