cancel
Showing results for 
Search instead for 
Did you mean: 

SAP B1 SL Rest API PATCH data issue when filter value has *

former_member209771
Active Participant
0 Kudos

microsoftteams-image.png

Hi Expert

I am facing Some issue in Patch data for SpecialPrices rest api. But same api is working when CardCode value is normal.Below is the api request details :

1) Facing Issue :

Request Type : Patch

Request Url : https://10.0.2.42:50000/b1s/v1/SpecialPrices(CardCode= '*1',ItemCode='itm22')

Request Body : { "U_SpecialPriceSync":"T", "U_DataSource":"I" }

Error Message : { "error": { "code": -1029, "message": { "lang": "en-us", "value": "Field cannot be updated (ODBC -1029)" } } }

Status : 400 (Bad Request)

2) Working :

Request Type : Patch

Request Url : https://10.0.2.42:50000/b1s/v1/SpecialPrices(CardCode= 'BP2020',ItemCode='itm22')

Request Body : { "U_SpecialPriceSync":"T", "U_DataSource":"I" }

Status : 204 (Nocontent)

Please give me suggestion why 1st request is not working .

Thanks

Surajit Kundu

Accepted Solutions (0)

Answers (1)

Answers (1)

alexander_nosov
Explorer
0 Kudos

Hello Surajit,

I've just faced the same problem and apparently have got a solution for it. It might be too late, but I write it here anyway.

Independent of the SAP Manuals the request URL should not include the CardCode in this case. So it should be:

Request Url : https://10.0.2.42:50000/b1s/v1/SpecialPrices(CardCode= '',ItemCode='itm22').

Then you should provide the PriceListNum in the Request Body, e. g.

Request Body : { "PriceListNum":1, "U_SpecialPriceSync":"T", "U_DataSource":"I" }

I consider it as an SAP Bug and will report a corresponding Issue.

Best Regards,

Alexander Nosov