Skip to Content
0
Nov 13, 2021 at 12:31 AM

Hierarchy Node - Customer Exit Variable

206 Views Last edit Nov 13, 2021 at 12:42 AM 2 rev

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.

Attachments

capture1.png (11.4 kB)
capture2.png (8.8 kB)
capture3.png (16.6 kB)
capture4.png (7.7 kB)