Appraisal system tips&tricks: Dynamic Web Description
In one project there was a requirement to maintain persons in appraisal document body. This was done in BADI HRHAP00_ENHANCE_FIX.
Also position’s name was required next to person’s name.
Standard solution – Z column with BADI HRHAP00_HRHAP00_VAL_DET with autofilling comment field. But comments are hide by default and user have to unhide them every type. Users were very fastidious and claimed more comfortable solution.
The Solution:
There is web description for every element. But unfortunately it is a constant in standard appraisal system.
Lets do it dynamic like this.
And enhance two FMs HRHAP_DOC_BODY_ENHANCE and HRHAP_DOCUMENT_GET_DETAIL in the end, instead of variable [plan] fill descriptions from position’s name.
FIELD–SYMBOLS: <descr> like LINE OF t_body_element_descr.
DATA: ls_plans type pa0001–plans,
ls_text type hrp1000–stext,
ls_element like LINE OF t_body_elements.
LOOP AT t_body_element_descr ASSIGNING <descr>.
IF <descr>–tline = ‘[plans]’.
Read table t_body_elements into ls_element with key row_iid = <descr>–row_iid.
SELECT single plans into ls_plans
FROM pa0001
WHERE pernr = ls_element–foreign_id
AND begda <= s_header_dates–ap_end_date
AND endda >= s_header_dates–ap_end_date.
SELECT SINGLE stext into ls_text
FROM hrp1000
WHERE plvar = ’01’
AND otype = ‘S’
and objid = ls_plans
and begda <= s_header_dates–ap_end_date
and endda >= s_header_dates–ap_end_date
and langu = sy–langu.
<descr>–tline = ls_text.
endif.
endloop.
After that we have persons position’s name next to name of element (person’s name).
Superb! You are a Masters of Appraisal Module 🙂
Thanks for all the help with my issues Yurii!