Skip to Content
0
Former Member
Feb 09, 2007 at 12:42 PM

BPS Variable for hierarchy type User-Exit

26 Views

I try to make this type of variable.

The variable is NCSTOPU, hierarchy is

NHSTOPU like

NHMAIN

-- 4

-- 401

-- 402

-- 403

-- 5

-- 501

-- 502

-- 503

So The ABAP is

FUNCTION ZCCB_AHR_VAR_HIER.
*"----------------------------------------------------------------------
*"*"Ëîêàëüíûé èíòåðôåéñ:
*"  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 ZHIER type upc_ys_hiesel.

*CHANM  UPC_Y_CHANM
*HIENM	UPC_Y_HIENM
*HIEVER	UPC_Y_HIEVER
*DATETO	UPC_Y_DATETO
*NODENAME	UPC_Y_NODENAME
*HIECHA	UPC_Y_CHANM
*DUMMY_LEAF	UPC_Y_DUMMYLEAF
*TO_CHADEP	UPC_YTO_CHADEP

ZHIER-CHANM      = 'NCSTOPU'.
ZHIER-HIENM      = 'NHSTOPU'.
ZHIER-NODENAME   = '5'.
ZHIER-HIEVER     = 'A'.
ZHIER-HIECHA     = '5'.
ZHIER-DUMMY_LEAF = ''.
ZHIER-DATETO     = '99993112'.

INSERT ZHIER INTO TABLE ET_HIE_NODES.

ENDFUNCTION.

But it doesn't work.

The mistake is

Selected node 5 does not exist
-----------------------------------------------
The node 5  selected as the start value for characteristic 5 with the specified compound table does not exist in hierarchy NHSTOPU.

What is the problem?