C_TaxDocumentStRpActivity
Tax Document Reporting Activity
C_TaxDocumentStRpActivity is a Consumption CDS View that provides data about "Tax Document Reporting Activity" in SAP S/4HANA. It reads from 3 data sources (I_CompanyCode, I_StRpDocumentStatus, I_LtstTaxReportingDateStRpActy) and exposes 43 fields with key fields CompanyCode, AccountingDocument, FiscalYear, ChangedOnDateTime, TaxItem. It has 1 association to related views.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_CompanyCode | _CompanyCode | left_outer |
| I_StRpDocumentStatus | StRpDocumentStatus | left_outer |
| I_LtstTaxReportingDateStRpActy | TaxRptgdate | left_outer |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| P_TaxReportingFromDate | vatdate | |
| P_TaxReportingToDate | vatdate |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_Address_2 | _AddressRepresentation | MngTaxSTRpTaxItem.AddressID = _AddressRepresentation.AddressID and _AddressRepresentation.AddressRepresentationCode is initial and _AddressRepresentation.AddressPersonID is initial |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| VDM.viewType | #CONSUMPTION | view | |
| AbapCatalog.sqlViewName | CSTRPTAXDOCACTVT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| EndUserText.label | Tax Document Reporting Activity | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (43)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CompanyCode | MngTaxSTRpTaxItem | CompanyCode | |
| KEY | AccountingDocument | MngTaxSTRpTaxItem | AccountingDocument | |
| KEY | FiscalYear | MngTaxSTRpTaxItem | FiscalYear | |
| KEY | ChangedOnDateTime | |||
| KEY | TaxItem | MngTaxSTRpTaxItem | TaxItem | |
| PostingDate | MngTaxSTRpTaxItem | PostingDate | ||
| DocumentDate | MngTaxSTRpTaxItem | DocumentDate | ||
| AccountingDocumentType | MngTaxSTRpTaxItem | AccountingDocumentType | ||
| TaxReportingDate | MngTaxSTRpTaxItem | TaxReportingDate | ||
| ReportingDate | MngTaxSTRpTaxItem | ReportingDate | ||
| TransactionTypeDetermination | MngTaxSTRpTaxItem | TransactionTypeDetermination | ||
| GLAccount | MngTaxSTRpTaxItem | GLAccount | ||
| TaxJurisdiction | MngTaxSTRpTaxItem | TaxJurisdiction | ||
| TaxCode | MngTaxSTRpTaxItem | TaxCode | ||
| TaxBaseAmountInRptgCrcy | MngTaxSTRpTaxItem | TaxBaseAmountInRptgCrcy | ||
| TaxAmountInRptgCrcy | MngTaxSTRpTaxItem | TaxAmountInRptgCrcy | ||
| ReportingCurrency | MngTaxSTRpTaxItem | ReportingCurrency | ||
| TaxIsNotDeductible | MngTaxSTRpTaxItem | TaxIsNotDeductible | ||
| BusinessPartner | MngTaxSTRpTaxItem | BusinessPartner | ||
| SenderCompanyCode | MngTaxSTRpTaxItem | SenderCompanyCode | ||
| SenderAccountingDocument | MngTaxSTRpTaxItem | SenderAccountingDocument | ||
| SenderFiscalYear | MngTaxSTRpTaxItem | SenderFiscalYear | ||
| SenderLogicalSystem | MngTaxSTRpTaxItem | SenderLogicalSystem | ||
| OriginalTaxReportingDate | ||||
| OldTaxReportingDate | I_LtstTaxReportingDateStRpActy | OldTaxReportingDate | ||
| NewTaxReportingDate | I_LtstTaxReportingDateStRpActy | NewTaxReportingDate | ||
| TaxItemIsIncludedendasTaxItemIsIncluded | ||||
| LastChangedByUser | I_LtstTaxReportingDateStRpActy | LastChangedByUser | ||
| TaxRptgDateIsActive | I_CompanyCode | TaxRptgDateIsActive | ||
| StatryRptRunStatus | I_StRpDocumentStatus | StatryRptRunStatus | ||
| ReportingCountry | MngTaxSTRpTaxItem | ReportingCountry | ||
| TotalNumberOfComments | I_LtstTaxReportingDateStRpActy | TotalNumberOfComments | ||
| OriginalReferenceDocument | MngTaxSTRpTaxItem | OriginalReferenceDocument | ||
| BusinessPlace | MngTaxSTRpTaxItem | BusinessPlace | ||
| ReverseDocument | MngTaxSTRpTaxItem | ReverseDocument | ||
| ReverseDocumentFiscalYear | MngTaxSTRpTaxItem | ReverseDocumentFiscalYear | ||
| IsReversal | MngTaxSTRpTaxItem | IsReversal | ||
| IsReversed | MngTaxSTRpTaxItem | IsReversed | ||
| DocumentReferenceID | MngTaxSTRpTaxItem | DocumentReferenceID | ||
| TaxNumber2 | MngTaxSTRpTaxItem | TaxNumber2 | ||
| BusinessPartnerName | MngTaxSTRpTaxItem | BusinessPartnerName | ||
| AddressID | MngTaxSTRpTaxItem | AddressID | ||
| _AddressRepresentation | _AddressRepresentation |
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'CSTRPTAXDOCACTVT'
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Tax Document Reporting Activity'
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MIXED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #NOT_REQUIRED
/*+[hideWarning] { "IDS" : [ "DOUBLE_JOIN" ] } */
define view C_TaxDocumentStRpActivity
with parameters
P_TaxReportingFromDate : vatdate,
P_TaxReportingToDate : vatdate
as select distinct from I_TaxDocumentStRpActivity( P_TaxReportingFromDate: $parameters.P_TaxReportingFromDate,
P_TaxReportingToDate: $parameters.P_TaxReportingToDate ) as MngTaxSTRpTaxItem
left outer join I_LtstTaxReportingDateStRpActy as TaxRptgdate on TaxRptgdate.CompanyCode = MngTaxSTRpTaxItem.CompanyCode
and TaxRptgdate.AccountingDocument = MngTaxSTRpTaxItem.AccountingDocument
and TaxRptgdate.FiscalYear = MngTaxSTRpTaxItem.FiscalYear
left outer join I_StRpDocumentStatus as StRpDocumentStatus on StRpDocumentStatus.CompanyCode = MngTaxSTRpTaxItem.CompanyCode
and StRpDocumentStatus.AccountingDocument = MngTaxSTRpTaxItem.AccountingDocument
and StRpDocumentStatus.FiscalYear = MngTaxSTRpTaxItem.FiscalYear
left outer join I_CompanyCode as _CompanyCode on MngTaxSTRpTaxItem.CompanyCode = _CompanyCode.CompanyCode
association [0..1] to I_Address_2 as _AddressRepresentation on MngTaxSTRpTaxItem.AddressID = _AddressRepresentation.AddressID
and _AddressRepresentation.AddressRepresentationCode is initial
and _AddressRepresentation.AddressPersonID is initial
// left outer join I_StRpRunDetails as StRpRunDetails
// on StRpRunDetails.CompanyCode = MngTaxSTRpTaxItem.CompanyCode
// and StRpRunDetails.AccountingDocument = MngTaxSTRpTaxItem.AccountingDocument
// and StRpRunDetails.FiscalYear = MngTaxSTRpTaxItem.FiscalYear
// and StRpRunDetails.StatryRptRunStatus = 'SOK'
{
key MngTaxSTRpTaxItem.CompanyCode as CompanyCode,
key MngTaxSTRpTaxItem.AccountingDocument,
key MngTaxSTRpTaxItem.FiscalYear,
key coalesce( TaxRptgdate.ChangedOnDateTime, cast('19700101000000' as abap.dec(15,0)) ) as ChangedOnDateTime,
key MngTaxSTRpTaxItem.TaxItem,
MngTaxSTRpTaxItem.PostingDate,
MngTaxSTRpTaxItem.DocumentDate,
MngTaxSTRpTaxItem.AccountingDocumentType,
MngTaxSTRpTaxItem.TaxReportingDate,
MngTaxSTRpTaxItem.ReportingDate,
//MngTaxSTRpTaxItem.TaxType,
//MngTaxSTRpTaxItem._ReceivablesPayablesItem.FinancialAccountType,
MngTaxSTRpTaxItem.TransactionTypeDetermination,
MngTaxSTRpTaxItem.GLAccount,
MngTaxSTRpTaxItem.TaxJurisdiction,
MngTaxSTRpTaxItem.TaxCode,
@Semantics.amount.currencyCode: 'ReportingCurrency'
MngTaxSTRpTaxItem.TaxBaseAmountInRptgCrcy,
@Semantics.amount.currencyCode: 'ReportingCurrency'
MngTaxSTRpTaxItem.TaxAmountInRptgCrcy,
MngTaxSTRpTaxItem.ReportingCurrency,
MngTaxSTRpTaxItem.TaxIsNotDeductible,
MngTaxSTRpTaxItem.BusinessPartner,
MngTaxSTRpTaxItem.SenderCompanyCode as SenderCompanyCode,
MngTaxSTRpTaxItem.SenderAccountingDocument as SenderAccountingDocument,
MngTaxSTRpTaxItem.SenderFiscalYear as SenderFiscalYear,
MngTaxSTRpTaxItem.SenderLogicalSystem as SenderLogicalSystem,
case when TaxRptgdate.OriginalTaxReportingDate = '' then '00000000' else TaxRptgdate.OriginalTaxReportingDate end as OriginalTaxReportingDate,
//TaxRptgdate.OriginalTaxReportingDate,
TaxRptgdate.OldTaxReportingDate,
TaxRptgdate.NewTaxReportingDate,
case
when ( MngTaxSTRpTaxItem.TaxReportingDate = '99991231') then 'E'
when ( TaxRptgdate.TaxItemIsIncluded = 'E' and MngTaxSTRpTaxItem.TaxReportingDate between $parameters.P_TaxReportingFromDate and $parameters.P_TaxReportingToDate )
then 'I'
when ( TaxRptgdate.TaxItemIsIncluded = 'I' and MngTaxSTRpTaxItem.TaxReportingDate not between $parameters.P_TaxReportingFromDate and $parameters.P_TaxReportingToDate)
then 'E'
else coalesce(TaxRptgdate.TaxItemIsIncluded, '')
end as TaxItemIsIncluded,
TaxRptgdate.LastChangedByUser,
_CompanyCode.TaxRptgDateIsActive as TaxRptgDateIsActive,
StRpDocumentStatus.StatryRptRunStatus as StatryRptRunStatus,
MngTaxSTRpTaxItem.ReportingCountry as ReportingCountry,
TaxRptgdate.TotalNumberOfComments as TotalNumberOfComments,
MngTaxSTRpTaxItem.OriginalReferenceDocument,
MngTaxSTRpTaxItem.BusinessPlace,
MngTaxSTRpTaxItem.ReverseDocument,
MngTaxSTRpTaxItem.ReverseDocumentFiscalYear,
MngTaxSTRpTaxItem.IsReversal,
MngTaxSTRpTaxItem.IsReversed,
MngTaxSTRpTaxItem.DocumentReferenceID,
MngTaxSTRpTaxItem.TaxNumber2,
MngTaxSTRpTaxItem.BusinessPartnerName,
MngTaxSTRpTaxItem.AddressID,
_AddressRepresentation
}
where
(
MngTaxSTRpTaxItem.ReportingDate between $parameters.P_TaxReportingFromDate and $parameters.P_TaxReportingToDate
or MngTaxSTRpTaxItem.ReportingDate = '99991231'
)
or(
TaxRptgdate.OriginalTaxReportingDate between $parameters.P_TaxReportingFromDate and $parameters.P_TaxReportingToDate
and TaxRptgdate.OriginalTaxReportingDate <> '99991231'
)
or(
TaxRptgdate.OldTaxReportingDate between $parameters.P_TaxReportingFromDate and $parameters.P_TaxReportingToDate
and TaxRptgdate.OldTaxReportingDate <> '99991231'
)
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_COMPANYCODE",
"I_LTSTTAXREPORTINGDATESTRPACTY",
"I_STRPDOCUMENTSTATUS",
"I_TAXDOCUMENTSTRPACTIVITY"
],
"ASSOCIATED":
[
"I_ADDRESS_2"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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