In one of my previous articles: PI/XI: BRFPlus – an alternative for value mapping tables and Z-tables for integration I described a possibility of using BRFPlus engine as an alternative for using standard value mapping tables and Z-customizing tables in integration scenarios. The idea of this scenario was using the BRFPlus engine installed locally on SAP PI (which comes with EhP1 for NW stack). What if we’d like to use some other BRFPlus engine? Let’s imagine we’d like to use the BRFPlus installed on ECC – so on an application system to which business users have direct access and on which those rules can be easily maintained as on a central BRFPlus repository. Is there a way to call those rules on ECC from PI then? As I mentioned in my previous blog the standard way would be to do it via web service which can be generated from any BRFPlus function but is this the only way? It turns out we can do it in a little bit easier way via RFC enabled function module which gets created during web service generation. As you can see on the screenshot below in order to generate a web service we need to give a function module name.
Once we generate this web service the RFC enabled function module is also available and you can call it from PI mapping (ABAP mapping for example). you just need to create an RFC destination on PI pointing to ECC (via SM59 – RFC type 3) and call this new function module with destination option as shown below.
I’m using the same function as created in my previous article about BRFPlus.
|DATA: lv_source type /SAPTRX/LOGSYS.
DATA: lv_result type FDT_TEXT_SSTRING.
lv_source = ‘ECCPRD’.
CALL FUNCTION ‘Z_DEMO_RFC’
Hope this little trick will convince some of you that using BRFPlus’s rules stores in ECC can be easily invoked in SAP PI even without using web services at all.