C_ESJIBillingDocumentQuery

DDL: C_ESJIBILLINGDOCUMENTQUERY SQL: CESJIBILLINGDOCQ Type: view CONSUMPTION

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.

Data Sources (1)

SourceAliasJoin Type
I_BillingDocument I_BillingDocument from

Parameters (1)

NameTypeDefault
P_Language sylangu

Associations (2)

CardinalityTargetAliasCondition
[0..*] C_ESJIBillingDocumentItemQuery _ESJIBillingDocumentItemQuery $projection.BillingDocument = _ESJIBillingDocumentItemQuery.BillingDocument
[0..1] I_SDDocStandardPartner _StandardPartner $projection.BillingDocument = _StandardPartner.SDDocument

Annotations (7)

NameValueLevelField
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)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument BillingDocument SD Document
ObjectType
SDDocumentCategory SDDocumentCategory Document Cat.
BillingDocumentCategory BillingDocumentCategory BillingCategory
BillingDocumentType BillingDocumentType Billing Type
BillingDocumentTypeName
CreatedByUser CreatedByUser User Name
CreationDate CreationDate Time Stamp
LastChangeDate LastChangeDate Time Stamp
SalesOrganization SalesOrganization Sales Organization
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
Division Division Internal Division ID
BillingDocumentDate BillingDocumentDate Billing Date
PayerParty PayerParty Payer
PayerPartyName
BillToParty _StandardPartner BillToParty Inv. Recipient
BillToPartyName
CustomerAccountAssignmentGroup CustomerAccountAssignmentGroup AccAssmtGrpCust
TotalNetAmount TotalNetAmount Total Net Amount
TransactionCurrency TransactionCurrency Transaction Currency
CustomerPriceGroup CustomerPriceGroup CustPrice Group
PriceListType PriceListType Price List Tp.
IncotermsClassification IncotermsClassification Incoterms
IncotermsClassificationName
CustomerPaymentTerms CustomerPaymentTerms Pyt Terms
CustomerPaymentTermsName
CompanyCode CompanyCode Receiver Company Code
DocumentReferenceID DocumentReferenceID Reference
ExchangeRateDate ExchangeRateDate Translatn Date
ExchangeRateType ExchangeRateType Exch. Rate Type
DunningArea DunningArea Dunning Area
SoldToParty SoldToParty Sold-to Party
SoldToPartyName
PurchaseOrderByCustomer PurchaseOrderByCustomer Purchase Order Number
CustomerGroup CustomerGroup Customer Group
Country Country Venue: Ctry/Reg
Region Region Venue Region
OverallSDProcessStatus OverallSDProcessStatus
AccountingTransferStatus AccountingTransferStatus
AccountingTransferStatusDesc
OverallSDProcessStatusDesc
_ESJIBillingDocumentItemQuery _ESJIBillingDocumentItemQuery

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 C_ESJIBillingDocumentQuery.
-- 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.
-- SQL view name: CESJIBILLINGDOCQ
-- Parameters: P_Language : sylangu

CREATE VIEW C_ESJIBillingDocumentQuery AS
SELECT
  BillingDocument,
  'BUS2037' AS ObjectType,
  SDDocumentCategory,
  BillingDocumentCategory,
  BillingDocumentType,
  _BillingDocumentType._Text[1: Language=$parameters.P_Language].BillingDocumentTypeName AS BillingDocumentTypeName,
  CreatedByUser,
  CreationDate,
  LastChangeDate,
  SalesOrganization,
  DistributionChannel,
  Division,
  BillingDocumentDate,
  PayerParty,
  _StandardPartner._PayerParty.CustomerName AS PayerPartyName,
  _StandardPartner.BillToParty AS BillToParty,
  _StandardPartner._BillToParty.CustomerName AS BillToPartyName,
  CustomerAccountAssignmentGroup,
  TotalNetAmount,
  TransactionCurrency,
  CustomerPriceGroup,
  PriceListType,
  IncotermsClassification,
  _IncotermsClassification._Text[1: Language = $parameters.P_Language].IncotermsClassificationName AS IncotermsClassificationName,
  CustomerPaymentTerms,
  _CustomerPaymentTerms._Text[1: Language = $parameters.P_Language].CustomerPaymentTermsName AS CustomerPaymentTermsName,
  CompanyCode,
  DocumentReferenceID,
  ExchangeRateDate,
  ExchangeRateType,
  DunningArea,
  SoldToParty,
  _StandardPartner._SoldToParty.CustomerName AS SoldToPartyName,
  PurchaseOrderByCustomer,
  CustomerGroup,
  Country,
  Region,
  OverallSDProcessStatus,
  AccountingTransferStatus,
  _AccountingTransferStatus._Text[1: Language= $parameters.P_Language].AccountingTransferStatusDesc AS AccountingTransferStatusDesc,
  _OverallSDProcessStatus._Text[1: Language = $parameters.P_Language].OverallSDProcessStatusDesc AS OverallSDProcessStatusDesc
FROM I_BillingDocument
LEFT OUTER JOIN C_ESJIBillingDocumentItemQuery AS _ESJIBillingDocumentItemQuery ON BillingDocument = _ESJIBillingDocumentItemQuery.BillingDocument  -- association [0..*]
LEFT OUTER JOIN I_SDDocStandardPartner AS _StandardPartner ON BillingDocument = _StandardPartner.SDDocument  -- association [0..1]
;