| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Tips Categories:
Contribute?What's New?
What's Hot? |
Generate passwords programmatically with the desired characters (including special characters)by Teja In this article, we would look at a demo program, which generates a password programmatically with the desired alphabets, characters (both upper and lowercase) and special characters. REPORT zgenerate_pwd no standard page heading. * Published for SAPTechnical.com * Data declaration DATA : w_password TYPE char10, " Generated Password is stored here
w_pass_chars(80). " We provide the characters we desire
" in the password
CONCATENATE
'ABCDEFGHJKLMNPQRSTUVWXYZ'
'abcdefghijklmnopqrstuvwxyz'
'123456789@$%&/\()=+-#~ []{}'
INTO w_pass_chars.
* Function module which generates the password
CALL FUNCTION 'RSEC_GENERATE_PASSWORD'
EXPORTING
alphabet = w_pass_chars
alphabet_length = 0
force_init = ' '
output_length = 10
downwards_compatible = ' '
IMPORTING
output = w_password
EXCEPTIONS
some_error = 1.
IF sy-subrc NE 0. * Trigger some message, as required. ENDIF. WRITE:/ 'The generated password is: ', w_password. |
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||