A_BillingDocument
Billing Document Header
A_BillingDocument is a Composite CDS View that provides data about "Billing Document Header" in SAP S/4HANA. It reads from 1 data source (I_BillingDocument) and exposes 101 fields with key field BillingDocument. It has 5 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_BillingDocument | I_BillingDocument | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | A_BillingDocumentItem | _Item | $projection.BillingDocument = _Item.BillingDocument |
| [0..*] | A_BillingDocumentPartner | _Partner | $projection.BillingDocument = _Partner.BillingDocument |
| [0..*] | A_BillingDocumentPrcgElmnt | _PricingElement | $projection.BillingDocument = _PricingElement.BillingDocument |
| [0..*] | A_BillingDocumentText | _Text | $projection.BillingDocument = _Text.BillingDocument |
| [0..1] | E_BillingDocument | _Extension | $projection.BillingDocument = _Extension.BillingDocument |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Billing Document Header | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.lifecycle.contract.type | #PUBLIC_REMOTE_API | view | |
| AbapCatalog.sqlViewName | ASDBILLINGDOC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ObjectModel.representativeKey | BillingDocument | view | |
| ObjectModel.createEnabled | false | view | |
| ObjectModel.updateEnabled | false | view | |
| ObjectModel.deleteEnabled | false | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| Metadata.ignorePropagatedAnnotations | true | view |
Fields (101)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | BillingDocument | BillingDocument | SD Document | |
| SDDocumentCategory | SDDocumentCategory | Document Cat. | ||
| BillingDocumentCategory | BillingDocumentCategory | BillingCategory | ||
| BillingDocumentType | BillingDocumentType | Billing Type | ||
| CreationDate | CreationDate | Time Stamp | ||
| CreationTime | CreationTime | Time of Change | ||
| LastChangeDate | LastChangeDate | Time Stamp | ||
| LogicalSystem | LogicalSystem | Logical System | ||
| SalesOrganization | SalesOrganization | Sales Organization | ||
| DistributionChannel | DistributionChannel | RefDistCh-Cust/Mat. | ||
| Division | Division | Internal Division ID | ||
| BillingDocumentDate | BillingDocumentDate | Billing Date | ||
| BillingDocumentIsCancelled | BillingDocumentIsCancelled | Canceled | ||
| CancelledBillingDocument | CancelledBillingDocument | Canceld Bill.Dc | ||
| ForeignTrade | ||||
| IsExportDelivery | ||||
| BillingDocCombinationCriteria | BillingDocCombinationCriteria | |||
| ManualInvoiceMaintIsRelevant | ManualInvoiceMaintIsRelevant | Man.Inv.Maint. | ||
| IsIntrastatReportingRelevant | IsIntrastatReportingRelevant | Intrastat rel. | ||
| IsIntrastatReportingExcluded | IsIntrastatReportingExcluded | exclude Intra | ||
| TotalNetAmount | TotalNetAmount | Total Net Amount | ||
| TransactionCurrency | TransactionCurrency | Transaction Currency | ||
| StatisticsCurrency | StatisticsCurrency | |||
| ForeignTradeStstclCurrency | ForeignTradeStstclCurrency | |||
| TaxAmount | TotalTaxAmount | Tax Amount | ||
| TotalGrossAmount | ||||
| CustomerPriceGroup | CustomerPriceGroup | CustPrice Group | ||
| PriceListType | PriceListType | Price List Tp. | ||
| TaxDepartureCountry | TaxDepartureCountry | Tx Dep Ctry/Reg | ||
| VATRegistration | VATRegistration | VAT Registration No. | ||
| VATRegistrationOrigin | VATRegistrationOrigin | OriginSlsTxNo. | ||
| VATRegistrationCountry | VATRegistrationCountry | CtryRgnSlsTxNo. | ||
| HierarchyTypePricing | HierarchyTypePricing | |||
| CustomerTaxClassification1 | CustomerTaxClassification1 | |||
| CustomerTaxClassification2 | CustomerTaxClassification2 | |||
| CustomerTaxClassification3 | CustomerTaxClassification3 | |||
| CustomerTaxClassification4 | CustomerTaxClassification4 | |||
| CustomerTaxClassification5 | CustomerTaxClassification5 | |||
| CustomerTaxClassification6 | CustomerTaxClassification6 | |||
| CustomerTaxClassification7 | CustomerTaxClassification7 | |||
| CustomerTaxClassification8 | CustomerTaxClassification8 | |||
| CustomerTaxClassification9 | CustomerTaxClassification9 | |||
| IsEUTriangularDeal | IsEUTriangularDeal | Is EU Triangular Deal | ||
| SDPricingProcedure | SDPricingProcedure | Pric. Procedure | ||
| ShippingCondition | ShippingCondition | Shipping Conditions | ||
| IncotermsVersion | IncotermsVersion | Inco. Version | ||
| IncotermsClassification | IncotermsClassification | Incoterms | ||
| IncotermsTransferLocation | IncotermsTransferLocation | Incoterms 2 | ||
| IncotermsLocation1 | IncotermsLocation1 | Inco. Location1 | ||
| IncotermsLocation2 | IncotermsLocation2 | Inco. Location2 | ||
| PayerParty | PayerParty | Payer | ||
| ContractAccount | ContractAccount | Contract Acct | ||
| CustomerPaymentTerms | CustomerPaymentTerms | Pyt Terms | ||
| PaymentMethod | PaymentMethod | Pymt Meth. | ||
| PaymentReference | PaymentReference | Payment Reference | ||
| FixedValueDate | FixedValueDate | Fixed Val. Date | ||
| AdditionalValueDays | AdditionalValueDays | Add. Value Days | ||
| SEPAMandate | SEPAMandate | SEPA Mandate | ||
| CompanyCode | CompanyCode | Receiver Company Code | ||
| FiscalYear | FiscalYear | G/L Fiscal Year | ||
| AccountingDocument | AccountingDocument | Journal Entry | ||
| CustomerAccountAssignmentGroup | CustomerAccountAssignmentGroup | AccAssmtGrpCust | ||
| AccountingExchangeRateIsSet | AccountingExchangeRateIsSet | |||
| AbsltAccountingExchangeRate | ||||
| AcctgExchangeRateIsIndrctQtan | ||||
| ExchangeRateDate | ExchangeRateDate | Translatn Date | ||
| ExchangeRateType | ExchangeRateType | Exch. Rate Type | ||
| DocumentReferenceID | DocumentReferenceID | Reference | ||
| AssignmentReference | AssignmentReference | Assignment Reference | ||
| DunningArea | DunningArea | Dunning Area | ||
| DunningBlockingReason | DunningBlockingReason | Set Dunning Block | ||
| DunningKey | DunningKey | Dunning Key | ||
| InternalFinancialDocument | InternalFinancialDocument | |||
| IsRelevantForAccrual | IsRelevantForAccrual | Accruals | ||
| SoldToParty | SoldToParty | Sold-to Party | ||
| PartnerCompany | PartnerCompany | Trading Partner | ||
| PurchaseOrderByCustomer | PurchaseOrderByCustomer | Purchase Order Number | ||
| CustomerGroup | CustomerGroup | Customer Group | ||
| Country | Country | Venue: Ctry/Reg | ||
| CityCode | CityCode | IATA: City | ||
| SalesDistrict | SalesDistrict | Sales District | ||
| Region | Region | Venue Region | ||
| County | County | Wyoming County | ||
| CreditControlArea | CreditControlArea | Credit Control Area | ||
| CustomerRebateAgreement | CustomerRebateAgreement | |||
| SalesDocumentCondition | PricingDocument | Document Condition | ||
| OverallSDProcessStatus | OverallSDProcessStatus | |||
| OverallBillingStatus | OverallBillingStatus | |||
| AccountingPostingStatus | AccountingPostingStatus | |||
| AccountingTransferStatus | AccountingTransferStatus | |||
| BillingIssueType | BillingIssueType | |||
| InvoiceListStatus | InvoiceListStatus | |||
| OvrlItmGeneralIncompletionSts | OvrlItmGeneralIncompletionSts | |||
| OverallPricingIncompletionSts | OverallPricingIncompletionSts | |||
| InvoiceClearingStatus | InvoiceClearingStatus | |||
| BillingDocumentListType | InvoiceListType | |||
| BillingDocumentListDate | InvoiceListBillingDate | |||
| _Item | _Item | |||
| _Partner | _Partner | |||
| _PricingElement | _PricingElement | |||
| _Text | _Text |
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 A_BillingDocument.
-- 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 A_BillingDocument AS
SELECT
BillingDocument,
SDDocumentCategory,
BillingDocumentCategory,
BillingDocumentType,
CreationDate,
CreationTime,
LastChangeDate,
LogicalSystem,
SalesOrganization,
DistributionChannel,
Division,
BillingDocumentDate,
BillingDocumentIsCancelled,
CancelledBillingDocument,
cast('' as exnum) AS ForeignTrade,
cast('' as expkz) AS IsExportDelivery,
BillingDocCombinationCriteria,
ManualInvoiceMaintIsRelevant,
IsIntrastatReportingRelevant,
IsIntrastatReportingExcluded,
TotalNetAmount,
TransactionCurrency,
StatisticsCurrency,
ForeignTradeStstclCurrency,
TotalTaxAmount AS TaxAmount,
(TotalTaxAmount + TotalNetAmount) AS TotalGrossAmount,
CustomerPriceGroup,
PriceListType,
TaxDepartureCountry,
VATRegistration,
VATRegistrationOrigin,
VATRegistrationCountry,
HierarchyTypePricing,
CustomerTaxClassification1,
CustomerTaxClassification2,
CustomerTaxClassification3,
CustomerTaxClassification4,
CustomerTaxClassification5,
CustomerTaxClassification6,
CustomerTaxClassification7,
CustomerTaxClassification8,
CustomerTaxClassification9,
IsEUTriangularDeal,
SDPricingProcedure,
ShippingCondition,
IncotermsVersion,
IncotermsClassification,
IncotermsTransferLocation,
IncotermsLocation1,
IncotermsLocation2,
PayerParty,
ContractAccount,
CustomerPaymentTerms,
PaymentMethod,
PaymentReference,
FixedValueDate,
AdditionalValueDays,
SEPAMandate,
CompanyCode,
FiscalYear,
AccountingDocument,
CustomerAccountAssignmentGroup,
AccountingExchangeRateIsSet,
cast(abs( AccountingExchangeRate ) as kurrf_abs) AS AbsltAccountingExchangeRate,
cast(case when AccountingExchangeRate < 0 then 'X' else ' ' end as kurrf_quotatn_is_indirect) AS AcctgExchangeRateIsIndrctQtan,
ExchangeRateDate,
ExchangeRateType,
DocumentReferenceID,
AssignmentReference,
DunningArea,
DunningBlockingReason,
DunningKey,
InternalFinancialDocument,
IsRelevantForAccrual,
SoldToParty,
PartnerCompany,
PurchaseOrderByCustomer,
CustomerGroup,
Country,
CityCode,
SalesDistrict,
Region,
County,
CreditControlArea,
CustomerRebateAgreement,
PricingDocument AS SalesDocumentCondition,
OverallSDProcessStatus,
OverallBillingStatus,
AccountingPostingStatus,
AccountingTransferStatus,
BillingIssueType,
InvoiceListStatus,
OvrlItmGeneralIncompletionSts,
OverallPricingIncompletionSts,
InvoiceClearingStatus,
InvoiceListType AS BillingDocumentListType,
InvoiceListBillingDate AS BillingDocumentListDate
FROM I_BillingDocument
LEFT OUTER JOIN A_BillingDocumentItem AS _Item ON BillingDocument = _Item.BillingDocument -- association [0..*]
LEFT OUTER JOIN A_BillingDocumentPartner AS _Partner ON BillingDocument = _Partner.BillingDocument -- association [0..*]
LEFT OUTER JOIN A_BillingDocumentPrcgElmnt AS _PricingElement ON BillingDocument = _PricingElement.BillingDocument -- association [0..*]
LEFT OUTER JOIN A_BillingDocumentText AS _Text ON BillingDocument = _Text.BillingDocument -- association [0..*]
LEFT OUTER JOIN E_BillingDocument AS _Extension ON BillingDocument = _Extension.BillingDocument -- association [0..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- 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
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA