Skip to Content
Author's profile photo Maximiliano Colman

Number Range Configuration Service

Hi experts,

I am an integration consultant who continues to develop his skills in Cloud integration.

As you know, the enterprise version of Cloud integration includes the possibility of creating a range of numbers( link ), and you have a beautiful Web-Based-Monitoring tool to maitained them ( link ), but for a reason there is not much information about how to use it in our IFLOWs.

Cloud integration provide a very interesting types of APIs ( link ) , If you check the JAVA Generic API then you will find the package named “com.sap.it.api.nrc”:

 

And inside it you will find the invaluable and mysterious interface “NumberRangeConfigurationService”:

This interface has a very usefull method called “getNextValuefromNumberRange”:

so… You will be wondering, how can I use it in my IFLOWs?, check the following groovy function( UDF for PO guys 😉 ):

 

import com.sap.it.api.ITApiFactory;
import com.sap.it.api.nrc.NumberRangeConfigurationService;

def String getNextNumber(String NRO_NAME) {
    
 def NRCS = ITApiFactory.getApi(NumberRangeConfigurationService.class, null);
 def MY_NEW_NUMBER = NRCS.getNextValuefromNumberRange(NRO_NAME,null);
 
 return MY_NEW_NUMBER; 
}

This function has as parameter the name of the NRO, obtains the service “NumberRangeConfigurationService”, and invokes the method “getNextValuefromNumberRange” to obtain the next number of our NRO.

 

Enjoy it! 🙂

 

Max.

Assigned tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Michelle Crapo
      Michelle Crapo

      Very nice! I've used the function module in ABAP. It was interesting to see how you found it in CPI-PS.

      I love the screen shots,

      Michelle

      Author's profile photo Gagandeep Batra
      Gagandeep Batra

      Hi Max,

      Thanks for sharing, Can we directly add this  in our UDF without enterprise licence.

       

      Regards

      GB

      Author's profile photo Maximiliano Colman
      Maximiliano Colman
      Blog Post Author

      Hi,

      You can add it, but it will fail in runtime, as I said this feature come in the enterprise version.

       

      Kind Regards.

      Max.