If ever you got an error message like \’Item 000020 does not exist\’ from the function module ‘BAPI_SALESORDER_CHANGE’ (BAPI used to modify sales order).
Problem:
This means that there are inconsistent data between tables VBAP and VBKD. That is,some item number are present VBKD and not in table VBAP.
How is table VBKD updated:
- If we have different partner details (like ship-to address) at header and item level for a particular item, an entry with that item number will be created in table VBKD
- In VBKD, the line with item number ‘000000’ is created when a sales order is created. If only the line with item number ‘000000’ is available, this means that partner details (like ship-to address) for all items (item level) are equals to partner details at header level.
For Example:
If we create a sales order with 5 items, where all items have same partner details at both header and item level
> A line will be created in table VBKD with item number ‘000000’
If on the same sales order, we modify the partner details (like different ship-to address at header and item level) for item ‘000030\’
> A line will be created in table VBKD with item number ‘000030’
If on the same sales order, we delete the item ‘000030\’
> The line with item number ‘000030’ will be deleted in table VBKD
Possible Solution:
Try to manually delete the item number(s) mentioned in the error message from table VBKD. This not recommended solution, try it at your own risks.
Please refer to the following post on how to enable options which allow to modify entries from standard SAP table.