C_ESJIBillingDocumentQuery

DDL: C_ESJIBILLINGDOCUMENTQUERY SQL: CESJIBILLINGDOCQ Type: view CONSUMPTION Package: ESJI_SD_JAM_INTEG_CDS_CONT

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)

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
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
}