Symptom
When attempting to delete a batch class using the OData API API_BATCH_SRV/BatchClass, the system returns the following error:
- "code" : "LOBM_ODATA_MSG/033"
"message" : "Class is default class for material"
Environment
SAP S/4HANA Cloud Public Edition
Cause
This behavior is working as designed.
The OData API enforces a strict validation check to maintain data integrity. The deletion of a batch class via the API is only permitted if the material master is not classified with a class of class type 023. If the class is currently set as the default class for the material in the material master record, the API will prevent the deletion to avoid data inconsistency.
The user interface (e.g., Change Batch app) may allow this operation due to different internal validation flows; however, the API is intentionally more restrictive.
Resolution
To successfully remove the classification for a material linked to a batch class, use 'Batch Information Cockpit' app (Manual Workaround):
- Navigate to the 'Batch Information Cockpit' app.
- Enter the material and retrieve the associated batch list.
- Enter Change Mode.
- Navigate to the Classification tab, select the batch, and click Delete.
- Save the changes.
Keywords
API_BATCH_SRV, BatchClass, delete batch class, LOBM_ODATA_MSG/033, class is default class for material, class type 023, OData DELETE, batch classification, batch information cockpit, gateway client, if-match, ETag, S/4HANA Cloud, batch API, standard behavior , KBA , LO-BM-2CL , Batch Management (Public Cloud) , Problem
SAP Knowledge Base Article - Public