B2BIC NRO is generally used in EDI scenarios where the requirement is to send document numbers to customers in series which is not possible in the case of IDocs because IDocs are not created in sequence per customer.
Generally in B2B transactions, the flow is most likely IDoc to EDI via AS2/SFTP, etc. Where customers want the document number in series or shall I say in the order. This is not possible when sending the IDoc number as a document number.
In middleware (SAP PI/PO) we have NRO in b2bic which can be used to fulfill this requirement.
To set up the NRO in the system B2B Add-on needs to be installed on the PO server. I am assuming it is already installed on the server and the following steps need to perform to use range objects.
Go to B2B Integration cockpit by calling the below URL in the browser.
http://<host><port>/b2bic
B2B Integration Cockpit Home Page
Click on NRO Maintenance then click on
Create to-create Number range objects.
Create range objects
Below are the fields which need to be filled to me the NRO active.
Number range object name |
/B2B/<PARTNER_NAME_OBJ> |
Description |
Provide the description |
Minimum value |
Starting range of the document number for partner |
Maximum value |
Last range of the document number for the partner |
Formatted Value Length |
Same as format by number in graphical mapping just give how many leading 0’s need to be format |
Warn Level (%) |
Specify warning level in percentage in case the number range is about to reach its maximum |
Rotate |
Checked in case if number range is on its maximum value it will start from its minimum value again |
Note: when rotate is checked Warn Level will no longer be in operation because there is no significance in giving a warning on reaching NRO to its maximum range.
create range object
Suggestion: Whenever creating an NRO try to give the name of the partner in the name section and use value mapping/Fix Value to get this name. This will be helpful when you have a single common mapping in your PO landscape for all the customers. You can use these Objects in all the Outgoing EDI Messages as per the requirements.
Once you create an object it will start reflecting some more fields which are also editable only after object creation. Here in case, a range object is created for an existing interface or partner you can edit the last document number for the partner which sent last.
EDI range objects
To use this NRO in mapping you need to use one constant and enter the following character sequence.
$B2B_UEBNR
<Number_Range_Object_Name>$B2B_END_UEBNR
This will provide you the next number of a range object, in the same way, if you need to get the last/previous number of the range object you can write the following character sequence in the mapping with a constant.
$B2B_UEBNR_BEFORE
<Number_Range_Object_Name >$B2B_END_UEBNR
Example: In your NRO you have provided the name of your object as PARTNERDOCNUM
Then in Message mapping how it should be configured.
range object in message mapping
Also as per the design, it can be changed by fetching from ID by using value mapping or with Fix value depending freely on the design.
Note: This will not work if you are trying to test your MM/OM in a local run (ESR). This will be operational only in the end-to-end scenarios.
To get the range objects values one module needs to be configured in the receiver channel
Module name: localejbs/TransmissionNumberModule
This module has several parameters that can be used as per the requirement:
multipleNumbersPerMessage |
If you want to insert multiple continuous numbers in a message, then use this parameter. |
useLocalLock |
If you want to acquire a lock on the individual NRO that is being used instead of a global lock, then use this parameter. Its default value is true. |
sourceEncoding |
Defines the encoding of the input message. If not specified the default value is ISO-8859-15. |
destinationEncoding |
Defines the encoding of the output file. If not specified the default value is ISO-8859-15. |
range object module configuration
Once you run the scenario end-to-end this module will write the actual range number in place of your constant which you have written in message mapping.
Note: If you are verifying the range number value in the message monitor it will not be there you will see only the constant value in the payload. Because the module is not yet called in the message transformation it will call only when the payload is transferred to the communication channel. So on the receiver side, only this value will appear.
It would be great to see community responses or feedback in the comment section.
For more details and blogs on SAP PO:
https://community.sap.com/topics/process-orchestration
Community Group Link:
https://blogs.sap.com/tags/477916618626075516391832082074785