A_CmplSubsqntProcessFlow

DDL: A_CMPLSUBSQNTPROCESSFLOW Type: view_entity CONSUMPTION

CMH Subsequent Documents entity

A_CmplSubsqntProcessFlow is a Consumption CDS View that provides data about "CMH Subsequent Documents entity" in SAP S/4HANA. It reads from 2 data sources (I_SDDocumentCategoryText, I_SDDocumentMultiLevelProcFlow) and exposes 17 fields with key field DocRelationshipUUID. It is exposed through 1 OData service (API_CMPLPROCESSFLOWDETAIL_3).

Data Sources (2)

SourceAliasJoin Type
I_SDDocumentCategoryText _Category inner
I_SDDocumentMultiLevelProcFlow SubsequentProcFlowDocItem from

Annotations (11)

NameValueLevelField
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label CMH Subsequent Documents entity view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
Metadata.ignorePropagatedAnnotations true view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
OData.entitySet.name SubsequentProcFlowDocItem view
OData.entityType.name SubsequentProcFlowDocItem_Type view

OData Services (1)

ServiceBindingVersionContractRelease
API_CMPLPROCESSFLOWDETAIL_3

Fields (17)

KeyFieldSource TableSource FieldDescription
KEY DocRelationshipUUID I_SDDocumentMultiLevelProcFlow DocRelationshipUUID
PrecedingDocument I_SDDocumentMultiLevelProcFlow PrecedingDocument
PrecedingDocumentItem I_SDDocumentMultiLevelProcFlow PrecedingDocumentItem
SubsequentDocument I_SDDocumentMultiLevelProcFlow SubsequentDocument
SubsequentDocumentItem I_SDDocumentMultiLevelProcFlow SubsequentDocumentItem
SubsqntDocItmPrecdgDocument _SDDocMultiLevelProcFlow PrecedingDocument
SubsqntDocItmPrecdgDocItem _SDDocMultiLevelProcFlow PrecedingDocumentItem
SubsequentDocumentCategory I_SDDocumentMultiLevelProcFlow SubsequentDocumentCategory
DocumentDescription I_SDDocumentCategoryText SDDocumentCategoryName
SubsequentDocStatus _ProcessFlowStatus SubsequentDocStatus
SubsequentDocStatusDesc _ProcessFlowStatus SDProcessStatusDesc
ProcessFlowLevel I_SDDocumentMultiLevelProcFlow ProcessFlowLevel
InspectionDocument _ComplaintInspection InspectionDocument
ReturnsInspectionItem _ComplaintInspection ReturnsInspectionItem
InspDocCategoryValue _ComplaintInspection SubsequentDocumentCategory
ReturnsInspectionStatusText _ComplaintInspection ReturnsInspectionStatusText
CustomerReturnType _ComplaintInspection CustomerReturnType
@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'CMH Subsequent Documents entity'
@ObjectModel: {

   usageType: {
     dataClass:      #MIXED,
     serviceQuality: #D,
     sizeCategory:   #XL
   }
}
@Metadata.ignorePropagatedAnnotations: true
@AccessControl.personalData.blocking: #NOT_REQUIRED
@VDM.viewType: #CONSUMPTION
@VDM.lifecycle.contract.type:#PUBLIC_REMOTE_API
@OData: {
  entitySet:  { name: 'SubsequentProcFlowDocItem' },
 entityType: { name: 'SubsequentProcFlowDocItem_Type' }
}
define view entity A_CmplSubsqntProcessFlow
  as select from           I_SDDocumentMultiLevelProcFlow as SubsequentProcFlowDocItem
    left outer to one join I_SDDocumentMultiLevelProcFlow as _SDDocMultiLevelProcFlow on  _SDDocMultiLevelProcFlow.SubsequentDocument         = SubsequentProcFlowDocItem.SubsequentDocument
                                                                                      and _SDDocMultiLevelProcFlow.SubsequentDocumentCategory = SubsequentProcFlowDocItem.SubsequentDocumentCategory
                                                                                      and _SDDocMultiLevelProcFlow.SubsequentDocumentItem     = SubsequentProcFlowDocItem.SubsequentDocumentItem
                                                                                      and _SDDocMultiLevelProcFlow.ProcessFlowLevel           = '00'

    left outer to one join I_ComplaintProcessFlowStatus   as _ProcessFlowStatus       on  _SDDocMultiLevelProcFlow.SubsequentDocument     = _ProcessFlowStatus.SalesDocument
                                                                                      and _SDDocMultiLevelProcFlow.SubsequentDocumentItem = _ProcessFlowStatus.DocumentItemNumber

    inner join             I_SDDocumentCategoryText       as _Category                on  _SDDocMultiLevelProcFlow.SubsequentDocumentCategory = _Category.SDDocumentCategory
                                                                                      and _Category.Language                                  = $session.system_language

    left outer to one join A_ComplaintInspection          as _ComplaintInspection     on  _SDDocMultiLevelProcFlow.PrecedingDocument         = _ComplaintInspection.ReferenceDocument
                                                                                      and _SDDocMultiLevelProcFlow.PrecedingDocumentItem     = _ComplaintInspection.ReferenceDocumentItem
                                                                                      and _SDDocMultiLevelProcFlow.PrecedingDocumentCategory = 'H'
                                                                                      and SubsequentProcFlowDocItem.SubsequentDocumentCategory  = 'T'
{
  key SubsequentProcFlowDocItem.DocRelationshipUUID,
      SubsequentProcFlowDocItem.PrecedingDocument,
      SubsequentProcFlowDocItem.PrecedingDocumentItem,
      SubsequentProcFlowDocItem.SubsequentDocument,
      SubsequentProcFlowDocItem.SubsequentDocumentItem,
      _SDDocMultiLevelProcFlow.PrecedingDocument      as SubsqntDocItmPrecdgDocument,
      _SDDocMultiLevelProcFlow.PrecedingDocumentItem  as SubsqntDocItmPrecdgDocItem,
      SubsequentProcFlowDocItem.SubsequentDocumentCategory,
      _Category.SDDocumentCategoryName                as DocumentDescription,
      _ProcessFlowStatus.SubsequentDocStatus,
      _ProcessFlowStatus.SDProcessStatusDesc          as SubsequentDocStatusDesc,
      SubsequentProcFlowDocItem.ProcessFlowLevel,
      _ComplaintInspection.InspectionDocument,
      _ComplaintInspection.ReturnsInspectionItem,
      _ComplaintInspection.SubsequentDocumentCategory as InspDocCategoryValue,
      _ComplaintInspection.ReturnsInspectionStatusText,
      _ComplaintInspection.CustomerReturnType
}
where
  (
       SubsequentProcFlowDocItem.SubsequentDocumentCategory = 'C' --> Sales Order
    or SubsequentProcFlowDocItem.SubsequentDocumentCategory = 'H' --> Customer Return
    or SubsequentProcFlowDocItem.SubsequentDocumentCategory = 'M' --> Invoice
    or SubsequentProcFlowDocItem.SubsequentDocumentCategory = 'O' --> Credit Memo
    or SubsequentProcFlowDocItem.SubsequentDocumentCategory = 'P' --> Debit Memo
    or SubsequentProcFlowDocItem.SubsequentDocumentCategory = 'T' --> Returns Delivery
    or SubsequentProcFlowDocItem.SubsequentDocumentCategory = 'J' --> Outbound Delivery
    or SubsequentProcFlowDocItem.SubsequentDocumentCategory = 'K' --> Credit Memo Request
    or SubsequentProcFlowDocItem.SubsequentDocumentCategory = 'L' --> Debit Memo Request
  )