Hi Experts,
i have a requirement to diplay the WBS elemnt based on the 0project on the screnn for this i have implemented the BADI RSR_VARIABLE_F4_RESTRICT_BADI for the 0WBS_ELEMT infoobject and its woring in Dev system.
But when transported it in QA sysetm it is not wforking.
if anybody any idea about the probelm please reply. Code is same in dev and quality sytem.
Below is the code :
METHOD IF_RSR_VARIABLE_F4_RESTRICT~GET_RESTRICTION_FLAT.
DATA: l_s_range LIKE LINE OF c_t_range.
data: l_s_var_range like line of i_t_var_range.
data: l_s_selection type RSRANGE.
data: l_t_selection type table of RSRANGE.
data: l_wbs type /BI0/OIWBS_ELEMT,
l_t_wbs type table of /BI0/OIWBS_ELEMT.
constants: l_c_sourcetab(60) type c value '/BI0/PWBS_ELEMT'.
clear l_s_selection.
clear l_t_selection[].
refresh l_t_selection[].
loop at i_t_var_range into l_s_var_range
where iobjnm = '0PROJECT'.
l_s_selection-sign = l_s_var_range-sign.
l_s_selection-option = l_s_var_range-opt.
l_s_selection-low = l_s_var_range-low.
l_s_selection-high = l_s_var_range-high.
append l_s_selection to l_t_selection.
endloop.
select WBS_ELEMT from (l_c_sourcetab) into table l_t_wbs
where PROJECT in l_t_selection
and OBJVERS = 'A'.
if sy-subrc = 0.
sort l_t_wbs.
delete ADJACENT DUPLICATES FROM l_t_wbs.
loop at l_t_wbs into l_wbs.
if not l_wbs is initial.
l_s_range-iobjnm = i_iobjnm.
l_s_range-sign = 'I'.
l_s_range-option = 'EQ'.
l_s_range-low = l_wbs.
l_s_range-high = ''.
APPEND l_s_range TO c_t_range.
endif.
endloop.
endif.
Regard
vikas