Symptom
While creating a sales order, although all required fields have been maintained in the material master data, the system does not determine the tax classification for material automatically and the tax classification for material in item level is missing.
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Create a sales order and ensure all required fields are maintained in both the material master and customer master.
- Attempt to save the sales order without manually entering the tax classification at the line item level.
- Check the items of the sales document and the tax classification for material is missing.
Cause
- The custom logic SD_SLS_MODIFY_ITEM_TAX is implemented but the necessary code is missing.
- For custom logic SD_SLS_MODIFY_ITEM_TAX, if the tax-relevant fields are not changed with the BAdI call, the values from the SALESDOCUMENTITEM_TAX_IN parameter must be copied to the SALESDOCUMENTITEM_TAX_OUT parameter.
- Failure to copy these values results in the deletion of any pre-existing tax-relevant field values, as the system always copies values from the SALESDOCUMENTITEM_TAX_OUT parameter to the sales document item.
Resolution
It can be considered to modify the code in the custom logic to include the necessary logic for handling tax-relevant fields.
For custom logic SD_SLS_MODIFY_ITEM_TAX, it is necessary to ensure the values from the SALESDOCUMENTITEM_TAX_IN parameter is copied the SALESDOCUMENTITEM_TAX_OUT parameter
It is recommended to achieve this, for example, by embedding the code in an if statement in all implementations:
if salesdocumentitem_tax_out is initial.
salesdocumentitem_tax_out = salesdocumentitem_tax_in.
endif.
Keywords
Missing Tax Classification, Sales Order Creation, Material Master, Customer Master, Custom Logic, SD_SLS_MODIFY_ITEM_TAX, Tax determination, SALESDOCUMENTITEM_TAX_IN, SALESDOCUMENTITEM_TAX_OUT. , KBA , SD-BF-TX-2CL , Taxes (Public Cloud) , Problem
SAP Knowledge Base Article - Public