Skip to Content

SAP BPC EPM Add-In. how to get security info about user using the API VBA in Excel?

Aug 03, 2017 at 07:17 AM


avatar image

Hi everyone! Is anybody knows how to get security info about user (like Team, Task Profile, Data Access Profile) using the API VBA in Excel? This info is needed to determine ability to push the button on a report sheet.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Vadim Kalinin Aug 03, 2017 at 09:47 AM

The only way it can be done using write back badi:

In write back badi you check for some specific dummy members intersection and reject the value with error message!

In this error message you provide string with Team, profile etc... (define some format to parse later).

Then you create extra worksheet with some input form that will write some value to the specific dummy members intersection.

In VBA use:

Option Explicit

Public api As New FPMXLClient.EPMAddInAutomation
Public submres() As FPMXLClient_OlapUtilities.SubmitResult 'Array!!!

Public Sub SubmitData()
Dim lngTemp As Long

submres = api.SubmitWorkSheet(ThisWorkbook.Worksheets("Sheet1"))
For lngTemp = 0 To UBound(submres)
    MsgBox CStr(submres(lngTemp).ErrorMessage)
Next lngTemp
End Sub

ErrorMessage will contain required info!

Don't forget to add references:

epmref.png (37.8 kB)
Show 8 Share
10 |10000 characters needed characters left characters exceeded

P.S. Report can be like:

With RAND to always send a new data...

P.P.S. This worksheet can be hidden!

submrep.png (10.1 kB)

Hi Vadim!

Thank you very much for good idea.

But unfortunately ErrorMessage (and other properties) not contaned info about user security. Only info about target slice. Perhaps this is due to the choice of a node member for writing. maybe i have to get different error, wich return report with requaired info?


Looks like you don't understand me!

In the write back badi in ABAP you create your OWN error message and you program the string to be shown as error message. In abap you can easily get info about teams, profiles etc...


Sample custom error message generated by write back badi:

Imaging that in this string you program your security info!

Is it clear?

errmsg.png (41.0 kB)

Yes, at first I did not understand you. But unfortunately this way not suit for me. i don't know ABAP.


Time to learn :) And it's not a hard work - like 50 lines of code!

Look on the old sample (still valid!)


P.S. there is no other way to get security info from EPM. Please accept the answer and close the question!


Going to read that doc.

Thank you again :)

Vadim Kalinin Aug 03, 2017 at 09:02 AM

Unfortunately there is no way to get this info - no API provided.

10 |10000 characters needed characters left characters exceeded