C_IncompleteSalesDocByCat

DDL: C_INCOMPLETESALESDOCBYCAT SQL: CSDINCMPLTSLSDBC Type: view CONSUMPTION

Incomplete Sales Document by Category

C_IncompleteSalesDocByCat is a Consumption CDS View that provides data about "Incomplete Sales Document by Category" in SAP S/4HANA. It reads from 1 data source (I_SalesDocumentBasic) and exposes 20 fields with key field SalesDocument.

Data Sources (1)

SourceAliasJoin Type
I_SalesDocumentBasic SalesDocument inner

Annotations (8)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.sqlViewName CSDINCMPLTSLSDBC view
EndUserText.label Incomplete Sales Document by Category view

Fields (20)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument SalesDocument
SDDocumentCategory SDDocumentCategory
_SDDocumentCategory _SDDocumentCategory
SDDocumentCategoryName
SalesDocumentType SalesDocumentType
_SalesDocumentType _SalesDocumentType
SoldToParty SoldToParty
_SoldToParty _SoldToParty
SalesOrganization SalesOrganization
_SalesOrganization _SalesOrganization
DistributionChannel DistributionChannel
_DistributionChannel _DistributionChannel
OrganizationDivision OrganizationDivision
_OrganizationDivision _OrganizationDivision
SalesOffice SalesOffice
_SalesOffice _SalesOffice
SalesGroup SalesGroup
_SalesGroup _SalesGroup
NumberOfIncompleteSlsDocuments
OverallSDProcessStatus I_SalesDocumentBasic OverallSDProcessStatus
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #L
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck:#CHECK
@AbapCatalog.sqlViewName: 'CSDINCMPLTSLSDBC'
@EndUserText.label: 'Incomplete Sales Document by Category'
            
define view C_IncompleteSalesDocByCat 
as select distinct from I_SDDocumentIncompletionLog as IncompleteSDDocument
inner join I_SalesDocumentBasic as SalesDocument
   on IncompleteSDDocument.SDDocument = SalesDocument.SalesDocument
   
{
  key SalesDocument,
  
  @ObjectModel.foreignKey.association: '_SDDocumentCategory'
  @Consumption.labelElement: 'SDDocumentCategoryName'
  SDDocumentCategory,
  _SDDocumentCategory,
  
  @Semantics.text: true
  _SDDocumentCategory._Text[1: Language=$session.system_language].SDDocumentCategoryName,
  
  @ObjectModel.foreignKey.association: '_SalesDocumentType'
  SalesDocumentType,
  _SalesDocumentType,
  
  @ObjectModel.foreignKey.association: '_SoldToParty'
  // @Consumption.valueHelpDefinition: [ { entity: { name: 'I_Customer_VH', element: 'Customer' } } ]

  @Consumption.valueHelpDefinition: [ { entity: { name: 'D_CustomerCVH', element: 'Customer' } } ]
  SoldToParty,
  _SoldToParty,
  
  @ObjectModel.foreignKey.association: '_SalesOrganization'
  SalesOrganization,
  _SalesOrganization,
  
  @ObjectModel.foreignKey.association: '_DistributionChannel'
  DistributionChannel,
  _DistributionChannel,
  
  @ObjectModel.foreignKey.association: '_OrganizationDivision'
  OrganizationDivision,
  _OrganizationDivision,
  
  @ObjectModel.foreignKey.association: '_SalesOffice'
  SalesOffice,
  _SalesOffice,
  
  @ObjectModel.foreignKey.association: '_SalesGroup'
  SalesGroup,
  _SalesGroup,
  
  @DefaultAggregation: #SUM
  cast (1 as nmbr_of_incmplt_sls_doc) as NumberOfIncompleteSlsDocuments,
  
  SalesDocument.OverallSDProcessStatus
  
} 
where SalesDocument.OverallSDProcessStatus != 'C'
  and (
       SalesDocument.SDDocumentCategory = 'A' // Inquiry

    or SalesDocument.SDDocumentCategory = 'B' // Quotation

    or SalesDocument.SDDocumentCategory = 'C' // Order

    or SalesDocument.SDDocumentCategory = 'D' // Item Proposal

    or SalesDocument.SDDocumentCategory = 'G' // Contract

    or SalesDocument.SDDocumentCategory = 'H' // Returns

    or SalesDocument.SDDocumentCategory = 'I' // Order w/o Charge

    or SalesDocument.SDDocumentCategory = 'K' // Credit Memo Request

    or SalesDocument.SDDocumentCategory = 'L' // Debit Memo Request

       )
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SALESDOCUMENTBASIC",
"I_SDDOCUMENTCATEGORY",
"I_SDDOCUMENTCATEGORYTEXT",
"I_SDDOCUMENTINCOMPLETIONLOG"
],
"ASSOCIATED":
[
"I_CUSTOMER",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_SALESDOCUMENTTYPE",
"I_SALESGROUP",
"I_SALESOFFICE",
"I_SALESORGANIZATION",
"I_SDDOCUMENTCATEGORY"
],
"BASE":
[
"I_SALESDOCUMENTBASIC"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/