cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos
509

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

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:

former_member186338
Active Contributor
0 Kudos

P.S. Report can be like:

With RAND to always send a new data...

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

0 Kudos

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?

former_member186338
Active Contributor
0 Kudos

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...

former_member186338
Active Contributor
0 Kudos

Sample custom error message generated by write back badi:

Imaging that in this string you program your security info!

Is it clear?

0 Kudos

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

former_member186338
Active Contributor
0 Kudos

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

Look on the old sample (still valid!)

https://archive.sap.com/documents/docs/DOC-4218

0 Kudos

Going to read that doc.

Thank you again 🙂

former_member186338
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

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