Skip to Content

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.

NOTE

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’
DESTINATION ‘SAPECC200’
 EXPORTING
   SYSTEM_SOURCE                 = lv_source
 IMPORTING
   DOC_TYPE                      = lv_result
  EXCEPTIONS
    CX_FDT                        = 1
    CX_FDT_NO_RESULT              = 2
    CX_FDT_ARITHMETIC_ERROR       = 3
    CX_FDT_PROCESSING             = 4
    OTHERS                        = 5
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

write: lv_result.

 

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.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Avishek Gorai
    Great Michal,

    This is exactly what I wanted to do. Additionally I think we can try calling this from a RFC lookup of PI 7.1.

    Regards,
    Avishek.

    (0) 

Leave a Reply