cancel
Showing results for 
Search instead for 
Did you mean: 

SAP BPC 10 how to set members from array to row axis in report using API

0 Kudos
297

HI experts!

is anybody knows how to set members from array to row axis in report using API? i know that is not best practice, but in current project it may be best solution then current. i found members AddMemberToRowAxis and RemoveMemberFromRowAxis of class EPMAddInAutomation. but there's impossible to delete all members from row axis before additing new members. although for sure there is, but I don't know how.

or is there a way to recognize members for row axis using the API?

View Entire Topic
former_member186338
Active Contributor
0 Kudos

Easy:

GetRowAxisMembers

Then:

RemoveMemberFromRowAxis

P.S. But there are number of limitations of this method.

Please describe your requirements and provide a sample report.

0 Kudos

Thanke you for your answer, but there is no need to get members from the row axis. we already have array of members, which have to put to row axis. Like function EPMDimensionOverride, but for more then one dimension in row axis.

former_member186338
Active Contributor
0 Kudos

Then I do not understand your question!

If you know members in Row axis you can delete members using RemoveMemberFromRowAxis

The last member can't be deleted. You have to insert new member then delete the last member.

Another option is to enable Member recognition and insert members in cells.

0 Kudos

Yes, the last member can`t be deleted and i thought, that there is a different way to additing override row axis. i still trying to delet members befor additing new, but i have error "Can not remove all members of a row axis". it may be the result of duplicated members in axis. befor deleting members i get array by GetRowAxisMembers and then remove their form axis by name.

and second quastion: how to enable Member recognition by API after inserting members to cells?

former_member186338
Active Contributor
0 Kudos

What is the first question?

"how to enable Member recognition by API after inserting members to cells?" - you have to enable member recognition before Member insert!

former_member186338
Active Contributor
0 Kudos

P.S. Can you explain the business requirements? Why do you need to generate axis in VBA????

0 Kudos

Yes, "Activate Member Recognition" in Sheet Options, that's what I needed!

Thank you very much, Vadim.

former_member186338
Active Contributor
0 Kudos

Yes:

epm.SetSheetOption(ThisWorkbook.Worksheets("Sheet1"), 2, True)

0 Kudos

we need two dimensions in row axis. the members of one of these dimensions linked to another "one to many". and it may be implemented using Selection Relationship: Dimension Property. but this way you can't add not linked members to second (another) dimension in row axis.

now i can create report in hidden sheet with linked members in axis. get them into array and then fill another array with members from first array and unlinked members.

members of second array will be row axis in report in visible sheet.

former_member186338
Active Contributor
0 Kudos

May be you can use 2 reports with shared page and column axis.

First report will be with the relationship by property and the second - to insert lines.