ABAP顾问
分类:
2007-12-09 20:31:46
*&---------------------------------------------------------------------*
*& Report Z_BARRY_GENERATE_PASSWORD
*&
*&---------------------------------------------------------------------*
*& 根据字母列表生成随机密码
*&
*&---------------------------------------------------------------------*
REPORT z_barry_generate_password.
DATA : pass(10) type c.
DATA: albet(80).
CONCATENATE 'ABCDEFGHJKLMNPQRSTUVWXYZ'
'abcdefghijklmnopqrstuvwxyz'
'123456789~!#$%^&*()[]/\{}'
INTO albet.
CALL FUNCTION 'RSEC_GENERATE_PASSWORD'
EXPORTING
alphabet = albet
output_length = 10
IMPORTING
output = pass
EXCEPTIONS
some_error = 1.
WRITE:pass.