cancel
Showing results for 
Search instead for 
Did you mean: 

Hierarchy Node - Customer Exit Variable

0 Kudos
815

Hi All,

We have a requirement to create a Customer Exit Hierarchy Node variable by reading ADSO, which we maintain by user ID and the access Level by Cost Center Group or by CostCenter(screenshot below).

capture4.png

I am have written below code.

DATA: it_aut type STANDARD TABLE OF /bic/afigl_d092.

data: wa_ana_aut type /bic/afigl_d052.

DATA:

l_s_range TYPE rsr_s_rangesid,

l_s_var_range TYPE rrrangeexit.

IF i_step = 1.

* READ TABLE I_T_VAR_RANGE INTO l_s_var_range WITH KEY vnam = '0COSTCENTER_PUC_001'.

*if sy-subrc = 0.

SELECT * into table it_aut FROM /bic/afigl_d092 where userid = sy-uname.

if sy-subrc = 0.

loop at it_aut into wa_ana_aut.

l_s_range-low = wa_ana_aut-hiernode.

l_s_range-high = wa_ana_aut-infoobject.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

append l_s_range to c_t_range.

endloop.

endif.

endif.

The above is working fine for the group nodes on Info Object CCTR_GRP and coming up with an error for Cost Center values. Cost Center is Compounded with CO AREA, which is 1000.

capture3.png

capture1.png

When I manually enter for select from the F4 option the format to enter Costcenter Values in 1000/100201

capture2.png

I am not sure why it is coming as an error when I populate with the correct values using the Customer exit.

The values are accepted when I enter the same values manually. This is weird and I am not able to figure out what I am doing wrong.

I appreciate your help with this.

former_member660513
Participant

From where does your logic gets called(BadI, enhancement spot, etc)? What is the data type behind c_t_range? What kind of information do you become in the importing parameter I_T_VAR_RANGE? Its structure contains a flag, whether the key value is compounded or not(LOW_IS_CMP), can you program against it, or maybe set it in your changing parameter?

0 Kudos

Thank you for your response Georgi.

I am calling the logic from BADI. I tried a few other options but had no luck. All I am trying to populate is Cost Center which is compounded with 1000 in the Hierarchy Node variable.

The right value should be 1000/1000201 and even after populating the exact value it is complaining that the value don't exist.

Do you have any sample code that you could refer me to. I really appreciate your help.

Cheers,

Shib

arkadiy_semenov
Discoverer
0 Kudos

Hi!
View please actual code.
P.S. Right value for compound key you can see in master table for compound chavl.
I think key 1000/1000201 is wrong (not '/' and may be alpha for second key).

Accepted Solutions (0)

Answers (0)