@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'
defineview P_CustRetProcFlow05
asselectfrom P_CustRetProcFlow0 as Level0
innerjoin I_AdvncdRetsMgmtMatlInspection as Level1 on Level1.ReferenceDocument = Level0.CustomerReturn
innerjoin 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
{
//Keykey 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
)