a month ago
Dear all,
we want all users created in transaction SU01 to have a security policy entered.
Therefore, this should be made a mandatory field.
Unfortunately I couldn't find anything about it on the Internet.
Does anyone know how to do this?
Many thanks in advance
Thomas
Request clarification before answering.
Did you already try to code it within BADI_IDENTITY_CHECK ?
Could look like (written quickly, so adjust the code)
if not ( is_badi_identity_check-modus eq cl_identity_persistence=>co_ta_modus_create or
is_badi_identity_check-modus eq cl_identity_persistence=>co_ta_modus_modify ).
return.
endif.
data: ls_logondata type suid_st_node_logondata,
ls_msg type symsg.
try.
call method is_badi_identity_check-idref->get_logondata
importing
es_logondata = ls_logondata.
if ls_logondata-SECURITY_POLICY is not initial.
return.
else.
clear: ls_msg.
ls_msg-msgty = 'E'.
ls_msg-msgid = 'ZXXXX'. " your class
ls_msg-msgno = '999'. " your number
call method io_badi_msg_buffer->add_object_message_symsg
exporting
iv_bname = is_badi_identity_check-bname
iv_nodename = if_identity_definition=>gc_node_logondata
iv_field = if_identity_definition=>GC_FIELD_LOGONDATA_SEC_POLICY
is_msg = ls_msg
iv_lifetime = if_suid_msg_buffer=>co_lifetime_permanent.
endif.
catch cx_root.
endtry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The official answer from SAP ==> 2890297 - Assigning SECPOL policies as a mandatory field for user creation/modification
User | Count |
---|---|
61 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.