Application Development and Automation 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: 
Read only

Remove User (SU01) password using a FM/BAPi

lrayapat73
Participant
0 Likes
1,284

Hi All,

I am usisng BAPI_User_Create1 to create an user, we need to set user intial password when we use this BAPI. However, as per my requirement user should not have a password. Is there any BAPI/FM with which we can remove / clear the password.

Thanks in adavance.

4 REPLIES 4
Read only

MateuszAdamus
Active Contributor
1,129

Hello lrayapat73

If you don't want a user to log in you can lock one's account. There is BAPI_USER_LOCK function for this.

Kind regards,
Mateusz
Read only

0 Likes
1,129

Hi Mateusz,

Thanks for the input, in my case users will be accessing the system using other logon menthods like SSO (logon ticekts,SNC).

Thanks!!

Read only

0 Likes
1,129

There are specific parameters to handle passwords with SSO. Check out SAP's Help site: https://help.sap.com/doc/saphelp_nw73/7.3.16/en-US/4a/c3f18f8c352470e10000000a42189c/content.htm?no_...

Especially login/disable_password_logon and login/password_change_for_SSO parameters.

Hope this helps.


Kind regards,
Mateusz
Read only

tugay_birihan
Participant
1,129

If you set user type as 'L' in logondata strucute, you will create user but login is not possible. By the way, the user will be created in system but when you try to log in you will get an error message. Maybe you can check other user types like system user or service user.

  ls_logondata-ustyp   = 'L'.

  CALL FUNCTION 'BAPI_USER_CREATE1'
    EXPORTING
      username  = is_input-user_id
      name_in   = is_input-user_id
      logondata = ls_logondata
      password  = lc_PASSWORD
      address   = ls_address
    TABLES
      parameter = lt_parameter
      return    = lt_bapi_return.