Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Function module RSEC_GENERATE_PASSWORD

Former Member
0 Kudos
198

hi experts,

when i was searching for some function module names i found a function moduel 'RSEC_GENERATE_PASSWORD' to generate a passward.when i used it in porgram then its giving the different outputs everytime.here i am writting this program.can anybody tell me what is the use of this function module?

REPORT YEX_PASS.

PARAMETERS : P_CHAR(40) LOWER CASE.

DATA : D_PASS(8),

D_LEN TYPE I.

D_LEN = 30.

CALL FUNCTION 'RSEC_GENERATE_PASSWORD'

EXPORTING

ALPHABET = P_CHAR

ALPHABET_LENGTH = D_LEN

FORCE_INIT = ' '

OUTPUT_LENGTH = 8

  • DOWNWARDS_COMPATIBLE = ' '

IMPORTING

OUTPUT = D_PASS

  • EXCEPTIONS

  • SOME_ERROR = 1

  • OTHERS = 2

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

WRITE : / D_PASS.

1 REPLY 1

Former Member
0 Kudos
98

Hi,

Yes, Its used for generating password's. Its using some algorithm, and it will give you the different password for each execution. That is the purpose of this Function modulke.

You can restrict the length of the password using Parameter OUTPUT_LENGTH.

Thanks.