Skip to Content

Why this blog?

I want to share with the community how easy you can use a number range object within, in this case, a graphical message mapping.

Scope and context

The Number Range Object (NRO) module provides the option to insert automatically continuous counters into an incoming and outgoing message.

These numbers can be created and are oriented towards the defined intervals in the respective objects.

NRO’s can be created and edited via a special maintenance screen. This can be accessed directly via URL
http://<host>:<port>/webdynpro/dispatcher/sap.com/nro~maintenance/NROMaintenance or via the B2B Integration Cockpit.

The NRO configured for this blog is /B2B/TestNRO.

Configuration

PICTURE1.jpg

Remark

You can clean them up using background job AssignedNumbersCleanUp.

Within a graphical message mapping, you have to use this constant:

PICTURE2.jpg

The module replaces every occurrence of this constant with the last number associated the <NRO> used.

To enable the replacement of the NRO variable by the real value, do not forget to include the adapter module:

PICTURE3.jpg

No further configuration is necessary and you are ready to go!

To report this post you need to login first.

21 Comments

You must be Logged on to comment or reply to a post.

    1. Dimitri Sannen Post author

      Hi Andreas,

      To allow the system to read the variable and replace it with an actual value, you must add this upfront: $B2B_UEBNR_BEFORE. After the variable, you must add this: $B2B_END_UEBNR.

      That’t the way it works.

      Kind regards,

      Dimitri

      (0) 
      1. Andreas Holmberg

        That’s the way a lot of things work in PI. Very error-prone. One would hope that dropdowns, select lists and “pre-filled” selection opportunities would be spread to SAP PI development department.

        (0) 
        1. Dimitri Sannen Post author

          Dear Andreas,

          Please have a look at the Idea Place, like Mariana mentioned.

          Nothing and nobody is 100% perfect. This is also the case for SAP software. But we can try to make it more perfect.

          Use your criticism and personal experience and convert that into a brilliant idea.

          Looking forward to it!

          Kind regards,

          Dimitri

          (0) 
  1. Vishnu Prasad K

    Hi Dimtri,

    I noticed that you have used $B2B_UEBNR_BEFORE in the mapping. Is it on purpose? 😕 This constant will return the same value for all the transactions unless the message content itself contains the constant mentioned below. If you have used the constant $B2B_UEBNR<nroName>$B2B_END_UEBNR, the numbers get incremented.

     

    Regards,
    Vishnu

    (0) 
      1. Bhavana C

        Hello Dimitri,

        what are the roles to be added to the user in order to get “Create” option enabled for NRO through B2B Integration Cockpit.

        I have below roles added to my user already…

         

        SAP_XI_B2B_CONFIGURATOR_J2EE

        SAP_XI_B2B_ADMINISTRATOR_J2EE

         

        Thanks

        Bhavana

        (0) 
  2. Dimitri Sannen Post author

    Hi Bhavana,

    Make sure role SAP_PI_B2B_NRO_ADMIN is assigned. There is also a read only role available: SAP_PI_B2B_NRO_READONLY

    Kind regards, Dimitri

    (0) 
    1. Bhavana C

      Thank you Dimitri. It worked !

      I have another question – How do we transport NRO & copy control key scenrios that is created in DEV to QA->PROD ?

       

      Thanks

      Bhavana

      (0) 
  3. Dimitri Sannen Post author

    Hi Bhavana,

    Unfortunately, that is not possible.

    Please export the configuration on the development system and import it into the target system.

    Kind regards, Dimitri

    (0) 
    1. Bhavana C

      Hello Dimitri,

      Thank you for your reply. I understand export/import option with EDI Content Manager in B2B Integration Cockpit but i did not see any option for NRO.

      Thanks

      (0) 
        1. Bhavana C

          Hello Dimitri,

          Got it. Thank you. Now I have a different issue on how to use this NRO generated unique number with in file name construction. I am using dynamic configuration UDF in mapping to create file name dynamically but I am getting a constant value “$B2B_UEBNRTestNRO$B2B_END_UEBNR” in file name.

          I have used Dynamic configuration UDF in mapping along with NRO module in receiver channel.

          I have raise a thread in PI forum, could you please help me how to solve this? Thank you very much.

          https://answers.sap.com/questions/180346/b2b-add-on-nronumber-range-object-usage-in-file-na.html

          Thanks,

          (0) 
        2. Bhavana C

          Hello Dimitri,

          Can we export/import control key association from Dev to QA ? or do we have to configure manually in QA system ?

           

          Thanks

          (0) 
  4. Uday Suvvada

    Hi Dimitri,

    I have used the NRO Functionality in one of my interface where it is Generating a Sequence number using NRO and adding the same to target file name.but unfortunately i am getting errors for some messages stating that “Transmission Number Module was not able to aquire lock”.

     

    Can you please help me on this..

    Thanks & Regards

    Kumar

    (0) 
      1. Uday Suvvada

        Hi All,

        I am Getting NRO lock error while message processing in the receiver SFTP Channel. As i have used NRO in the file naming of the target file that was sent to receiver.

        File Naming Convention : Cylinder_%MessageNumber%_.xml.

        As the messagenumber field hold the NRO Variable.

        please provide your valuable inputs on this issue.

        Thanks & Regards

        Uday Suvvada

        (0) 

Leave a Reply