cancel
Showing results for 
Search instead for 
Did you mean: 

How to to call function module from BW in VBA from Analysis for Office workbook?

former_member245939
Participant
0 Kudos

Dear Experts,

I need to convert some BEx workbooks into Analysis for Office. These workbooks have VBA macros in order to call function modules from BW by RFC (using the function GetBExConnection to establish connection). I have found some quite an old information

(2013 year), that Analysis for Office does not support RFC by macro. Please let me know maybe in new versions of product this opportunity exists and how to use it?

Best Regards,

Sergey Musatov.

0 Kudos

Hi sergey.musatov, Were you able to get a solution on this? Thanks.

former_member245939
Participant
0 Kudos

Hi chandrasen.tekchandani

We have built .Net Application.

To get current connection parameters (sy-mandt, sy-uname, sy-langu) BAdi RSAO_GET_INITIAL_APPL_CONTEXT was used. Other parameters e.g. 'system' or 'application server' could be retrieved by parsing 'saplogon.ini' or 'SAPUILandscapeGlobal.xml' files .

former_member245939
Participant
0 Kudos

In previous comment 'SAPUILandscape.xml' file should be considered instead of 'SAPUILandscapeGlobal.xml'.

0 Kudos

Hi Sergey Mustatov,

We are currently calling RFC function modules from BEx Analyzer VBA to directly update data to the DSO. Is it possible to use the same RFC function modules and call them from AO?

Thanks,

Srinivas.

former_member245939
Participant

Hi chandrasen.tekchandani,

It is possible to use the same RFC function modules. No need to change backend functions.

You should only create your own connector from AO to BW as there is no equivalent of SAPBexGetConnection in AO.

0 Kudos

Hi sergey.musatov

Can you share a sample code of the .Net application mentioned above? Did you use VB .Net or C#?

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member245939
Participant
0 Kudos

If someone supports this idea, you can vote fot it :
https://influence.sap.com/sap/ino/#/idea/144230

reyemsaibot
Active Participant
0 Kudos

What do you want to do? You could build a .Net Application with the .Net Connector from SAP and call RFC.

Or what is your goal with VBA?

former_member245939
Participant
0 Kudos

Hi Tobias!

I want to call function module by RFC to get calculated data from BW infoproviders. I'll try to explain why using FM and not Bex queries:

While executing, function module gets data from one or more BW infoproviders (cube, DSO) and then does a lot of complex detailed calculations using and analyzing the structures of two or more infoobject hierarchies. All calculations are made by the application server and are saved to memory, not to query dataproviders in Bex excel worksheet. Bex query is only used to show selection screen to the user and to get variable values from it. Then these values are sent to function module as input parameters. The result of function module execution is a table with data. This data is then copied to report sheet without any calculations. It's very fast and convinient way to get complex structure report on BW data.

I have been using this approach in Bex, and now it's time to try the same method in Analysis.

Could you please share some wisdom how to build a .Net Application with the .Net Connector from SAP and call RFC? Maybe you have a simple example?