· 

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.

author.


I am Tobias, I write this blog since 2014, you can find me on twitter and youtube. If you want you can leave me a paypal coffee donation. You can also contact me directly if you want.

SAP Analysis for Office - The Comprehensive Guide
The book SAP Analysis for Office - The Comprehensive Guide by Tobias Meyer is a pdf book about SAP Analysis for Office. It is based on Analysis for Office 2.8 and contains 346 Pages.
45,00 €
SAP Analysis for Office - The Comprehensive Guide
SAP Analysis for Office - The Comprehensive Guide is a pdf book about SAP BusinessObjects Analysis for Office. It is based on Analysis for Office 2.7 and contains 299 Pages.
37,00 €

Write a comment

Comments: 0