C_SalesDocumentBillingStatus

DDL: C_SALESDOCUMENTBILLINGSTATUS SQL: CSDBILLSTAT Type: view CONSUMPTION

Billing Status of a Sales Document

C_SalesDocumentBillingStatus is a Consumption CDS View that provides data about "Billing Status of a Sales Document" in SAP S/4HANA. It reads from 1 data source (I_BillingDocumentItem) and exposes 4 fields with key fields BillingDocument, ClearingAccountingDocument. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_BillingDocumentItem BillingDocumentItem from

Associations (1)

CardinalityTargetAliasCondition
[0..*] I_ReceivablesPayablesItem _PayableItems BillingDocumentItem.BillingDocument = _PayableItems.BillingDocument

Annotations (8)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName CSDBILLSTAT view
EndUserText.label Billing Status of a Sales Document view
VDM.viewType #CONSUMPTION view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
AccessControl.authorizationCheck #CHECK view

Fields (4)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument I_BillingDocumentItem BillingDocument
KEY ClearingAccountingDocument _PayableItems ClearingAccountingDocument
_BillingDoc _BillingDocument
_PayableItems _PayableItems
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.sqlViewName: 'CSDBILLSTAT'
@EndUserText.label: 'Billing Status of a Sales Document'
@VDM.viewType: #CONSUMPTION
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@AccessControl.authorizationCheck:#CHECK
define view C_SalesDocumentBillingStatus
  as select from I_BillingDocumentItem as BillingDocumentItem
  association [0..*] to I_ReceivablesPayablesItem as _PayableItems on BillingDocumentItem.BillingDocument = _PayableItems.BillingDocument

{
  key BillingDocumentItem.BillingDocument          as  BillingDocument,
  key _PayableItems.ClearingAccountingDocument     as  ClearingAccountingDocument,
      case _PayableItems.ClearingAccountingDocument
          when '' then 'I001'
          else 'I002'
      end                                          as  AccountingDocumentStatus,
      _BillingDocument                             as  _BillingDoc,
      _PayableItems
}
group by
  BillingDocumentItem.BillingDocument,
  _PayableItems.ClearingAccountingDocument
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLINGDOCUMENTITEM",
"I_RECEIVABLESPAYABLESITEM"
],
"ASSOCIATED":
[
"I_BILLINGDOCUMENT",
"I_RECEIVABLESPAYABLESITEM"
],
"BASE":
[
"I_BILLINGDOCUMENTITEM"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/