cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

TDS Limit in SAP Based on total invoice amount for fiscal year done.

ANMOL22369
Explorer
0 Kudos
309

Hi Team,

I got a requirment from business which is i got find to done with customization with the help of enhancement,

Purpose / Objective:

The purpose of this Business requirment implementing a TDS (Tax Deducted at Source) threshold limit configuration in SAP.
Currently, the system deducts TDS on every invoice amount without checking the cumulative transaction value for each vendor at PAN.

This leads to incorrect or non-compliant deductions.

The objective of this development is to ensure that TDS is deducted only after the total transaction value for a PAN exceeds the statutory threshold limit (₹50,00,000) within a financial year.

Business Requirement

TDS should be deducted only when the cumulative invoice/payment value for a vendor PAN in a financial year exceeds ₹50,00,000.
The system must check the total amount posted for each vendor PAN from the start of the fiscal year (April) and apply TDS only when the threshold is crossed.

 

Functional Requirements:

 

TABLE

Description

INPUT Logic.

FIELD

OUTPUT                               

LFA1

Fetch Vendor by Vendor PAN detail.

Vendor PAN

J_1IPANNO

Vendor Code of same PAN

LFBW

Pass Vendor Code and get the vendor with withholding tax type 194Q-4Q

Vendor Code which I got from LFA1(J_1IPANNO)

WITHT

Vendor Details which only have TDS type 194Q-4Q

As a Functional i have created the logic but i am confuged with from which table i can pick vendor invoice amount( which is final net amount after all kind of case which can reduce vendor invoice line item except vendor payment) I triend with BSEG, But BSEG is very big table, It will not work with BSEG. Please help me with the other solution other than BSEG, I avoid BSEG here, If only BSEG help here please give a clear logic. But provide any other solution.

Accepted Solutions (0)

Answers (1)

Answers (1)

Lakshmipathi
SAP Champion
SAP Champion
0 Kudos

Here are the tables and strategies you can use to avoid BSEG while still getting accurate invoice totals:

Use Table BKPF + BSIK/BSIS (Open Items) or BSAK/BSAS (Cleared Items). BKPF for Document header table. Use it to filter by fiscal year, company code, document type, and posting date. BSIK for Vendor open items (subset of BSEG). BSAK for Vendor cleared items (subset of BSEG). These tables are much smaller and indexed for performance.

Logic is as follows:

  • Join BKPF and BSIK/BSAK using BELNR, BUKRS, and GJAHR and filter by:
  • LIFNR (Vendor Code)
  • BUDAT (Posting Date) between April 1 and March 31
  • SHKZG = 'H' (Credit entries)
  • WRBTR (Amount in document currency)

If your TDS is applied on MM invoices, this is a cleaner route: Check RBKP for MM invoice header and RSEG MM invoice line items.

Logic is as follows:

  • Filter by LIFNR, BUDAT, and fiscal year.
  • Use WRBTR from RSEG for net amount.
  • Join with RBKP to get posting date and vendor.

If you're using New GL, use table FAGLFLEXA which is a powerful alternative and filter by Filter by LIFNR / BUDAT / WRBTR / RACCT. This table is optimized for reporting and supports cumulative logic well.

Finally, if none of the above options work and BSEG is the only source then, from performance tip point of view, use index tables like BSIK, BSAK, or clustered selects with FOR ALL ENTRIES. Always filter by fiscal year, company code, and vendor. Avoid SELECT * — only pull required fields like WRBTR, BELNR, BUKRS, GJAHR, LIFNR.

So with the above, the logic summary would be

  • Get PAN → Vendor Codes using LFA1 and J_1IPANNO
  • Filter Vendors with WHT Type 194Q-4Q using LFBW
  • Fetch Invoice Amounts using:
  • Preferred: BSIK, BSAK, RBKP, RSEG, FAGLFLEXA
  • Fallback: BSEG with optimized filters
  • Aggregate by PAN and Fiscal Year
  • Apply TDS only if cumulative > ₹50,00,000