Welcome to this in-depth exploration of the SOAP Posting APIs: Journal Entry – Post (Synchronous) and Journal Entry – Post (Asynchronous). In this blog, we will try to bring your attention to the use of reference payloads for implementing the SOAP Posting APIs effectively.
The calculation of tax amounts and tax item parameters should be planned and carefully preserved in API nodes of ProductTaxItem and WithholdingTaxItem. For details about the service nodes, please refer to ProductTaxItem | SAP Help Portal and WithholdingTaxItem | SAP Help Portal. As the tax-relevant account is determined in the backend, you don't need to enter a G/L account in ProductTaxItem and WithholdingTaxItem. Tax items are generally consolidated at the journal entry level. However, you can configure and activate the passing of tax at the line-by-line level based on your business requirements.
In this blog, we will concentrate on posting tax relevant journal entries via the SOAP Posting APIs. We will pivot around some primary use cases that correlate with posting a journal entry involving VAT tax, non-deductible tax, tax calculated on line items, and withholding tax.
A supplier invoice is a document from a supplier for materials that were delivered or services that were performed. The supplier invoice triggers the payment. For more information, please refer to All About Supplier Invoices | SAP Help Portal.
Input tax is the Value Added Tax (VAT) that the client pays on purchases of goods and services, which can often be reclaimed from the government. For more information, please refer to Tax on Sales/Purchases, Sales Taxes, and Additional Taxes | SAP Help Portal.
If you want to post a supplier invoice that includes input tax using a SOAP Posting API, please bear in mind the following key points while preparing your payloads:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header/>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<CreationDateTime>2024-03-11T10:29:20.230Z</CreationDateTime>
</MessageHeader>
<!--1 or more repetitions:-->
<JournalEntryCreateRequest>
<MessageHeader>
<CreationDateTime>2024-03-11T10:29:20.230Z</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<OriginalReferenceDocument/>
<OriginalReferenceDocumentLogicalSystem/>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>KR</AccountingDocumentType>
<DocumentReferenceID>123</DocumentReferenceID>
<DocumentHeaderText>Tax</DocumentHeaderText>
<CreatedByUser>SAP</CreatedByUser>
<CompanyCode>1010</CompanyCode>
<DocumentDate>2024-03-11</DocumentDate>
<PostingDate>2024-03-11</PostingDate>
<TaxDeterminationDate>2024-03-11</TaxDeterminationDate>
<Item>
<GLAccount>0063001000</GLAccount>
<AmountInTransactionCurrency currencyCode="EUR">100</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>V1</TaxCode>
</Tax>
<AccountAssignment>
<!--Optional:-->
<CostCenter>0010101201</CostCenter>
</AccountAssignment>
</Item>
<Item>
<GLAccount>0063001000</GLAccount>
<AmountInTransactionCurrency currencyCode="EUR">100</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>V1</TaxCode>
</Tax>
<AccountAssignment>
<!--Optional:-->
<CostCenter>0010101201</CostCenter>
</AccountAssignment>
</Item>
<CreditorItem>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<Creditor>S1030001</Creditor>
<AmountInTransactionCurrency currencyCode="EUR">-238</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
</CreditorItem>
<ProductTaxItem>
<TaxCode>V1</TaxCode>
<TaxItemClassification>VST</TaxItemClassification>
<AmountInTransactionCurrency currencyCode="EUR">38</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="EUR">200</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header/>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<CreationDateTime>2024-03-11T10:29:20.230Z</CreationDateTime>
</MessageHeader>
<!--1 or more repetitions:-->
<JournalEntryCreateRequest>
<MessageHeader>
<CreationDateTime>2024-03-11T10:29:20.230Z</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<OriginalReferenceDocument/>
<OriginalReferenceDocumentLogicalSystem/>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>KR</AccountingDocumentType>
<DocumentReferenceID>123</DocumentReferenceID>
<DocumentHeaderText>Tax</DocumentHeaderText>
<CreatedByUser>SAP</CreatedByUser>
<CompanyCode>1010</CompanyCode>
<DocumentDate>2024-03-11</DocumentDate>
<PostingDate>2024-03-11</PostingDate>
<TaxDeterminationDate>2024-03-11</TaxDeterminationDate>
<Item>
<GLAccount>0063001000</GLAccount>
<AmountInTransactionCurrency currencyCode="EUR">100</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>V1</TaxCode>
</Tax>
<AccountAssignment>
<!--Optional:-->
<CostCenter>0010101201</CostCenter>
</AccountAssignment>
</Item>
<Item>
<GLAccount>0063001000</GLAccount>
<AmountInTransactionCurrency currencyCode="EUR">100</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>V2</TaxCode>
</Tax>
<AccountAssignment>
<!--Optional:-->
<CostCenter>0010101201</CostCenter>
</AccountAssignment>
</Item>
<CreditorItem>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<Creditor>S1030001</Creditor>
<AmountInTransactionCurrency currencyCode="EUR">-226</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
</CreditorItem>
<ProductTaxItem>
<TaxCode>V1</TaxCode>
<TaxItemClassification>VST</TaxItemClassification>
<AmountInTransactionCurrency currencyCode="EUR">19</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="EUR">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>V2</TaxCode>
<TaxItemClassification>VST</TaxItemClassification>
<AmountInTransactionCurrency currencyCode="EUR">7</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="EUR">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header/>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<CreationDateTime>2024-03-11T10:29:20.230Z</CreationDateTime>
</MessageHeader>
<!--1 or more repetitions:-->
<JournalEntryCreateRequest>
<MessageHeader>
<CreationDateTime>2024-03-11T10:29:20.230Z</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<OriginalReferenceDocument/>
<OriginalReferenceDocumentLogicalSystem/>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>KR</AccountingDocumentType>
<DocumentReferenceID>123</DocumentReferenceID>
<DocumentHeaderText>Tax</DocumentHeaderText>
<CreatedByUser>SAP</CreatedByUser>
<CompanyCode>1010</CompanyCode>
<DocumentDate>2024-03-11</DocumentDate>
<PostingDate>2024-03-11</PostingDate>
<TaxDeterminationDate>2024-03-11</TaxDeterminationDate>
<Item>
<GLAccount>0063001000</GLAccount>
<AmountInTransactionCurrency currencyCode="EUR">100</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>V8</TaxCode>
</Tax>
<AccountAssignment>
<!--Optional:-->
<CostCenter>0010101201</CostCenter>
</AccountAssignment>
</Item>
<CreditorItem>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<Creditor>S1030001</Creditor>
<AmountInTransactionCurrency currencyCode="EUR">-100</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
</CreditorItem>
<ProductTaxItem>
<TaxCode>V8</TaxCode>
<TaxItemClassification>MWS</TaxItemClassification>
<AmountInTransactionCurrency currencyCode="EUR">-19</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="EUR">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>V8</TaxCode>
<TaxItemClassification>VST</TaxItemClassification>
<AmountInTransactionCurrency currencyCode="EUR">19</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="EUR">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
Customer invoices are the documents you send to customers to invoice them for products or services that you have sold. Output tax is the VAT you collect from your customers when you sell goods or services, and this is generally to be remitted to the government.
Please refer to the key points for posting supplier invoices.
For a customer invoice for a service or product with a 19% output tax, the tax amount should be 1,900 credited. You should enter the tax amount as -1,900.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header/>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<CreationDateTime>2024-01-17T03:25:11.102Z</CreationDateTime>
</MessageHeader>
<!--1 or more repetitions:-->
<JournalEntryCreateRequest>
<MessageHeader>
<CreationDateTime>2024-01-17T03:25:11.102Z</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>DR</AccountingDocumentType>
<DocumentHeaderText>AR With Tax</DocumentHeaderText>
<CreatedByUser>SAP</CreatedByUser>
<CompanyCode>1010</CompanyCode>
<DocumentDate>2024-01-17</DocumentDate>
<PostingDate>2024-01-17</PostingDate>
<TaxDeterminationDate>2024-01-17</TaxDeterminationDate>
<Item>
<GLAccount>41910000</GLAccount>
<AmountInTransactionCurrency currencyCode="EUR">-10000.00</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<!-- With Date by Default in GL Item -->
<AssignmentReference>AR with Tax</AssignmentReference>
<Tax>
<TaxCode>A2</TaxCode>
</Tax>
<AccountAssignment>
<ProfitCenter>YB600</ProfitCenter>
</AccountAssignment>
<ProfitabilitySupplement>
<Customer>10100001</Customer>
</ProfitabilitySupplement>
</Item>
<DebtorItem>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<Debtor>10100001</Debtor>
<AmountInTransactionCurrency currencyCode="EUR">11900.00</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<DocumentItemText>Customer item</DocumentItemText>
</DebtorItem>
<ProductTaxItem>
<TaxCode>A2</TaxCode>
<TaxItemClassification>MWS</TaxItemClassification>
<AmountInTransactionCurrency currencyCode="EUR">-1900.00</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="EUR">-10000.00</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
Businesses not liable to tax on sales or purchases, such as businesses in the public sector or insurance companies, cannot or can partially claim sales tax from incoming invoices as input tax. In this case, the incoming invoice is posted with a tax code that contains a condition for non-deductible input tax.
The non-deductible input tax can either be posted to a separate G/L account as a separate line item or be distributed to the expense items involved. For details please refer to Tax Type.
Pay attention to the following points when posting non-deductible input tax:
In this example where tax code N2 includes two tax items - input tax (VST) and non-deductible tax amount (NVV), both need to be maintained in the ProductTaxItem node. Since NVV is to be posted in the original expense account, the non-deductible tax amount should be added to the expense account.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header/>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<CreationDateTime>2024-03-11T10:29:20.230Z</CreationDateTime>
</MessageHeader>
<JournalEntryCreateRequest>
<MessageHeader>
<CreationDateTime>2024-03-11T10:29:20.230Z</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<DocumentReferenceID>123</DocumentReferenceID>
<AccountingDocumentType>KR</AccountingDocumentType>
<DocumentHeaderText>Tax Non Deductible</DocumentHeaderText>
<CreatedByUser>SAP</CreatedByUser>
<CompanyCode>1510</CompanyCode>
<DocumentDate>2024-03-11</DocumentDate>
<PostingDate>2024-03-11</PostingDate>
<TaxDeterminationDate>2024-03-11</TaxDeterminationDate>
<Item>
<GLAccount>65001000</GLAccount>
<AmountInTransactionCurrency currencyCode='JPY'>3672</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<DocumentItemText>GL Item</DocumentItemText>
<Tax>
<TaxCode>N2</TaxCode>
</Tax>
<AccountAssignment>
<CostCenter>15101101</CostCenter>
</AccountAssignment>
</Item>
<CreditorItem>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<Creditor>15300001</Creditor>
<AmountInTransactionCurrency currencyCode='JPY'>-3960</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<DocumentItemText>Supplier Item</DocumentItemText>
</CreditorItem>
<ProductTaxItem>
<TaxCode>N2</TaxCode>
<TaxItemClassification>VST</TaxItemClassification>
<AmountInTransactionCurrency currencyCode='JPY'>288</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode='JPY'>3600</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>N2</TaxCode>
<TaxItemClassification>NVV</TaxItemClassification>
<AmountInTransactionCurrency currencyCode='JPY'>72</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode='JPY'>3600</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
If tax is calculated by line items, that means the tax is not determined for the entire document. Instead, it must be determined and posted individually for each expense item or revenue item.
Generally, a line-by-line tax calculation is used only in company codes associated with the following countries: United States, Canada and, to some extent, India. If an external tax reporting system is used, the tax must be reported and posted on a line-by-line basis.
You may encounter the following error messages when posting with line-by-line tax calculation:
817(FF): Taxes by item is not activated and therefore not permitted in transfer.
818(FF): Taxes by item is activated; consequently, transfer by item is mandatory.
For tax at the line item level, Tax Item Group is required and must be identical with the related items. G/L Item has the relevant Tax Item Group parameter in the Tax substructure.
Now we will see three journal entry samples with reference payloads for line-by-line US tax. Note that Tax Jurisdiction Code is also required in the ProductTaxItem node for US tax.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header/>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<CreationDateTime>{{$isoTimestamp}}</CreationDateTime>
</MessageHeader>
<JournalEntryCreateRequest>
<MessageHeader>
<CreationDateTime>{{$isoTimestamp}}</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>SA</AccountingDocumentType>
<DocumentReferenceID>TAX_001</DocumentReferenceID>
<DocumentHeaderText>{{documentHeaderText_Header}}</DocumentHeaderText>
<CreatedByUser>SAP</CreatedByUser>
<CompanyCode>1710</CompanyCode>
<DocumentDate>{{currentDate}}</DocumentDate>
<PostingDate>{{currentDate}}</PostingDate>
<Item>
<GLAccount>61004000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">107.25</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>U1</TaxCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<TaxItemGroup>001</TaxItemGroup>
</Tax>
<AccountAssignment>
<CostCenter>17101101</CostCenter>
</AccountAssignment>
</Item>
<Item>
<GLAccount>61004000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">107.25</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>U1</TaxCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<TaxItemGroup>002</TaxItemGroup>
</Tax>
<AccountAssignment>
<CostCenter>17101101</CostCenter>
</AccountAssignment>
</Item>
<Item>
<GLAccount>61004000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">106</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>U1</TaxCode>
<TaxJurisdiction>FL00000000</TaxJurisdiction>
<TaxItemGroup>003</TaxItemGroup>
</Tax>
<AccountAssignment>
<CostCenter>17101101</CostCenter>
</AccountAssignment>
</Item>
<Item>
<GLAccount>11001000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">-300.00</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<HouseBank>USBK2</HouseBank>
<HouseBankAccount>USAC2</HouseBankAccount>
</Item>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>001</TaxItemGroup>
<TaxItemClassification>MW1</TaxItemClassification>
<DebitCreditCode>H</DebitCreditCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">-7.25</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>001</TaxItemGroup>
<TaxItemClassification>NVV</TaxItemClassification>
<DebitCreditCode>S</DebitCreditCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">7.25</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>002</TaxItemGroup>
<TaxItemClassification>MW1</TaxItemClassification>
<DebitCreditCode>H</DebitCreditCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">-7.25</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>002</TaxItemGroup>
<TaxItemClassification>NVV</TaxItemClassification>
<DebitCreditCode>S</DebitCreditCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">7.25</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>003</TaxItemGroup>
<TaxItemClassification>MW1</TaxItemClassification>
<DebitCreditCode>H</DebitCreditCode>
<TaxJurisdiction>FL00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">-6</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>003</TaxItemGroup>
<TaxItemClassification>NVV</TaxItemClassification>
<DebitCreditCode>S</DebitCreditCode>
<TaxJurisdiction>FL00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">6</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header/>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<CreationDateTime>{{$isoTimestamp}}</CreationDateTime>
</MessageHeader>
<JournalEntryCreateRequest>
<MessageHeader>
<CreationDateTime>{{$isoTimestamp}}</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>SA</AccountingDocumentType>
<DocumentReferenceID>TAX_001</DocumentReferenceID>
<DocumentHeaderText>{{documentHeaderText_Header}}</DocumentHeaderText>
<CreatedByUser>SAP</CreatedByUser>
<CompanyCode>1710</CompanyCode>
<DocumentDate>{{currentDate}}</DocumentDate>
<PostingDate>{{currentDate}}</PostingDate>
<Item>
<GLAccount>61004000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">107.25</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>U1</TaxCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<TaxItemGroup>001</TaxItemGroup>
</Tax>
<AccountAssignment>
<CostCenter>17101101</CostCenter>
</AccountAssignment>
</Item>
<Item>
<GLAccount>61004000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">107.25</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>U1</TaxCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<TaxItemGroup>001</TaxItemGroup>
</Tax>
<AccountAssignment>
<CostCenter>17101101</CostCenter>
</AccountAssignment>
</Item>
<Item>
<GLAccount>61004000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">106</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>U1</TaxCode>
<TaxJurisdiction>FL00000000</TaxJurisdiction>
<TaxItemGroup>002</TaxItemGroup>
</Tax>
<AccountAssignment>
<CostCenter>17101101</CostCenter>
</AccountAssignment>
</Item>
<Item>
<GLAccount>11001000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">-300.00</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<HouseBank>USBK2</HouseBank>
<HouseBankAccount>USAC2</HouseBankAccount>
</Item>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>001</TaxItemGroup>
<TaxItemClassification>MW1</TaxItemClassification>
<DebitCreditCode>H</DebitCreditCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">-14.5</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">-200</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>001</TaxItemGroup>
<TaxItemClassification>NVV</TaxItemClassification>
<DebitCreditCode>S</DebitCreditCode>
<TaxJurisdiction>CA00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">14.5</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">200</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>002</TaxItemGroup>
<TaxItemClassification>MW1</TaxItemClassification>
<DebitCreditCode>H</DebitCreditCode>
<TaxJurisdiction>FL00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">-6</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemGroup>002</TaxItemGroup>
<TaxItemClassification>NVV</TaxItemClassification>
<DebitCreditCode>S</DebitCreditCode>
<TaxJurisdiction>FL00000000</TaxJurisdiction>
<AmountInTransactionCurrency currencyCode="USD">6</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soap:Header/>
<soap:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<CreationDateTime>2024-01-17T07:05:19.212Z</CreationDateTime>
</MessageHeader>
<JournalEntryCreateRequest>
<MessageHeader>
<CreationDateTime>2024-01-17T07:05:19.212Z</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>SA</AccountingDocumentType>
<!-- If no this field, Message: For document type KR, an entry is required in field Reference -->
<DocumentReferenceID>TAX_001</DocumentReferenceID>
<DocumentHeaderText>Line By Line</DocumentHeaderText>
<CreatedByUser>SAP</CreatedByUser>
<CompanyCode>1710</CompanyCode>
<DocumentDate>2024-01-17</DocumentDate>
<PostingDate>2024-01-17</PostingDate>
<Item>
<ReferenceDocumentItem>1</ReferenceDocumentItem>
<GLAccount>61004000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">105</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<DocumentItemText>Test Tax</DocumentItemText>
<Tax>
<TaxCode>U1</TaxCode>
<TaxJurisdiction>4712100900</TaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
</Tax>
<AccountAssignment>
<CostCenter>17101101</CostCenter>
</AccountAssignment>
</Item>
<Item>
<ReferenceDocumentItem>2</ReferenceDocumentItem>
<GLAccount>11001000</GLAccount>
<AmountInTransactionCurrency currencyCode="USD">-100</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<DocumentItemText>Test Bank</DocumentItemText>
<HouseBank>USBK1</HouseBank>
<HouseBankAccount>USAC1</HouseBankAccount>
<ValueDate>2024-01-17</ValueDate>
</Item>
<!-- NVV Tax lines -->
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>NVV</TaxItemClassification>
<TaxJurisdiction>4700000000</TaxJurisdiction>
<TaxJurisdictionLevel>1</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>3.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">3</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>NVV</TaxItemClassification>
<TaxJurisdiction>4712100000</TaxJurisdiction>
<TaxJurisdictionLevel>2</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>2.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">2</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>NVV</TaxItemClassification>
<TaxJurisdiction>4712100900</TaxJurisdiction>
<TaxJurisdictionLevel>3</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>0.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">0</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>NVV</TaxItemClassification>
<TaxJurisdiction>4712100900</TaxJurisdiction>
<TaxJurisdictionLevel>4</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>0.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">0</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>NVV</TaxItemClassification>
<TaxJurisdiction>4712100900</TaxJurisdiction>
<TaxJurisdictionLevel>5</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>0.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">0</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>NVV</TaxItemClassification>
<TaxJurisdiction>4712100900</TaxJurisdiction>
<TaxJurisdictionLevel>6</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>0.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">0</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>MW1</TaxItemClassification>
<TaxJurisdiction>4700000000</TaxJurisdiction>
<TaxJurisdictionLevel>1</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>3.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">-3</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>MW2</TaxItemClassification>
<TaxJurisdiction>4712100000</TaxJurisdiction>
<TaxJurisdictionLevel>2</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>2.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">-2</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>MW3</TaxItemClassification>
<TaxJurisdiction>4712100900</TaxJurisdiction>
<TaxJurisdictionLevel>3</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>0.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">0</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>MW4</TaxItemClassification>
<TaxJurisdiction>4712100900</TaxJurisdiction>
<TaxJurisdictionLevel>4</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>0.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">0</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>MW4</TaxItemClassification>
<TaxJurisdiction>4712100900</TaxJurisdiction>
<TaxJurisdictionLevel>5</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>0.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">0</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<ProductTaxItem>
<TaxCode>U1</TaxCode>
<TaxItemClassification>MW4</TaxItemClassification>
<TaxJurisdiction>4712100900</TaxJurisdiction>
<TaxJurisdictionLevel>6</TaxJurisdictionLevel>
<LowestLevelTaxJurisdiction>4712100900</LowestLevelTaxJurisdiction>
<TaxItemGroup>1</TaxItemGroup>
<TaxRate>0.00</TaxRate>
<AmountInTransactionCurrency currencyCode="USD">0</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<TaxBaseAmountInTransCrcy currencyCode="USD">-100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soap:Body>
</soap:Envelope>
For the business context of withholding tax, please refer to Withholding Tax | SAP Help Portal. Generally withholding tax is tax that is charged from payment in some countries/regions. Instead of the responsible party paying it directly to the authorities, it's deducted by the customer from the payment for a taxed supplier and then sent straight to the tax authorities.
Withholding tax can be posted either during payment or invoicing, depending on the legal requirements of each region. For example, withholding tax is posted when the supplier invoice is posted, the tax is deducted and paid to tax authorities on behalf of the supplier.
If you want to post withholding tax via API, please kindly check parameters in withholding tax section. Please refer to WithholdingTaxItem | SAP Help Portal in details.
ReferenceDocumentItem is mandatory in Withholding Tax section and must have the reference with accounting document items. It doesn’t determine the sequence of the journal entry items.
Withholding Tax amount can be calculated automatically once TaxIsToBeCalculated is set with true and AmountInTransactionCurrency is set with 0.
For this client, withholding tax is required to post when invoice. A Supplier invoice should be posted with expense 100 together with 1% VAT and deducting 2% withholding tax. VAT tax code is V1 and withholding tax code is 02 with withholding tax type I1 and I2.
For the journal entry in the screenshot below, the account payable is 96, 4 withhold tax deducted from 100.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sfin="http://sap.com/xi/SAPSCORE/SFIN">
<soapenv:Header/>
<soapenv:Body>
<sfin:JournalEntryBulkCreateRequest>
<MessageHeader>
<TestDataIndicator/>
<CreationDateTime>{{$isoTimestamp}}</CreationDateTime>
</MessageHeader>
<JournalEntryCreateRequest>
<MessageHeader>
<TestDataIndicator/>
<CreationDateTime>{{$isoTimestamp}}</CreationDateTime>
</MessageHeader>
<JournalEntry>
<OriginalReferenceDocumentType>BKPFF</OriginalReferenceDocumentType>
<BusinessTransactionType>RFBU</BusinessTransactionType>
<AccountingDocumentType>KZ</AccountingDocumentType>
<DocumentReferenceID>123</DocumentReferenceID>
<DocumentHeaderText>Supplier_WithHolding_Tax</DocumentHeaderText>
<CreatedByUser>SAP</CreatedByUser>
<CompanyCode>5110</CompanyCode>
<DocumentDate>{{currentDate}}</DocumentDate>
<PostingDate>{{currentDate}}</PostingDate>
<TaxDeterminationDate>{{currentDate}}</TaxDeterminationDate>
<TaxReportingDate>{{currentDate}}</TaxReportingDate>
<Item>
<GLAccount> 61008000</GLAccount>
<AmountInTransactionCurrency currencyCode="IDR">99</AmountInTransactionCurrency>
<DebitCreditCode>S</DebitCreditCode>
<Tax>
<TaxCode>V1</TaxCode>
</Tax>
<AccountAssignment>
<CostCenter>51101101</CostCenter>
</AccountAssignment>
<BusinessPlace>5110</BusinessPlace>
</Item>
<CreditorItem>
<ReferenceDocumentItem>1</ReferenceDocumentItem>
<Creditor>51405110</Creditor>
<AmountInTransactionCurrency currencyCode="IDR">-100</AmountInTransactionCurrency>
<DebitCreditCode>H</DebitCreditCode>
<DocumentItemText>Vender item</DocumentItemText>
</CreditorItem>
<ProductTaxItem>
<TaxCode>V1</TaxCode>
<TaxItemClassification>VST</TaxItemClassification>
<AmountInTransactionCurrency currencyCode="IDR">1</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="IDR">100</TaxBaseAmountInTransCrcy>
</ProductTaxItem>
<WithholdingTaxItem>
<ReferenceDocumentItem>1</ReferenceDocumentItem>
<WithholdingTaxType>I1</WithholdingTaxType>
<WithholdingTaxCode>02</WithholdingTaxCode>
<TaxIsToBeCalculated>true</TaxIsToBeCalculated>
<AmountInTransactionCurrency currencyCode="IDR">0</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="IDR">100</TaxBaseAmountInTransCrcy>
</WithholdingTaxItem>
<WithholdingTaxItem>
<ReferenceDocumentItem>1</ReferenceDocumentItem>
<WithholdingTaxType>I2</WithholdingTaxType>
<WithholdingTaxCode>02</WithholdingTaxCode>
<TaxIsToBeCalculated>true</TaxIsToBeCalculated>
<AmountInTransactionCurrency currencyCode="IDR">0</AmountInTransactionCurrency>
<TaxBaseAmountInTransCrcy currencyCode="IDR">100</TaxBaseAmountInTransCrcy>
</WithholdingTaxItem>
</JournalEntry>
</JournalEntryCreateRequest>
</sfin:JournalEntryBulkCreateRequest>
</soapenv:Body>
</soapenv:Envelope>
If you'd like to explore more on the posting APIs, please refer to the following links on SAP Help Portal:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |