Skip to Content
0
Former Member
Jul 25, 2007 at 12:01 PM

User Exit for BW-BPS hierarchical variable

27 Views

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