I need your help in implementing the BI Variable authorizations to restrict cost centers. I have followed the following steps but user getting analysis authorization error for cost center.
1) I have marked Cost Center info object as Auth relevant.
2) Created custom table zcostcenter with cost center and user name fields
3) Created a global Variable ZCOST and added in the query and changed the Processing type as u201CCustomer Exit u201C.
4) Created analysis authorization for the info object 0cost center and added value as $ ZCOST.
5) Analysis authorization has been added to auth object S_RS_AUTH in the PFCG role.
6) Created the include program ZSECTEST in the user exit with the below code.
*& Include ZSECTEST
if i_step = '0'. " Authorization
if i_vnam = 'ZFINAL'.
data: itab like zcostcenter occurs 0 with header line.
select * from zcostcenter into table itab where bname = sy-uname.
loop at itab.
l_s_range-sign = 'I'.
l_s_range-opt = 'CP'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
INPUT = itab-kostl
OUTPUT = l_s_range-low.
l_s_range-low = itab-kostl.
concatenate '' l_s_range-low '' into l_s_range-low.
append l_s_range to e_t_range.
In my query I have fieldu2019s company code, Cost area. Do I need to mark all of them auth relevant?