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
Remark
You can clean them up using background job AssignedNumbersCleanUp.
Within a graphical message mapping, you have to use this constant:
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:
No further configuration is necessary and you are ready to go!
Could you explain the constant value?
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
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.
Hello Andreas,
Ideas can be submitted and validated on Idea Place (look for PI category): https://ideas.sap.com/SAPNetWeaverProcessOrchestration
You can use your SCN log in.
Top voted ideas get reviewed by SAP Product management and eventually taken for implementation.
Kind regards,
Mariana
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
Thanks…helpful blog.
Regards,
Gurunath
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
Hi,
Yes, you do need to use that one as a variable. I did not choose this name myself 🙂
Kind regards,
Dimitri
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
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
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
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
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
NRO objects must be recreated. Other content can be ex/imported
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,
Hello,
I have followed below blog to call NRO from message mapping using JAVA API and able to resolve the issue.
https://blogs.sap.com/2016/09/01/use-case-nro-api-access-dynamic-counter-variable/
https://blogs.sap.com/2016/09/01/nro-access-from-mapping-esr/
Thanks!
Hello Dimitri,
Can we export/import control key association from Dev to QA ? or do we have to configure manually in QA system ?
Thanks
You can export/import, but keep in mind that sender/receiver systems can be different. That was in my case.
Hello Dimitri,
I have NRO configured and live in production. But we often see below error.
Thanks !
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
Hi,
Ca you share the exact error and more context please?
Kind regards, Dimitri
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
Hi Dimitri,
what happens when number of msgs goes out of the maximum defined value ?
Thanks
Hi,
The counter will be reset, if I’m not mistaken.
So, please make sure your range is wide enough.
Kind regards,
Dimitri
Thanks !
Hi Dimitri,
As per your above inputs i can understand that we can’t transport NRO.
my question is, any possibility to make NRO transport in latest versions i.e 7.5 Single stack
Help me with your comment here…
Thanks & Regards,
Manohar Reddy
Hi,
Hint: keep an eye on future B2B add-on releases and updates 🙂
Kind regards,
Dimitri