Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
konrad_thalheim3
Active Participant

A while ago I discovered SAP Note 2035054 which includes a java code and a documentation of a programmable API to access, read, create and update number range objects (NRO) in SAP’s B2B Addon.

This blog is a short summary of a how to implement this API.

Import the right Libraries

First of all, we need to import the extracted com.sap.aii.nro.interface.filter.jar from the PIB2BCONTENT.SCA to the ESR.

Additionally to this you need the EJBJEEArchive as well to get all functions of this API working.

Implementation Example createNewNRO


Let‘s assume we need an UDF which creates a new number range object (NRO) during runtime.

We would like to mass upload updated NROs to the b2b integration cockpit from a XML file. We maintain the XML file with a standard tool like MS Excel and upload it via a file or SOAP channel to the b2b integration cockpit.

Our implementation (message mapping) for this specific use case looks like this:

Due to the tests we created these NROs:

The successful access of NRO API can be reviewed in the log of the specific

Our implementation example of createNewNRO was taken from SAP Note 2035054.

Other code snippets and examples can be found in SAP Note 2035054 for the following UDFs

createNewNumberRangeObject

getNumberRangeObjectWithName

setDeleted

getAndUpdateNumberRangeObjectWithName

updateNumberRangeObject

Limits


Because of the execution of the UDFs during runtime, the NRO will be updated with getAndUpdateNumberRangeObjectWithName regardless the mapping program has finished successfully or not. Therefore multiple restarts of your mapping will cause multiple updates of the NRO. So this behavior should be considered by the b2b designers.

To prevent this use the read function of this NRO interface API and update the NRO at the end of the mapping.

Summary

This API is a great way to manage NROs within any mapping. It opens a wide range of use for b2b developers in SAP b2b addon.

7 Comments
Labels in this area