Skip to Content
0

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

Jul 05, 2017 at 03:10 PM

41

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
satish cg Jul 06, 2017 at 09:23 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded