Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
262 views
in Technique[技术] by (71.8m points)

Lock Master Data for Personnel Number in ABAP for a long time

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

question from:https://stackoverflow.com/questions/65873399/lock-master-data-for-personnel-number-in-abap-for-a-long-time

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...