7.30 |
多节点或多SERVER中结束用户会话 注意使用DESTINATION |
|
FORM frm_delete_user USING i_bname TYPE usr02-bname |
|
CHANGING o_flag TYPE c. |
|
|
|
DATA: |
|
ltd_system TYPE TABLE OF msxxlist, |
|
lth_system TYPE msxxlist. |
|
|
|
CLEAR o_flag. |
|
|
|
* 得到服务器列表 |
|
CALL FUNCTION ‘TH_SERVER_LIST’ |
|
TABLES |
|
list = ltd_system |
|
EXCEPTIONS |
|
no_server_list = 1 |
|
OTHERS = 2. |
|
IF sy-subrc <> 0. |
|
o_flag = ‘X’. |
|
RETURN. |
|
ENDIF. |
|
|
|
LOOP AT ltd_system INTO lth_system. |
|
CALL FUNCTION ‘TH_DELETE_USER’ DESTINATION lth_system-name |
|
EXPORTING |
|
user = i_bname |
|
client = sy-mandt |
|
EXCEPTIONS |
|
authority_error = 1 |
|
OTHERS = 2. |
|
|
|
IF sy-subrc <> 0. |
|
o_flag = ‘X’. |
|
EXIT. |
|
ENDIF. |
|
ENDLOOP. |
|
|
|
ENDFORM. |