cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP B1 Service Layer - Internal Error (-5002) When Using PATCH Request with Super User"

staseeb
Active Participant
0 Kudos
614

Hello SAP Community,

@ANKIT_CHAUHAN 

I am currently working with the SAP Business One version for SAP Hana 10.0 FP2108 Service Layer and encountering an issue while making PATCH requests. Here is the scenario:

  1. I am using Postman to interact with the SAP B1 Service Layer.
  2. When I log in with the first superuser (SuperUser1), I am able to make a PATCH request to update Users name successfully.
  3. However, when I log in with a second superuser (SuperUser2) and attempt PATCH request to update Users name, I receive the following error response: 

 

{
    "error": {
        "code": -5002,
        "message": {
            "lang": "en-us",
            "value": "Internal error (-5002) occurred"
        }
    }
}
​

 

 

  • Payload Example:

    Here is the JSON payload I am using :

    staseeb_0-1735124585079.png

     

  • Troubleshooting Steps I Have Tried:

    • Confirmed both users have identical superuser privileges in SAP B1.
    • Verified that the session is active and properly authenticated for both users.
    • Re-checked the payload for the PATCH request; it is identical in both cases.
    • Restarted the Service Layer but the issue persists.
    Please note that the issue is coming on old users who were their at the time of migration from 9.3 to 10.0 4 years back , for newly created users Patch request works as expected

Accepted Solutions (0)

Answers (1)

Answers (1)

Balaji_S1m8
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

The issue could be related to corruption in User tables. Please create a support ticket to get the data checked/corrected.

One of the known issue is with the user permission and menus. You can run below query in the database to check whether the corruption exists.

Select * from USR3 where "USR3"."PermId" not in (select "OUPT"."AbsId" from OUPT) and "USR3"."PermId" not in (select TO_NVARCHAR("CDPM"."PermId") from CDPM)

regards

balaji