Fdm_Coll_Tax_View
Tax to be added to Payments
Fdm_Coll_Tax_View is a CDS View that provides data about "Tax to be added to Payments" in SAP S/4HANA. It reads from 1 data source (bseg).
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| bseg | x | inner |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | FDM_COLL_TAX | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ObjectModel.usageType.serviceQuality | #P | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| EndUserText.label | Tax to be added to Payments | view |
@AbapCatalog.sqlViewName: 'FDM_COLL_TAX'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #P
@ObjectModel.usageType.sizeCategory: #L
@EndUserText.label: 'Tax to be added to Payments'
define view Fdm_Coll_Tax_View
// with parameters @Environment.systemField: #SYSTEM_DATE
// today : syst_datum
//read the taxes
as select
b.mandt,
b.bukrs as comp_code,
// t.waers as local_currency,
b.gjahr as fiscal_year,
b.belnr as invoice_no,
b.buzei as doc_item,
b.kunnr as customer,
b.h_bldat as inv_date,
b.h_budat as posting_date,
b.manst as dunning_level,
b.madat as dunning_date,
b.netdt as due_date,
b.netdt as inv_due_date,
b.sk1dt as discount_date,
0 as invoice_amount,
case x.shkzg when 'S' then x.wrbtr else -x.wrbtr end as tax_amount,
case x.shkzg when 'S' then x.dmbtr else -x.dmbtr end as tax_amount_local_currency,
0 as paid_amount,
' ' as payment_currency,
case b.manst when '0' then 0 else b.wrbtr end as dunning_amount,
b.h_waers as currency,
b.augdt as payment_date,
b.mansp as fdm_mansp,
b.umskz as spgl_ind,
b.rebzj,
'TAX' as rebzg,
b.rebzz
from bseg as b
// inner join t001 as t on b.mandt = t.mandt and b.bukrs = t.bukrs
inner join bseg as x
on b.mandt = x.mandt
and b.bukrs = x.bukrs
and b.gjahr = x.gjahr
and b.belnr = x.belnr
and ( x.shkzg = 'H' and ( x.mwart = 'V' or x.mwart = 'A' ) or x.ktosl = 'MVA' )
where
b.koart = 'D'
// and umskz != 'A'
and b.h_bstat != 'S'
and b.shkzg = 'H'
//read only taxes for credit memos as those must include the tax lines - the invoices have them already included in the debtor line
and b.augbl = ''
and(
b.rebzg = ''
or b.rebzg = 'V'
) and b.filkd = ''
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA