找回SAP*和DDIC的密码
来源:中国护士网 作者:www.512test.com
今日服务器地址变更,STMS的传输域需要删除重新配置。
BASIS忘记了SAP*和DDIC的密码……
多方查询资料
多是直接连接数据库,对USR02表里的数据进行操作。
研究了一下午,找到了一个办法。前提是在其他CLIENT有能登陆的用户,权限为SAP_ALL,并且可以进行开发。
SE38,自建程序
原理是 将SAP中 USR02 ust04 usrbf2 的数据拷贝至000集团。
这样就将用户和权限复制到了000集团,可以直接使用该用户名和密码登陆000了。
附代码
REPORT YTEST_A.
data t_usr02 like usr02 OCCURS 0 WITH HEADER LINE.
data t_ust04 like ust04 occurs 0 with HEADER LINE.
data t_usrbf2 like usrbf2 occurs 0 with HEADER LINE.
tables usr02.
SELECTION-SCREEN BEGIN OF BLOCK BL_1 WITH FRAME TITLE TEXT1.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (10) TEXT2.
SELECTION-SCREEN POSITION 20.
PARAMETERS s_bname LIKE usr02-bname OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT (10) TEXT3.
SELECTION-SCREEN POSITION 20.
PARAMETERS S_mandt like usr02-mandt OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK BL_1.
INITIALIZATION.
TEXT1 = '请输入:'.
TEXT2 = '复制用户名'.
TEXT3 = '目标客户端'.
START-OF-SELECTION.
select * into t_usr02 from usr02 where BNAME = s_bname.
ENDSELECT.
t_usr02-mandt = S_mandt.
modify usr02 CLIENT SPECIFIED from t_usr02 .
commit work.
select * into table t_ust04 from ust04 where bname = s_bname.
loop at t_ust04.
t_ust04-mandt = S_mandt.
modify ust04 CLIENT SPECIFIED from t_ust04.
commit work.
endloop.
select * into table t_usrbf2 from usrbf2 where bname = s_bname.
loop at t_usrbf2.
t_usrbf2-mandt = S_mandt.
modify usrbf2 CLIENT SPECIFIED from t_usrbf2.
commit work.
endloop.
write: 'complete!'.