Recently I have been involved with several integration projects between different EPM products. Initially it was quite challenging because as with any integration project the devil is always in the detail. The great thing with SAP EPM products is that there are web services for major processes and functions that need to be performed.

I needed to invoke a web service for an EPM product but had to do it in SAP BPC NW. Now there is several methods to invoke a web service from BPC NW, but it wouldnt be transportable to the MS product. So the solution was to invoke it from the client machine using VBA because on the client machine it can invoke any web service. Because SAP BPC uses Microsoft Office, you can create custom macros and VBA code to execute specific functions and functionality.

The answer to my particular challenge was to invoke a Web Service using custom VBA code embedded in an BPC Input Schedule and Report. Now there are several tutorials and links out on the internet which give you sample code to invoke a Web Service using VBA, but one of the major reasons for writing this blog is is to show how this approach can be used to solve several challenges and how powerful it can be.

Imagine some of the following scenarios:

Invoking a FIM job from a click of a button on a report or input schedule.

Invoking a BPC web service to perform a specific action

Export data of BPC into another EPM application but simply invoking a web service to create a KPI in SSM

If you are able to get the WSDL of the Web Service, you can build your SOAP message and invoke the web service to perform the desired function. This VBA code is used to call a SOAP Web Service. It is possible to invoke a REST Web Service which BPC 10 uses, I will do this in another blog detailing a scenario in which this code could be used to solve certain business requirements.

VBA Code example : This is a simply Sub Routine in which will invoke a web service using the MSXML2 Object. This object is part of the Microsoft XML 6.0 library which is a pre-requisite for the EPM Add-In and should be installed on all client machines.

Normally I am not a big fan of using custom VB code in BPC Input Schedules and Reports because of the complexity it can introduce and that in allot of occasions you can expect unexpected behavior on different clients. For example: It works on a Windows 7 machine, but doesn’t work on Windows XP, etc. So a word of caution when using this approach is to understand the risks associated with running code on the client and its implications regarding security.

Do you have an example which is also working when the url is https? I am trying to use the same to connect to a web service in C4C, but it is not working. It is most probably the certificate not accepted by the XMLHTTP object, but I am not able to resolve the issue.