Skip to Content
0

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

Dec 01, 2017 at 08:22 AM

46

avatar image

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?

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

1 Answer

Best Answer
Vadim Kalinin Dec 01, 2017 at 08:43 AM
0

Easy:

GetRowAxisMembers

Then:

RemoveMemberFromRowAxis

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

Please describe your requirements and provide a sample report.

Show 9 Share
10 |10000 characters needed characters left characters exceeded

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.

0

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

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?

0

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!

0

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

Thank you very much, Vadim.

0

Yes:

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

0

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

0

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.

0

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.

0