SAP BW F4 BAdI to restrict hierarchy nodes

In our current project we had to deal with the requirement that the enduser only want to show a certain node of a hierarchy to filter. So we used the F4 restriction from the transaction spro. You find the entry under Business Warehouse >> Enhancements >> BAdI: Restricting the Value Help in the Variables Screen. We implemented it in the method GET_RESTRICTION_NODE.

 

At this time I had only experience with the method GET_RESTRICTION_FLAT and searched for implementation examples. I found a wiki entry on scn. In our case we had bookable nodes so we implemented it like this to get these node and all children of it.

 

l_s_node-nodename = 'NODE1'.

l_s_node-niobnjm      = 'ZZ_IO'.

Append l_s_node to c_t_node.

 

But it didn't work out. The debugging showed no error, but the restriction always showed the complete hierarchy. After a little digging we found our mistake, it have to look like the follwing:

 

l_s_node-nodename = 'LEAF1'.

Append l_s_node to c_t_node.

l_s_node-nodename = 'LEAF2'.

Append l_s_node to c_t_node.

 

And so on for all leafs. So we had to add all leafs and not the nodes. I didn't found any good explanation so here is the short article about it. Thanks to my collegue who had the problem.

Analysis Office - The Comprehensive Guide 4th edit
Analysis Office - The Comprehensive Guide is a pdf book about SAP BusinessObjects Analysis Office. It is based on Analysis Office 2.7 and contains 299 Pages.
59,99 €
Analysis Office - The Comprehensive Guide 3rd edit
Analysis Office - The Comprehensive Guide is a pdf book about SAP BusinessObjects Analysis Office. It is based on Analysis Office 2.6 and contains 272 Pages.
39,99 €
Analysis Office - The Comprehensive Guide 2nd edit
Analysis Office - The Comprehensive Guide is a pdf book about SAP BusinessObjects Analysis Office. It is based on Analysis Office 2.4 and contains 243 pages.
29,99 €
Analysis Office - The Comprehensive Guide
Analysis Office - The Comprehensive Guide is a pdf book about SAP BusinessObjects Analysis Office. It is based on Analysis Office 2.3 and contains 227 Pages.
9,99 €

Write a comment

Comments: 0