Skip to Content

WD Java Error -- method isPasswordDisabled() is undefined for the type IUserAccount

Hi All,

Need your help.

I am creating a WD Java application to update users account details in portal i.e. disable password for list of users. I followed link Disable Password to achieve this. But my code is giving below error -- The method isPasswordDisabled() is undefined for the type IUserAccount.

Below is the code i have and i am using "com.sap.security.api.jar"

IUserFactory userFact = UMFactory.getUserFactory(); IUserAccountFactory uaf = UMFactory.getUserAccountFactory(); IUserAccount ua = uaf.getUserAccountByLogonId(user); ua = uaf.getMutableUserAccount(ua.getUniqueID()); if (ua != null) { if (!ua.isPasswordDisabled()) { ua.setPasswordDisabled(); ua.commit(); //response.write("<br>User " + user + " Password has been disabled: " + ua.isPasswordDisabled()); }



Thanks,

Satish

code.png (84.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 06, 2017 at 09:23 AM

    Followed this link Add external jar to webdynpro and added dependicies as below.

    1) Add a build-time reference from you DC to com.sap.security.api.sda DC. The DC should already be in Local Development development configuration or in any other.

    2) Add a run-time reference to com.sap.security.api.sda DC: Go to Webdynpro Project References (or in directly in ProjectProperties.wdproperties file) and add Library reference to com.sap.security.api.sda.

    Thanks,
    Satish

    Add comment
    10|10000 characters needed characters exceeded