cancel
Showing results for 
Search instead for 
Did you mean: 

SAP B1 Service Layer Error Code -2028 [Message 29-51]"

hellothere-1
Discoverer
0 Kudos

I am struggling with creating DeliveryNotes based on Items using SerialNumbers and SAP B1 Service Layer returns the error
"code": "-2028"
"message": "You should use existing serial/batch numbers for this document type [Message 29-51]"
My Sample of DeliveryNotes:

{
"DocDate": "2023-02-26T00:00:00",
"TaxDate": "2023-02-26T00:00:00",
"FolioPrefixString": "B02",
"FolioNumber": 555,
"BplIdAssignedToIsnvoice": 1,
"CardCode": "C00005",
"DocumentLines": [
{
"ItemCode": "XYZ",
"WarehouseCode": "B02",
"Quantity": 2.0,
"BaseEntry": 3458,
"BaseType": 13,
"BaseLine": 0,
"SerialNumbers": [
{
"BaseLineNumber": 0,
"SystemSerialNumber": "1",
"Quantity": 1
},
{
"BaseLineNumber": 0,
"SystemSerialNumber": "2",
"Quantity": 1
}
]
},
{
"ItemCode": "XXY",
"WarehouseCode": "B02",
"Quantity": 2.0,
"BaseEntry": 3458,
"BaseType": 13,
"BaseLine": 2,
"SerialNumbers": [
{
"BaseLineNumber": 2,
"SystemSerialNumber": "1",
"Quantity": 1
},
{
"BaseLineNumber": 2,
"SystemSerialNumber": "2",
"Quantity": 1
}
]
}
] }

My table of SerialNumbersDetails:

{
"DocEntry": 489,
"ItemCode": "XYZ",
"ItemDescription": "XYZ",
"MfrSerialNo": "1100",
"SerialNumber": "1100",
"LotNumber": null,
"SystemNumber": 1,
"AdmissionDate": "2023-02-26T00:00:00Z",
"ManufacturingDate": null,
"ExpirationDate": null,
"MfrWarrantyStart": null,
"MFrWarrantyEnd": null,
"Location": null,
"Details": null
},
{
"DocEntry": 490,
"ItemCode": "XYZ",
"ItemDescription": "XYZ",
"MfrSerialNo": "1101",
"SerialNumber": "1101",
"LotNumber": null,
"SystemNumber": 2,
"AdmissionDate": "2023-02-26T00:00:00Z",
"ManufacturingDate": null,
"ExpirationDate": null,
"MfrWarrantyStart": null,
"MFrWarrantyEnd": null,
"Location": null,
"Details": null
},
{
"DocEntry": 491,
"ItemCode": "XXY",
"ItemDescription": "XXY",
"MfrSerialNo": "2100",
"SerialNumber": "2100",
"LotNumber": null,
"SystemNumber": 1,
"AdmissionDate": "2023-02-26T00:00:00Z",
"ManufacturingDate": null,
"ExpirationDate": null,
"MfrWarrantyStart": null,
"MFrWarrantyEnd": null,
"Location": null,
"Details": null
},
{
"DocEntry": 492,
"ItemCode": "XXY",
"ItemDescription": "XXY",
"MfrSerialNo": "2101",
"SerialNumber": "2101",
"LotNumber": null,
"SystemNumber": 2,
"AdmissionDate": "2023-02-26T00:00:00Z",
"ManufacturingDate": null,
"ExpirationDate": null,
"MfrWarrantyStart": null,
"MFrWarrantyEnd": null,
"Location": null,
"Details": null }


The ItemCode and their correspondent SerialNumberDetails do exist and saved on their tables and the SerialNumbersDetails were not used either for another DeliveryNotes(Invoices)
Other examples were accepted but this one isn't


What am I doing wrong or is something I am missing for this scenario of DeliveryNotes

Accepted Solutions (1)

Accepted Solutions (1)

gsoler
Explorer

Hi Elias,

You have to post SerialNumbers without "BaseLineNumber"

"SerialNumbers": [
{
"SystemSerialNumber": "1",
"Quantity": 1
},
{
"SystemSerialNumber": "2",
"Quantity": 1
}
]

Kind regards

Guillermo Soler

Answers (1)

Answers (1)

Neeraj_Jain
Active Contributor
0 Kudos

Hello hellothere,

Please refer below SAP thread.

https://answers.sap.com/questions/13555823/create-deliverynote-for-item-of-type-assembly-tree.html

Regards,

Neeraj Jain