I_CAInvcgDocChargeAndDiscount

DDL: I_CAINVCGDOCCHARGEANDDISCOUNT Type: view_entity BASIC Package: FKKINV_VDM_INV

Fakturierungsbeleg Zu- und Abschläge

Invoicing Document Charges and Discounts

I_CAInvcgDocChargeAndDiscount (Basic)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Public Edition with built-in and side-by-side extension capabilities.

ContrAcctgInvcgDocChrgAndDisc · Contract Accounting

I_CAInvcgDocChargeAndDiscount is a Basic CDS View that provides data about "Fakturierungsbeleg Zu- und Abschläge" in SAP S/4HANA. It reads from 1 data source (dfkkinvdoc_c) and exposes 15 fields with key fields CAInvoicingDocument, CADocumentNumber, CABPItemNumber. It has 3 associations to related views. Part of development package FKKINV_VDM_INV.

SAP Help Documentation

CategoryCDS Views for Transaction Data
Purpose
This CDS view retrieves the charges and discounts of the invoicing document in Convergent Invoicing. This CDS view provides the data to answer the following business questions: Which charges and discounts have been applied for a given invoicing document? To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Authorizations Users who want to use this CDS view must have a role with the following restriction types set to read access: BEGRU_VKTYP Authorizations for Invoicing Documents BUKRS Company Code You can use the Display Restriction Types app to find out in which business catalogs these restriction types are included.

Structure
Important Fields Important fields in this view include the following: Field Name Description CAInvoicingDocument Invoicing Document Number CADocumentNumber (Contract Accounting) Document Number CABPItemNumber (Contract Accounting) Document Item Number

Data Extraction
Data Extraction Type This CDS view is enabled for data extraction in full mode.

View on SAP Help Portal →

SAP API Hub

CategoryBasic
StateC1
Line of BusinessContract Accounting
Application ComponentFI-CA-INV-2CL
CapabilitiesData Source for Data Extraction,Data Source for Defining CDS Entities,Data Source in SQL Select,Association Target for Defining CDS Entities
Extensible (Key User)No
Extensible (Developer)No
Release State (Key User)Released
Release State (Developer)Released
PackageContract Accounting for SAP S/4HANA Cloud Public Edition
Description <p>This CDS view retrieves the charges and discounts of the invoicing document in Convergent Invoicing.</p> <p>This CDS view provides the data to answer the following business questions:</p> <ul> <li><p>Which charges and discounts have been applied for a given invoicing document?</p></li> </ul> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (1)

SourceAliasJoin Type
dfkkinvdoc_c dfkkinvdoc_c from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_CAInvcgDocHeader _CAInvcgDocHeader $projection.CAInvoicingDocument = _CAInvcgDocHeader.CAInvoicingDocument
[0..1] I_CADocument _CADocument $projection.CADocumentNumber = _CADocument.CADocumentNumber
[0..1] I_Currency _TransactionCurrency $projection.TransactionCurrency = _TransactionCurrency.Currency

Annotations (11)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Fakturierungsbeleg Zu- und Abschläge view
VDM.viewType #BASIC view
Analytics.dataExtraction.enabled true view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.modelingPattern #NONE view
ObjectModel.sapObjectNodeType.name ContrAcctgInvcgDocChrgAndDisc view
Metadata.ignorePropagatedAnnotations true view
Analytics.technicalName ICAInvcgDChDst view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY CAInvoicingDocument invdocno Number of Invoicing Document
KEY CADocumentNumber opbel Number of a FI-CA Document
KEY CABPItemNumber opupk Item Number in FI-CA Document
CAInvcgChargeAndDiscountKey chgkey Charge and Discount Key
CAInvcgIsChargeOrDiscount chgdisc Chrge/Disc. Ind
CACreditWorthiness bonit FI-CA Creditworthiness
CAItemPeriodStartDate date_from Start of Period of Line Item
CAItemPeriodEndDate date_to End of Period of Line Item
TransactionCurrency waers Transaction Currency
CAInvcgChrgAndDiscBaseAmount basamt Base Amount for Calculation of Charges/Discounts
CAInvcgChrgAndDiscAmount chgamt Charge/Discount Amount
CAInvcgChrgAndDiscIsExisting chghist Entry/Exist. of Indiv. History Records per Source Doc. Item
_CAInvcgDocHeader _CAInvcgDocHeader
_CADocument _CADocument
_TransactionCurrency _TransactionCurrency

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_CAInvcgDocChargeAndDiscount.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.

CREATE VIEW I_CAInvcgDocChargeAndDiscount AS
SELECT
  invdocno AS CAInvoicingDocument,
  opbel AS CADocumentNumber,
  opupk AS CABPItemNumber,
  chgkey AS CAInvcgChargeAndDiscountKey,
  chgdisc AS CAInvcgIsChargeOrDiscount,
  bonit AS CACreditWorthiness,
  date_from AS CAItemPeriodStartDate,
  date_to AS CAItemPeriodEndDate,
  waers AS TransactionCurrency,
  basamt AS CAInvcgChrgAndDiscBaseAmount,
  chgamt AS CAInvcgChrgAndDiscAmount,
  chghist AS CAInvcgChrgAndDiscIsExisting
FROM dfkkinvdoc_c
LEFT OUTER JOIN I_CAInvcgDocHeader AS _CAInvcgDocHeader ON CAInvoicingDocument = _CAInvcgDocHeader.CAInvoicingDocument  -- association [1..1]
LEFT OUTER JOIN I_CADocument AS _CADocument ON CADocumentNumber = _CADocument.CADocumentNumber  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _TransactionCurrency ON TransactionCurrency = _TransactionCurrency.Currency  -- association [0..1]
;