cancel
Showing results for 
Search instead for 
Did you mean: 

How to derive a variable from another variable with a hierarchy

Former Member
0 Kudos

Hi guys

I have two characteristics IODLOCATN and IODTJSTED. I want to fill the 2nd with the value from the first using variable derivation.

However, the issue is, that the first is selected as a hierarchy. My implementation works fine if I select a single characteristic value from the hierarchy. If I however choose a text node instead (thus selecting several characteristic values), it says it has returned '#'. I hoped it saved the characteristic values in the variable instead of the node value, but it doesn't seem to be the case. Do any of you know how to accomplish what I want?

The implemented code is:

DATA: ZTJENESTESTED LIKE /BIC/MIODLOCATN-/bic/ion_unit.

WHEN 'VTJESTE'.

IF I_STEP = 2.

LOOP AT I_T_VAR_RANGE INTO loc_var_range

WHERE VNAM = 'VATSENH'.

SELECT single /bic/ion_unit FROM /BIC/MIODLOCATN

INTO ZTJENESTESTED where /bic/iodlocatn = loc_var_range-low.

CLEAR l_s_range.

l_s_range-low = ZTJENESTESTED.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

ENDLOOP.

ENDIF.

Hope you can help!

Cheers

Karsten

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Karsten,

you can try reading hierarchy table /BIC/HIODLOCATN instead of /BIC/MIODLOCATN.

Regards,

SRK

Answers (0)