cancel
Showing results for 
Search instead for 
Did you mean: 

Step by step document for writting VBA code for EPM reports

Former Member

Hi Folks ,

Is there any step by step document for writting vba code for EPM reporting .

If somebody can help me with the document . I do have programming experience but not with excel macros. I do have some understanding with vba or macro code

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor

Sorry, but there is no difference between writing generic VBA code and VBA code using EPM API.

Just reference the required library statically or dynamically. Then use procedures and functions described in EPM help - API section.

https://help.sap.com/viewer/ec68e48b18a44a49abb12b8ee8ae306f/10.0.30/en-US/f9b366096faf1014878bae8cb...

Answers (1)

Answers (1)

SeerOfSig
Advisor
Advisor

A couple of points to keep in mind to avoid some common problems:

1) Read up on early binding and late binding and if possible use late binding. This can prevent errors from occurring when upgrading the EPM Add-in to a later Service Pack. See SAP Note 1931195 regarding this.

2) Keep in mind that the EPM Add-in API and the Analysis for Office API have different names. This is important because the Analysis for Office add-in can also run classic EPM reports, so if you have end users who may have a mix of EPM Add-in or Analysis for Office Add-in, or if you plan on changing from EPM to AO add-in in the future, you need to call a different API. SAP Note 2451876 provides an example of code that can be used to detect which Add-in is installed and call the appropriate API.

Regards,

Peter Kreutlein

former_member186338
Active Contributor

Just a small correction: the API (collection of functions and procedures) is the same for standalone EPM and EPM as a part of AO. The library is different and the object reference has to be set differently like in the sample from note: 2451876