Usually number range objects in b2b addon are used to count the sent messages one after another.
However it is possible by implementing SAP note 2035054, like found in this blog here: NRO access from mapping (ESR), to use the number range objects as a counter within SAP PO.
Let’s say we want do not have the possibility to use a lookup function to ECC or other systems and we need to implement a counter variable accessed and updated within our mappings.
So here is my solution for this by using the number range objects.
For this we will use the combination of the user defined function getNROWithName to fetch the current counter value – and for updating the counter value we will use the user defined function getNROWithName.
The UDF getNROWithName will not update the counter value.
Implementation Example
Within the QTY segment we want to populate the field D_6060 with the accumulated already delivered quantity. Further we want to update the value of this counter.
For accomplishing this we need to implement the function getNROwithName. Afterwards we update the counter value with the UDF updateNumberRangeObject.
The UDF getNROWithName reads the current counter value from the NRO and writes it into the field D_6060.
Within the variable updateNRO we do the following:
First, the current counter value is fetched and the current delivery quantity for this value is added (upper tree in the illustration). Then, this updated value is used to update the NRO.
Update of the values / Logging of this specific NRO
Within the log of the Number Range Object (NRO) Maintenance you can investigate the behavior of the last calls of this NRO.
Discussion
Advantages:
Disadvantages:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 |