PFCG修改角色时弹出警告:
“You can only maintain role texts if logged on in orignial language KO .”
这个问题是由于当时角色创建在KO(韩语)环境中导致,可以参考Notes: 854311 - SE63: Translation of role texts fails 打上Notes补丁来修正,但只针对未来新产生的角色,历史角色不会被修改。
在这个Notes中有个 Z_ROLE_SET_MASTERLANG 程序,可以使用这个程序来修复已有的角色修改告警.
附Notes相关程序:
*&---------------------------------------------------------------------*
*& Report Z_ROLE_SET_MASTERLANG *
*&---------------------------------------------------------------------*
*& Resetting the original language of roles *
*&---------------------------------------------------------------------*
REPORT z_role_set_masterlang.
TABLES: t002, agr_define.
DATA: gt_agr_define TYPE TABLE OF agr_define,
gt_agr_flags TYPE TABLE OF agr_flags,
gt_lang_old TYPE TABLE OF agr_flags,
gt_lang_new TYPE TABLE OF agr_flags,
gt_agr_lsd TYPE TABLE OF agr_lsd.
DATA: gf_upd_flg TYPE char01.
FIELD-SYMBOLS:
SELECT-OPTIONS: agr_name FOR agr_define-agr_name.
PARAMETERS: orig_lan TYPE spras.
* Role and language selection
SELECT * FROM agr_define INTO TABLE gt_agr_define
WHERE agr_name IN agr_name.
IF sy-subrc NE 0.
MESSAGE s244(s#). RETURN.
ENDIF.
SELECT * FROM agr_flags INTO TABLE gt_agr_flags
FOR ALL ENTRIES IN gt_agr_define
WHERE agr_name = gt_agr_define-agr_name
AND flag_type = 'MASTER_LAN'
ORDER BY PRIMARY KEY.
SELECT * FROM agr_lsd INTO TABLE gt_agr_lsd
FOR ALL ENTRIES IN gt_agr_define
WHERE agr_name = gt_agr_define-agr_name
ORDER BY PRIMARY KEY.
* Modification of the original language of all selected roles
LOOP AT gt_agr_define ASSIGNING
CLEAR: gt_lang_old, gt_lang_new.
* AGR_FLAGS
READ TABLE gt_agr_flags ASSIGNING
WITH KEY agr_name =
BINARY SEARCH.
IF sy-subrc NE 0.
INSERT INITIAL LINE INTO gt_agr_flags ASSIGNING
INDEX sy-tabix.
gf_upd_flg = 'I'.
ELSE.
gf_upd_flg = 'U'.
APPEND
ENDIF.
APPEND
CALL FUNCTION 'PRGN_CHANGEDOCUMENT_WRITE'
EXPORTING
activity_group =
upd_agr_flags = gf_upd_flg
TABLES
n_agr_flags = gt_lang_new
o_agr_flags = gt_lang_old.
* AGR_LSD
READ TABLE gt_agr_lsd ASSIGNING
WITH KEY agr_name =
BINARY SEARCH.
IF sy-subrc NE 0.
INSERT INITIAL LINE INTO gt_agr_lsd ASSIGNING
ENDIF.
ENDLOOP.
* Database updates
MODIFY agr_flags FROM TABLE gt_agr_flags.
MODIFY agr_lsd FROM TABLE gt_agr_lsd.
MESSAGE s230(s#).