BPS variable type EXIT to expand hierarchy
Hello,
Any idea how I can get all elements under a particular node (chosen by the user through a variable) of a hierarchy using a Function module in BPS?
I have been trying to do this using Function 'RSSH_HIERARCHY_READ' with the following code and parameters (see below)
Could anyone tell me how to proceed next?
Thanks in advance
Points will be assigned
*"----
""Local Interface:
*" IMPORTING
*" REFERENCE(I_TYPE) TYPE UPC_Y_VAR_TYPE
*" REFERENCE(I_AREA) TYPE UPC_Y_AREA
*" REFERENCE(I_VARIABLE) TYPE UPC_Y_VARIABLE
*" REFERENCE(IS_HIE_KEY) TYPE UPC_YS_HIE_KEY
*" EXPORTING
*" REFERENCE(ET_HIE_NODES) TYPE UPC_YT_HIESEL
*"----
DATA: BEGIN OF wa_val,
from TYPE rsleaffrom,
to TYPE rsleafto,
END OF wa_val,
wa_hierdir TYPE rshi_s_hiedir,
wa_hiedirkey TYPE rshi_s_rshiedirkey,
wt LIKE wa_hiedirkey OCCURS 0 WITH HEADER LINE,
ls_hie_nodes TYPE upc_ys_hiesel,
tb_node_val TYPE rshi_t_hienode,
tt LIKE LINE OF tb_node_val,
tb_interval TYPE rshi_th_interval.
SELECT SINGLE hieid objvers FROM /bic/hystopid
INTO wa_hiedirkey
WHERE nodename = '00001'.
CALL FUNCTION 'RSSH_HIERARCHY_READ'
EXPORTING
i_rshiedirkey = wa_hiedirkey
i_date = sy-datum
IMPORTING
e_rshiedir = wa_hierdir
e_t_rsnodes = tb_node_val
e_th_rsinterval = tb_interval
EXCEPTIONS
invalid_hierarchy = 1
name_error = 2
iobj_not_found = 3
OTHERS = 4.