Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
yury_sichov
Active Contributor
0 Kudos
841

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).

1 Comment
Labels in this area