I'm trying to change a user's password remotely by calling the function module SUSR_USER_CHANGE_PASSWORD_RFC.
The user is logged on and wants to change only his own password - so the old password is known.
As soon as i run the test from a Java program with JCo, I get the following error:
--------------------------------------
com.sap.mw.jco.JCO$AbapException: (126) CHANGE_NOT_ALLOWED: CHANGE_NOT_ALLOWED
at com.sap.mw.jco.JCO$Function.getException(JCO.java:17978)
at com.sap.mw.jco.JCO$Client.execute(JCO.java:3143)
at de.securintegration.tests.ChangePassword.main(ChangePassword.java:42)
--------------------------------------
In the code for the function module I found out PWD_RC returns some value < 0, like "Old password not correct", "User not found" or similar.
I know the old password is correct (I tried in upper case as well), the user is existent and the password is complex enough and can be changed. The user has SAP_ALL rights for testing.
How can I figure out what's the exact return code?
Or is there a different problem?