Hi ,
We are facing an issue while running a Headcount report, it throws an error - HIERASO_NOT_FOUND
My Analysis -
In the Standard ABAP program - rsd_hieraso_get_for_iobj -
There is a Data reference from the Table rsdvchathj and when the below Characteristics are passed the Exception is raised because these characteristics are not maintained or present in the Table rsdvchathj. Table rsdvchathj is for only those objects for which temporal hierarchy join has been activated so it will not show the below characteristics except CHRLEORG and CHROPORG. Ideally only CHRLEORG and CHROPORG should be passed to the Table rsdvchathj but all the Characteristics in the Query are passed hence the Exception is raised.
0LOGSYS
0IOBJNM
0COMPCODE
0COMPANY
0COUNTRY
CCOMPCODP
CEMPLOYEE
0COSTCENTER
CHRLEORG1
CHROPORG1
CHRPOS
CHRPREORG
0DATE
CCONSOLID
CHRLEORG
0HIER_HIEID
0AGE
CHRLEORG1
CHROPORG1
0INFOPROV
CHEADCCAT
---
0ACTIONTYPE
CHRORG1
CHROPORG1
0EMPLSTATUS
CHRLEORG1
CHRORG1
0LOGSYS
The Program causing the issue is given below -
* lookup other direction on db (CHATHJ -> CHA)
SELECT SINGLE chanm
FROM rsdvchathj
INTO e_aso_iobjnm
WHERE chanmthj EQ i_iobjnm
AND objvers EQ i_objvers.
IF sy-subrc = 0.
l_found_db = rs_c_true.
ENDIF.
ls_hieraso-objvers = i_objvers.
ls_hieraso-iobjnm = i_iobjnm.
ls_hieraso-aso_iobjnm = e_aso_iobjnm.
ls_hieraso-thj_2_cha = rs_c_true.
insert ls_hieraso into table g_th_hieraso.
endif.
endif.
if l_found_db = rs_c_false.
RAISE hieraso_not_found.
ENDIF.
I have attached the Full Code here. Please help me resolve this issue.