P_CUSTRETPROCFLOW05

CDS View

Customer Return Process Flow: Level +0.5 Inspection

P_CUSTRETPROCFLOW05 is a CDS View in S/4HANA. Customer Return Process Flow: Level +0.5 Inspection. It contains 9 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
P_CustRetProcFlow22 view inner CONSUMPTION Customer Return Process Flow: Level +2 Inspection
P_CustRetProcFlow32 view from CONSUMPTION Customer Return Process Flow: Level +3 RPO

Fields (9)

KeyField CDS FieldsUsed in Views
KEY Level1Document Level0Document 1
KEY Level1DocumentItem Level0DocumentItem,Level2DocumentItem 2
CustomerReturn CustomerReturn 1
CustomerReturnType CustomerReturnType 1
CustRetItmFollowUpActivity CustRetItmFollowUpActivity 1
DistributionChannel DistributionChannel 1
Level1DocumentCategory Level0DocumentCategory,Level2DocumentCategory 2
OrganizationDivision OrganizationDivision 1
SalesOrganization SalesOrganization 1
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XL

@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'PCUSTRETPROCF05'


define view P_CustRetProcFlow05

  as select from P_CustRetProcFlow0             as Level0
    inner join   I_AdvncdRetsMgmtMatlInspection as Level1 on Level1.ReferenceDocument = Level0.CustomerReturn
  
    inner join   I_AdvncdRetsMgmtProcExecuted   as ARMProcessExcuted    on  ARMProcessExcuted.RetsMgmtProcess = Level0.RetsMgmtProcess
                                                                        and ARMProcessExcuted.RetsMgmtProcessItem =Level1.ReferenceDocumentItem
                                                                        and ARMProcessExcuted.RetsMgmtProcessStep = '0042'
                                                                        and ARMProcessExcuted.ReturnsDocument =Level1.InspectionDocument
                                                                        and ARMProcessExcuted.ReturnsDocumentType = '05'
  association [1..1] to I_SalesDocumentItemBasic as _CustomerReturnItem on  Level0.CustomerReturn        = _CustomerReturnItem.SalesDocument
                                                                        and Level1.ReferenceDocumentItem = _CustomerReturnItem.SalesDocumentItem

{
      //Key

  key Level1.InspectionDocument    as Level1Document,
      Level1.ReferenceDocumentItem as Level1DocumentItem,
      'INSP'                       as Level1DocumentCategory,

      Level0.SDDocumentCategory,
      Level0.CustomerReturnType,

      //Customer Return

      Level0.CustomerReturn,

      Level1.ProductIsInspectedAtCustSite,
      Level1.ReturnsDelivery,
      Level1.ReturnsDeliveryItem,
      //Organization

      Level0.SalesOrganization,
      Level0.DistributionChannel,
      Level0.OrganizationDivision,

      Level1.CustRetItmFollowUpActivity,
      
      ARMProcessExcuted.RetsMgmtProcItmQtySplit as RetsMgmtProcItmQtySplit

}
where
  (
        _CustomerReturnItem.RetsMgmtProcessingBlock = ''
    and Level1.IsDeleted                            = ''
    and Level1.ReturnsInspectionPublishStatus       = 'P' --- ARM Inspection Published
   
  )