Skip to Content

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


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.


FileName UDF:

public String FileName(String a, Container container) throws StreamTransformationException




DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); DynamicConfigurationKey key = DynamicConfigurationKey.create("" , "FileName"); conf.put(key,a); return a;


catch (Exception e)


String exception = e.toString();

return exception;

} }

nro.jpg (33.1 kB)
filename.jpg (16.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 20, 2017 at 06:16 AM


    The reason why you are getting value as constant $B2B_UEBNRTestNRO$B2B_END_UEBNR because you are passing the value EDI_DELFOR_$B2B_UEBNRTestNRO$B2B_END_UEBNR as a header level constant and not in the payload , TransmissionNumberModule check only the values in the payload and not at header level hence the value is not replaced with counter.

    But when you pass $B2B_UEBNRTestNRO$B2B_END_UEBNR in one of the target filed the this is replaced with the counter as this is present in the target payload.

    So if you still want to implement NRO for the filename counter then you need to call the NRO via java api in the mapping level and the increment the value in that case you don't need TransmissionNumberModule.

    Check this Blog on how to access NRO API via java at mapping level:

    Note to test this you have to run interface from runtime , local ESR test gives error.


    Add comment
    10|10000 characters needed characters exceeded

    • No the particular NRO variable which you are accessig via api will be updated at mapping execution only it wont be updated at Module level again.

      But those left out NRO variable which u r not accessing via api will be updated at module level.

  • Apr 24, 2017 at 03:00 PM

    Hello Manoj,

    I have the jar file from PIB2BCONTENT.SCA and imported to my custom SWCV of namespace. But i am confused how to set the dependency with this imported archive in function library.

    Below lines from SAP Note : 2035054


    The extracted ‘.jar’ file ( from the ‘PIB2BCONTENT.SCA’ archive should beimported into the repository as an “Imported Archives” object.A newly or an existing function library should be used with this new imported archive as a dependency.


    Add comment
    10|10000 characters needed characters exceeded

    • Bhavana,

      Additionaly to this Imported Archive you need to have a function library too which has all the required UDF's , i would suggest you to go through the blogs again which clearly explains :

      Import the right Libraries
      First of all, we need to import the extracted from the PIB2BCONTENT.SCA to the ESR.
      Additionally to this you need the EJBJEEArchive as well to get all functions of this API working