SAP Knowledge Base Article - Public

3596118 - Tax condition is not redetermined automatically in billing Document - SAP S/4HANA Cloud Public Edition

Symptom

The tax condition is not automatically redetermined when creating a billing document, although the related condition record has been configured and the pricing type in related copying control has been set as G: Redetermine taxes, internal prices; condition category L.

Environment

SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Create a sales order in system where the tax code is determined automatically.
  2. Create a billing document from the sales order.
  3. Observe that the tax condition is not automatically redetermined in the billing document.

Cause

A possible cause is the pricing type is cleared by the custom logic in the BAdI 'SD_BIL_DATA_TRANSFER'.

Resolution

Modify the custom logic in the BAdI to copy the values from BIL_DOC, BIL_DOC_ITEM, and BIL_DOC_ITEM_CONTR to the corresponding changing attributes so that the changing attributes are not empty.  

The BAdI documentation mentions:

"Please note that all changeable attributes are initial when the BAdI is called.

It is therefore necessary to at least copy the values from BIL_DOC, BIL_DOC_ITEM, and BIL_DOC_ITEM_CONTR to the corresponding changing attributes so that the changing attributes are not empty.

Otherwise, any values that exist in imported fields before the BAdI is called are deleted when the BAdI is called, as the system always transfers the values from BILL_DOC_RES, BILL_DOC_ITEM_RES, and BIL_DOC_ITEM_CONTR_RES to the billing document.

Therefore, empty changing attributes would lead to empty document fields after the BAdI is called."

See Also

Keywords

SAP S/4HANA Cloud Public Edition, Billing Document, Tax Code, Custom Logic, Automatic Determination, Sales Order, Condition Record, Pricing Analysis, BIL_DOC, BIL_DOC_ITEM, BIL_DOC_ITEM_CONTR, SD_BIL_DATA_TRANSFER, pricing type. , KBA , SD-BF-TX-2CL , Taxes (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions