Skip to Content

Issue with BAPI_USER_CREATE1 when published as web service.

Dec 15, 2017 at 07:44 AM


avatar image

Dear Folks,

I have this strange issue, wherein I have published the BAPI_USER_CREATE1 as a web service to be accessed from a 3rd party tool.

When I directly run this BAPI in the SAP system, I get the desired result and all data is updated correctly, user is created.

But when the same is tried through the web service URL, it returns an error message:





Message text: <MESSAGE>Internal error: FM SUSR_USER_BUFFERS_TO_DB, exception: internal_error</MESSAGE>

Q1. Firstly why am I getting this error, even when the user is actually getting created in the SAP system! I can see the details in SU01.

Q2. The address details are being passed in the web service call, but they are not getting updated. The strange thing here is that SAP wont allow you to create a user without address details (at least surname), but in this case user is getting created! However address details are not updated, even though they are passed in the web service call.

Note: In my findings so far, I found that every user that is created has a 'persnumber' field that is created by the system and also 'addrnumber' (system generated) in Table USR21. When I create the user from SAP system, both addrnumber and persnumber get generated, however when created through the web service, persnumber is not generated.

Perhaps there is some linking in these 2 fields, because the address is not visible typically for those user where persnumber field is missing!

Q3. So, question 3, what is the logic behind, and how is this field persnumber of table USR21 generated?

Your advises appreciated, and of course will be rewarded! :)

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Danish Makhdum Dec 28, 2017 at 11:14 AM

:-D :D

Been almost a fortnight and no answers posted here! :p Well I have found 1 myself!

After raising this with SAP I realized that the structure of the XML file that I was passing to the BAPI was in its original form.

Now I was passing all mandatory data, some additional data and keeping the other fields empty (typically the table).

The funny part was, if I was passing no value in the table fields (in my XML), it was being considered perhaps as " "(space) by default and was creating blank line item entries in the import tables.

Due to this there was data inconsistency and address tab was not getting updated.


I modified my XML structure by deleting all the tables (which were anyway not useful to me). After this when I called the BAPI it worked!! ;-)

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Excellent! I love it when I figure out something myself. It takes a lot of time, but you'll never forget. And of course, it's great to get an answer here.