简体   繁体   English

长期锁定ABAP中人员编号的主数据

[英]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).由于DSGVO ,我们需要删除人员数据,但首先我们需要锁定人员数据(信息类型)。

Every function module I use works only while the reports is in execution, after that the personnel data is unlocked again.我使用的每个 function 模块仅在报告执行时工作,之后再次解锁人员数据。

  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问候

As József Szikszai pointed out in a comment, the proper solution for this would be to install and configure Information Lifecycle Management .正如 József Szikszai 在评论中指出的那样,正确的解决方案是安装和配置Information Lifecycle Management

But introducing ILM can be a rather large project.但引入 ILM 可能是一个相当大的项目。 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.我在 HR 权限方面没有太多经验,但在我看来,权限 object P_ORGIN 应该可以完成这项工作。 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.只需将这些员工分配到单独的人事区域、员工组、员工子组或组织键(取决于最适合您的 HR 权限概念的内容),然后调整您的权限角色,以便没有人有权编辑这些人事记录。

More information on permissions in the module HR can be found in this document from the documentation .有关 HR 模块中权限的更多信息,请参阅文档中的此文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM