Skip to Content

BAPI_USER_CREATE1 generate password with a certain pattern

Feb 10, 2017 at 02:53 PM


avatar image


I'm using the BAPI_USER_CREATE1 function module to create users. I'm also generating a password for each one of them. The passwords contain multiple special signs and stuff and are pretty long. Because the users will get the passwords via a letter they can't copy paste them on their first login. So is there a option how I can generate passwords with a certain pattern like 'no specials' or something? I could find an import parameter on anything in the function module itself.

Thanks for any hints!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Roland Jungnickel Feb 10, 2017 at 03:40 PM

Some years ago, I needed almost the same thing but found nothing. I created a password-generation class, feel free to use it. See (there for one month)

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hey thanks for ur help and sharing ur code :)

I found a function module as well after a little more search.

Hope that can help someone sometime :)

Thanks Roland!

Roland Jungnickel Feb 22, 2017 at 02:00 PM

You are welcome :) Please note that RSEC_GENERATE_PASSWORD does not necessarily take care of your systems password rules (e.g. one capital letter, one number, one special char and so on).

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Yes I figured that out myself because it returned some "false" password. :) Now I'm checking the password and if it doesn't fit I rerun the function module with a limit how often it can executed. Not the perfect solution I think but it works fine.