C_ESJIBillingDocumentQuery
Billing Document
C_ESJIBillingDocumentQuery is a Consumption CDS View that provides data about "Billing Document" in SAP S/4HANA. It reads from 1 data source (I_BillingDocument) and exposes 42 fields with key field BillingDocument. It has 2 associations to related views. Part of development package ESJI_SD_JAM_INTEG_CDS_CONT.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_BillingDocument | I_BillingDocument | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_Language | sylangu |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | C_ESJIBillingDocumentItemQuery | _ESJIBillingDocumentItemQuery | $projection.BillingDocument = _ESJIBillingDocumentItemQuery.BillingDocument |
| [0..1] | I_SDDocStandardPartner | _StandardPartner | $projection.BillingDocument = _StandardPartner.SDDocument |
Annotations (7)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CESJIBILLINGDOCQ | view | |
| EndUserText.label | Billing Document | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.dataClass | #MASTER | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (42)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | BillingDocument | BillingDocument | ||
| ObjectType | ||||
| SDDocumentCategory | SDDocumentCategory | |||
| BillingDocumentCategory | BillingDocumentCategory | |||
| BillingDocumentType | BillingDocumentType | |||
| BillingDocumentTypeName | ||||
| CreatedByUser | CreatedByUser | |||
| CreationDate | CreationDate | |||
| LastChangeDate | LastChangeDate | |||
| SalesOrganization | SalesOrganization | |||
| DistributionChannel | DistributionChannel | |||
| Division | Division | |||
| BillingDocumentDate | BillingDocumentDate | |||
| PayerParty | PayerParty | |||
| PayerPartyName | ||||
| BillToParty | _StandardPartner | BillToParty | ||
| BillToPartyName | ||||
| CustomerAccountAssignmentGroup | CustomerAccountAssignmentGroup | |||
| TotalNetAmount | TotalNetAmount | |||
| TransactionCurrency | TransactionCurrency | |||
| CustomerPriceGroup | CustomerPriceGroup | |||
| PriceListType | PriceListType | |||
| IncotermsClassification | IncotermsClassification | |||
| IncotermsClassificationName | ||||
| CustomerPaymentTerms | CustomerPaymentTerms | |||
| CustomerPaymentTermsName | ||||
| CompanyCode | CompanyCode | |||
| DocumentReferenceID | DocumentReferenceID | |||
| ExchangeRateDate | ExchangeRateDate | |||
| ExchangeRateType | ExchangeRateType | |||
| DunningArea | DunningArea | |||
| SoldToParty | SoldToParty | |||
| SoldToPartyName | ||||
| PurchaseOrderByCustomer | PurchaseOrderByCustomer | |||
| CustomerGroup | CustomerGroup | |||
| Country | Country | |||
| Region | Region | |||
| OverallSDProcessStatus | OverallSDProcessStatus | |||
| AccountingTransferStatus | AccountingTransferStatus | |||
| AccountingTransferStatusDesc | ||||
| OverallSDProcessStatusDesc | ||||
| _ESJIBillingDocumentItemQuery | _ESJIBillingDocumentItemQuery |
@AbapCatalog.sqlViewName: 'CESJIBILLINGDOCQ'
@EndUserText.label: 'Billing Document'
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.sizeCategory: #XL
@AccessControl.personalData.blocking: #NOT_REQUIRED
define view C_ESJIBillingDocumentQuery
with parameters
P_Language : sylangu
as select from I_BillingDocument
//Associations
association [0..*] to C_ESJIBillingDocumentItemQuery as _ESJIBillingDocumentItemQuery on $projection.BillingDocument = _ESJIBillingDocumentItemQuery.BillingDocument
association [0..1] to I_SDDocStandardPartner as _StandardPartner on $projection.BillingDocument = _StandardPartner.SDDocument
{
key BillingDocument,
'BUS2037' as ObjectType,
// category
SDDocumentCategory,
BillingDocumentCategory,
BillingDocumentType,
_BillingDocumentType._Text[1: Language=$parameters.P_Language].BillingDocumentTypeName,
//admin
CreatedByUser,
@Semantics.businessDate.createdAt: true
CreationDate,
@Semantics.businessDate.lastChangedAt: true
LastChangeDate,
//org
SalesOrganization,
DistributionChannel,
Division,
// billing
BillingDocumentDate,
PayerParty,
_StandardPartner._PayerParty.CustomerName as PayerPartyName,
_StandardPartner.BillToParty,
_StandardPartner._BillToParty.CustomerName as BillToPartyName,
CustomerAccountAssignmentGroup,
//pricing
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'TransactionCurrency'
TotalNetAmount,
@DefaultAggregation: #SUM
@Semantics.amount.currencyCode: 'TransactionCurrency'
cast (currency_conversion(
amount => TotalNetAmount,
source_currency => TransactionCurrency,
target_currency => cast ('EUR' as abap.cuky( 5 )),
exchange_rate_date => CreationDate,
exchange_rate_type => cast('M' as kurst ),
error_handling => #CNV_ERROR_HANDLING.SET_TO_NULL,
round => #CDSBoolean.true,
decimal_shift => #CDSBoolean.true,
decimal_shift_back => #CDSBoolean.true
) as net_amount_in_dsp_crcy) as NetAmountInDisplayCurrency,
@Semantics.currencyCode: true
TransactionCurrency,
@DefaultAggregation: #SUM
//@Semantics.amount.currencyCode: 'TransactionCurrency'
CustomerPriceGroup,
PriceListType,
//shipping
IncotermsClassification,
_IncotermsClassification._Text[1: Language = $parameters.P_Language].IncotermsClassificationName as IncotermsClassificationName,
//payment
CustomerPaymentTerms,
_CustomerPaymentTerms._Text[1: Language = $parameters.P_Language].CustomerPaymentTermsName as CustomerPaymentTermsName,
// //accounting
CompanyCode,
DocumentReferenceID,
ExchangeRateDate,
ExchangeRateType,
DunningArea,
//sales
SoldToParty,
_StandardPartner._SoldToParty.CustomerName as SoldToPartyName,
PurchaseOrderByCustomer,
CustomerGroup,
Country,
Region,
//status
OverallSDProcessStatus,
AccountingTransferStatus,
_AccountingTransferStatus._Text[1: Language= $parameters.P_Language].AccountingTransferStatusDesc as AccountingTransferStatusDesc,
_OverallSDProcessStatus._Text[1: Language = $parameters.P_Language].OverallSDProcessStatusDesc as OverallSDProcessStatusDesc,
_ESJIBillingDocumentItemQuery
}
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