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