C_STRPVATRETURNDOCLINEITEM

CDS View

Union of FI, MM & SD Section

C_STRPVATRETURNDOCLINEITEM is a CDS View in S/4HANA. Union of FI, MM & SD Section. It contains 29 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
C_StRpDocLineItemWthRefDoc view from CONSUMPTION Tax Items with Reference Accounting Documents

Fields (29)

KeyField CDS FieldsUsed in Views
KEY AccountingDocument AccountingDocument 1
KEY AccountingDocumentItem AccountingDocumentItem 1
KEY CompanyCode CompanyCode 1
KEY DocumentItemNumber DocumentItemNumber 1
KEY FiscalYear FiscalYear 1
KEY StatryRptCategory StatryRptCategory 1
KEY StatryRptgEntity StatryRptgEntity 1
KEY StatryRptRunID StatryRptRunID 1
AccountingDocumentType AccountingDocumentType 1
AdditionalCurrency1 AdditionalCurrency1 1
AdditionalCurrency2 AdditionalCurrency2 1
BillingDocument BillingDocument 1
BillingDocumentItem BillingDocumentItem 1
CashDiscountAmount CashDiscountAmount 1
CashDiscountBaseAmount CashDiscountBaseAmount 1
CompanyCodeCurrency CompanyCodeCurrency 1
CountryCurrency CountryCurrency 1
DocumentCurrency DocumentCurrency 1
DocumentDate DocumentDate 1
DocumentReferenceID DocumentReferenceID 1
FiscalPeriod FiscalPeriod 1
OriginalReferenceDocument OriginalReferenceDocument 1
PostingDate PostingDate 1
ReferenceDocumentType ReferenceDocumentType 1
ReportingCurrency ReportingCurrency 1
ReverseDocument ReverseDocument 1
ReverseDocumentFiscalYear ReverseDocumentFiscalYear 1
TaxCode TaxCode 1
TaxRateValidityStartDate TaxRateValidityStartDate 1
@AbapCatalog.sqlViewName: 'CSRVATRETDOCITM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@VDM.viewType: #CONSUMPTION
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #BLOCKED_DATA_INCLUDED
@AccessControl.authorizationCheck: #CHECK
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.dataClass: #MIXED
@EndUserText.label: 'Union of FI, MM & SD Section'
define view C_StRpVATReturnDocLineItem
  with parameters

    P_StatryRptgEntity  : srf_reporting_entity,
    P_StatryRptCategory : srf_rep_cat_id,
    P_StatryRptRunID    : srf_report_run_id
  as select from C_AccountingVATReturnDocItem(
                                              P_StatryRptgEntity      : $parameters.P_StatryRptgEntity,
                                              P_StatryRptCategory     : $parameters.P_StatryRptCategory,
                                              P_StatryRptRunID        : $parameters.P_StatryRptRunID
                                              )
{
  key StatryRptgEntity,
  key StatryRptCategory,
  key StatryRptRunID,
  key CompanyCode,
  key FiscalYear,
  key AccountingDocument,
  key AccountingDocumentItem,
  key DocumentItemNumber,
      cast('' as re_belnr)       as SupplierInvoice,
      cast('000000' as rblgp)    as SupplierInvoiceItem,
      cast('' as re_belnr)       as BillingDocument,
      cast('000000' as posnr_vf) as BillingDocumentItem,
      TaxCode,
      TaxItemGroup,
      AccountingDocumentType,
      AccountingDocumentItemType,
      ReferenceDocumentType,
      TransactionTypeDetermination,
      PostingKey,
      DebitCreditCode,
      GLAccount,
      FinancialAccountType,
      AccountType,
      FiscalPeriod,
      ReportingDate,
      PostingDate,
      DocumentDate,
      DocumentCurrency,
      CompanyCodeCurrency,
      ReportingCurrency,
      DebitCreditCodeIsChanged,
      CountryCurrency,
      AdditionalCurrency1, 
      AdditionalCurrency2, 
      Material,
      DocumentItemText,
      @Semantics.quantity.unitOfMeasure: 'QuantityUnit'
      QuantityInActlPostg,
      @Semantics.unitOfMeasure: true
      QuantityUnit,
      TaxRate,
      OriginalReferenceDocument,
      BusinessArea,
      Supplier,
      Customer,
      SupplierAccountGroup,                // This field value will be blank

      ReportingCountry,
      CompanyCodeCountry,
      TaxNumber1,                          // This field value will be blank

      TaxNumber2,                          // This field value will be blank

      TaxNumber3,                          // This field value will be blank

      BusinessPartnerName,                 // This field value will be blank

      CustomerSupplierAddress,             // This field value will be blank

      ReverseDocument,
      ReverseDocumentFiscalYear,
      InvoiceReference,
      InvoiceReferenceFiscalYear,
      ReferenceDocumentNumber,
      ReferenceDocumentFiscalYear,
      DistributedTaxAmountInCCrcy,
      DistrdTaxBaseAmountInCCrcy,
      DistributedTaxAmountInTC,
      DistrdTaxBaseAmountInTransCrcy,
      DistributedTaxAmtInCountryCrcy,
      DistrdTaxBaseAmountInCntryCrcy,
      DistrdTaxAmountInAddlCrcy1,
      DistrdTaxBaseAmountInAddlCrcy1,
      DistrdTaxAmountInAddlCrcy2,
      DistrdTaxBaseAmountInAddlCrcy2,
      
      case when CompanyCodeCountry = ReportingCountry
      then abs( DistrdTaxBaseAmountInCCrcy )
      else abs( DistrdTaxBaseAmountInCntryCrcy )
      end as CashDiscountBaseAmount,
      
      cast( 0 as vfprc_element_value ) as CashDiscountAmount,
      TaxCalculationProcedure,
      TaxRateValidityStartDate,     
      DocumentReferenceID

}
union all select from C_SupplierInvcVATReturnDocItem(
                                                     P_StatryRptgEntity      : $parameters.P_StatryRptgEntity,
                                                     P_StatryRptCategory     : $parameters.P_StatryRptCategory,
                                                     P_StatryRptRunID        : $parameters.P_StatryRptRunID
                                                    )
{
  key StatryRptgEntity,
  key StatryRptCategory,
  key StatryRptRunID,
  key CompanyCode,
  key FiscalYear,
  key AccountingDocument,
  key AccountingDocumentItem,
  key DocumentItemNumber,
      SupplierInvoice,
      SupplierInvoiceItem,
      cast('' as re_belnr)       as BillingDocument,
      cast('000000' as posnr_vf) as BillingDocumentItem,
      TaxCode,
      '000'                      as TaxItemGroup,
      AccountingDocumentType,
      AccountingDocumentItemType,
      ReferenceDocumentType,
      TransactionTypeDetermination,
      ''                         as PostingKey,
      DebitCreditCode,
      GLAccount,
      FinancialAccountType,
      AccountType,
      FiscalPeriod,
      ReportingDate,
      PostingDate,
      DocumentDate,
      DocumentCurrency,
      CompanyCodeCurrency,
      ReportingCurrency,
      DebitCreditCodeIsChanged,
      CountryCurrency,
      AdditionalCurrency1, 
      AdditionalCurrency2, 
      Material,
      ''                         as DocumentItemText,
      QuantityInActlPostg,
      QuantityUnit,
      TaxRate,
      OriginalReferenceDocument,
      BusinessArea,
      Supplier,
      Customer,
      SupplierAccountGroup,                 // This field value will be blank

      ReportingCountry,
      CompanyCodeCountry,
      TaxNumber1,                           // This field value will be blank

      TaxNumber2,                           // This field value will be blank

      TaxNumber3,                           // This field value will be blank

      BusinessPartnerName,                  // This field value will be blank

      CustomerSupplierAddress,              // This field value will be blank

      ReverseDocument,
      ReverseDocumentFiscalYear,
      InvoiceReference,
      InvoiceReferenceFiscalYear,
      ReferenceDocumentNumber,
      ReferenceDocumentFiscalYear,
      DistributedTaxAmountInCCrcy,
      DistrdTaxBaseAmountInCCrcy,
      DistributedTaxAmountInTC,
      DistrdTaxBaseAmountInTransCrcy,
      DistributedTaxAmtInCountryCrcy,
      DistrdTaxBaseAmountInCntryCrcy,
      DistrdTaxAmountInAddlCrcy1,
      DistrdTaxBaseAmountInAddlCrcy1,
      DistrdTaxAmountInAddlCrcy2,
      DistrdTaxBaseAmountInAddlCrcy2,
      
      case when CompanyCodeCountry = ReportingCountry
      then abs( DistrdTaxBaseAmountInCCrcy )
      else abs( DistrdTaxBaseAmountInCntryCrcy )
      end as CashDiscountBaseAmount,
     
      cast( 0 as vfprc_element_value ) as CashDiscountAmount,
      TaxCalculationProcedure,
      TaxRateValidityStartDate,
      DocumentReferenceID
}
union all select from C_BillingVATReturnDocItem(
                                                P_StatryRptgEntity      : $parameters.P_StatryRptgEntity,
                                                P_StatryRptCategory     : $parameters.P_StatryRptCategory,
                                                P_StatryRptRunID        : $parameters.P_StatryRptRunID
                                               )
{
  key StatryRptgEntity,
  key StatryRptCategory,
  key StatryRptRunID,
  key CompanyCode,
  key FiscalYear,
  key AccountingDocument,
  key AccountingDocumentItem,
  key DocumentItemNumber,
      cast('' as re_belnr)    as SupplierInvoice,
      cast('000000' as rblgp) as SupplierInvoiceItem,
      BillingDocument,
      BillingDocumentItem,
      TaxCode,
      '000'                   as TaxItemGroup,
      AccountingDocumentType,
      AccountingDocumentItemType,
      ReferenceDocumentType,
      TransactionTypeDetermination,
      ''                      as PostingKey,
      DebitCreditCode,
      GLAccount,
      FinancialAccountType,
      AccountType,
      FiscalPeriod,
      ReportingDate,
      PostingDate,
      DocumentDate,
      DocumentCurrency,
      CompanyCodeCurrency,
      ReportingCurrency,
      DebitCreditCodeIsChanged,
      CountryCurrency,
      AdditionalCurrency1, 
      AdditionalCurrency2, 
      Material,
      ''                      as DocumentItemText,
      QuantityInActlPostg,
      QuantityUnit,
      TaxRate,
      OriginalReferenceDocument,
      BusinessArea,
      Supplier,
      Customer,
      SupplierAccountGroup,             // This field value will be blank

      ReportingCountry,
      CompanyCodeCountry,
      TaxNumber1,                       // This field value will be blank

      TaxNumber2,                       // This field value will be blank

      TaxNumber3,                       // This field value will be blank

      BusinessPartnerName,              // This field value will be blank

      CustomerSupplierAddress,          // This field value will be blank

      ReverseDocument,
      ReverseDocumentFiscalYear,
      InvoiceReference,
      InvoiceReferenceFiscalYear,
      ReferenceDocumentNumber,
      ReferenceDocumentFiscalYear,
      DistributedTaxAmountInCCrcy,
      DistrdTaxBaseAmountInCCrcy,
      DistributedTaxAmountInTC,
      DistrdTaxBaseAmountInTransCrcy,
      DistributedTaxAmtInCountryCrcy,
      DistrdTaxBaseAmountInCntryCrcy,
      DistrdTaxAmountInAddlCrcy1,
      DistrdTaxBaseAmountInAddlCrcy1,
      DistrdTaxAmountInAddlCrcy2,
      DistrdTaxBaseAmountInAddlCrcy2,
      CashDiscountBaseAmount,
      CashDiscountAmount,
      TaxCalculationProcedure,
      TaxRateValidityStartDate,
      DocumentReferenceID
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"C_ACCOUNTINGVATRETURNDOCITEM",
"C_BILLINGVATRETURNDOCITEM",
"C_SUPPLIERINVCVATRETURNDOCITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/