Skip to Content

Hi Guys,

I’d like to share with the HCM community some hints on how to customize the HRFORMS payslip so that the settings in Infotype P0655 are taken into account. In the case of PE51 based forms, this is not necessary as the standard deals with infotype P0655. Users can record at infotype P0655 whether the employee uses ESS remuneration statement, therefore the payslip must not be printed when the remuneration statement program is run at the backend.

image

However if you run your HRFORMS pasylip program you’ll notice that the settings in P0655 are ignored.

Here you are a hint to make your HRFORMS payslip check P0655:

Check Infotype P0655 in Badi HRFORM_HRF02 at method CHECK_PERNR.

here is the code I implemented in my test system:

method IF_EX_HRFORM_HRF02~CHECK_PERNR.<br /><br />  data: subrc like sy-subrc,<br />        l_essonly type essonly,<br />        i0655    TYPE STANDARD TABLE OF p0655.<br /><br />  FIELD-SYMBOLS:  <iwa> LIKE LINE OF i0655.<br /><br />* Read the infotype 0655<br />  CALL FUNCTION ‘HR_READ_INFOTYPE'<br />    EXPORTING<br />      pernr           = im_pernr<br />      infty           = ‘0655’<br />      begda           = im_begda<br />      endda           = im_endda<br />    IMPORTING<br />      subrc           = subrc<br />    TABLES<br />      infty_tab       = i0655<br />    EXCEPTIONS<br />      infty_not_found = 1<br />      OTHERS          = 2.<br /><br /><br />  if subrc = 0.<br />    LOOP AT i0655 ASSIGNING <iwa> WHERE begda LE im_endda<br />                                AND endda GE im_begda.<br />      l_essonly = <iwa>-essonly.<br />      EXIT.<br />    ENDLOOP.<br /><br />    if l_essonly = ‘X’.<br />      If sy-dbnam = ‘PNPCE’. “Call directly from R/3 <<<<<<<<<<<<<br />        raise reject.<br />      endif.<br />    endif.<br />  endif.<br /><br />endmethod.

How to implement the Badi

Go to transaction SE18 -> Choose form HRFORM_HRF02 -> Overview -> Create implementation -> e.g. ZCARLOS.

image

image

Filters ->Set the FORM for which you want to implement the Badi, e.g. SAP_PAYSLIP_US.

image

Then go to the section “Interface” where you can find all the methods available.

image

Go to method check_pernr by double clicking over it.

image

Here you can insert your own code.

!https://weblogs.sdn.sap.com/weblogs/images/251726373/pic8.jpg|height=489|alt=image|width=406|src=https://weblogs.sdn.sap.com/weblogs/images/251726373/pic8.jpg|border=0!</body>

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply