0

Because of the DSGVO we need to delete personnel data but first we need to lock the personnel data (Infotypes).

Every function module I use works only while the reports is in execution, after that the personnel data is unlocked again.

  DATA: LS_RETURN TYPE BAPIRETURN1. "Return Struktur
  DATA: LV_ERROR_MESSAGE TYPE STRING. "Error Message

* Sperrung der Personalnummer
  CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
    EXPORTING
      NUMBER = GV_PERNR "Personalnummer
    IMPORTING
      RETURN = LS_RETURN.

Does somebody know a way to do it ?

Greets

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Mogera
  • 37
  • 1
  • 9
  • 1
    I think the SPRPS field is what you need, which is a standard field in every intotype. Pretty sure you can set it manually for all infotypes of the employee, but there should be an automatic solution for this in ILM (Information Lifecycle Management - this takes care of GDPR issues). You can check in SAPNet. – József Szikszai Jan 24 '21 at 19:04
  • By "lock" you mean inability to edit it by anybody, so that it must throw error in case smb try to change employee data? – Suncatcher Jan 25 '21 at 07:51
  • @Suncatcher right. I need this. – Mogera Jan 25 '21 at 07:55

1 Answers1

1

As József Szikszai pointed out in a comment, the proper solution for this would be to install and configure Information Lifecycle Management.

But introducing ILM can be a rather large project. So if you need a "good enough" stopgap solution now, then you could solve this via permissions.

I don't have much experience with permissions in HR, but it seems to me like the permission object P_ORGIN should do the job. Simply assign those employees to a separate Personnel Area, Employee Group, Employee Subgroup or Organizational Key (depending on what fits best in your HR permission concept) and then adjust your permission roles so that nobody has the permission to edit these personnel records.

More information on permissions in the module HR can be found in this document from the documentation.

Philipp
  • 67,764
  • 9
  • 118
  • 153