cancel
Showing results for 
Search instead for 
Did you mean: 

BPS Variable for hierarchy type User-Exit

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Can you explain your configuration of BPS variables in the planning area?

If you just want to use the hierarchies in the layout, you dont have to have exits for that. In selectios in the level, use the hierarchy.

Ravi Thothadri

Former Member
0 Kudos

Configuration of the variable:

Variable Type - Hierarchy node,

Characteristic - NCSTOPU,

Hierarchy - NHSTOPU,

Replacement type - user-exit,

FUNCTION MODULE NAME - ZCCB_AHR_VAR_HIER.

In the planning level the characteristic NCSTOPU is set with this variable.

In the Layout 1) the characteristic NCSTOPU - Lead Column,

2) Hierarchy in the lead column - Hierarchical Data Model, BW Hierarchy

Former Member
0 Kudos

replace ZHIER-HIECHA = '5'.

with ZHIER-HIECHA = 'NCSTOPU'

manish_jain7
Active Participant
0 Kudos

Hi Andrey,

Can you explain - What are you trying to achieve with variable exit ?

Regards,

Manish

Former Member
0 Kudos

Now i just want to find out how it works.

In future maybe we'll use it for some kind of authorization

Regards,

Andrey

Former Member
0 Kudos

Yes. There are planning layouts with this hierarchy. It works nice.

May be the error is in ABAP?

Former Member
0 Kudos

Whether hierachy is active in BW with the nodes 4 and 5?

Ravi Thothadri