cancel
Showing results for 
Search instead for 
Did you mean: 

User Exit for BW-BPS hierarchical variable

Former Member
0 Kudos

Hello, everybody,

I have write User Exit for hierarchical variable of type User Exit in BW-BPS.

Scenario: user selects FUNDS CENTER value from variable and according to this value hierarchical variable ZEMPLHIER_PL displays node of the hierarchy (GR2, GR3,GR4,…..GR8).

I tried to change UPF_VARIABLE_USER_EXIT_HIER functional module, but I didn’t succeed.

Here is my user exit code example:

FUNCTION Z_UPF_VARIABLE_USER_EXIT_HIER.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(I_TYPE) TYPE UPC_Y_VAR_TYPE

*" VALUE(I_AREA) TYPE UPC_Y_AREA

*" VALUE(I_VARIABLE) TYPE UPC_Y_VARIABLE

*" VALUE(IS_HIE_KEY) TYPE UPC_YS_HIE_KEY

*" EXPORTING

*" REFERENCE(ET_HIE_NODES) TYPE UPC_YT_HIESEL

*" EXCEPTIONS

*" FAILED

*"----


CLEAR et_hie_nodes.

DATA: l_hie_nodes_wa TYPE upc_ys_hiesel.

  • text node 'AMERICA'

l_hie_nodes_wa-chanm = is_hie_key-chanm.

l_hie_nodes_wa-hienm = is_hie_key-hienm.

l_hie_nodes_wa-hiever = is_hie_key-hiever.

l_hie_nodes_wa-dateto = is_hie_key-dateto.

l_hie_nodes_wa-nodename = 'GR2'.

l_hie_nodes_wa-hiecha = 'ZEMPLHIER_PL'.

l_hie_nodes_wa-dummy_leaf = ''.

  • l_hie_nodes_wa-to_chadep is inital

INSERT l_hie_nodes_wa INTO TABLE et_hie_nodes.

ENDFUNCTION.

Then I execute planning application (with this user exit), I see that variable has no restrictions and then I try to attach a value I get message that hierarchy has no such value (but hierarchy has it).

Could you give me suggestions?

Thanks in advance.

Best Regards,

Arunas Stonys

Accepted Solutions (1)

Accepted Solutions (1)

former_member93896
Active Contributor
0 Kudos

Hi Arunas,

somewhere in your coding you must read your funds center variable. Also you are filling field "hiecha" incorrectly. It needs to be the technical name of the hierarchy base characteristic.

Check the BPS Variable How-to Guide for examples.

SDN BI How-to Guides:

https://www.sdn.sap.com/irj/sdn/howtoguides > NetWeaver 2004 > BI

Regards,

Marc

SAP NetWeaver RIG

Answers (0)