cancel
Showing results for 
Search instead for 
Did you mean: 

How to change password using BAPI_USER_CHANGE in pyrfc?

jeie
Member
0 Kudos
from pyrfc import Connection
...
conn = Connection(**conn_params)
PASSWORD = {"PASSWORD":'123456'}
PASSWORDX = {"PASSWORD":'X'}
result = conn.call("BAPI_USER_CHANGE",USERNAME='RPA123456',PASSWORD = PASSWORD,PASSWORDX = PASSWORDX)
...
Report an error:pyrfc._exception.ExternalRuntimeError: 20 (rc=20): key=RFC_INVALID_PARAMETER, message=field 'PASSWORD' not found [MSG: class=, type=, number=, v1-4:=;;;]

Can anyone help get the correct syntax for BAPI_USER_CHANGE to run in Python?

anne-petteroe
Community Manager
Community Manager
0 Kudos

Hello,

Thank you for visiting SAP Community to get answers to your questions. Since you're asking a question here for the first time, I recommend that you familiarize yourself with https://community.sap.com/resources/questions-and-answers, as it provides tips for preparing questions that draw responses from our members.

Feel free to take our Q&A tutorial at https://developers.sap.com/tutorials/community-qa.html as well, as that will also help you when preparing questions for the community.

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage your readers to respond.

Kind regards,
Anne

Accepted Solutions (0)

Answers (1)

Answers (1)

MarkusTolksdorf
Product and Topic Expert
Product and Topic Expert
0 Kudos

Both import parameters, PASSWORD and PASSWORDX, are structures. The only field in both cases is BAPIPWD and not PASSWD. If you set this field instead, this error message will not happen.

Best regards,
Markus