P_SOFAPROCFLOW20

CDS View

SOFA Process Flow:: Level +2 Sales & Distribution

P_SOFAPROCFLOW20 is a CDS View in S/4HANA. SOFA Process Flow:: Level +2 Sales & Distribution. It contains 14 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_SOFAProcFlow30 view from COMPOSITE SOFA Process Flow:: Level +3 Sales & Distribution

Fields (14)

KeyField CDS FieldsUsed in Views
KEY SDDocumentCategory SDDocumentCategory 1
DistributionChannel DistributionChannel 1
OrganizationDivision OrganizationDivision 1
OverallOrdReltdBillgStatus OverallOrdReltdBillgStatus 1
OverallSDProcessStatus OverallSDProcessStatus 1
OverallTotalDeliveryStatus OverallTotalDeliveryStatus 1
PurchaseOrderByCustomer PurchaseOrderByCustomer 1
RequestedDeliveryDate RequestedDeliveryDate 1
SalesDocumentDate SalesDocumentDate 1
SalesDocumentType SalesDocumentType 1
SalesGroup SalesGroup 1
SalesOffice SalesOffice 1
SalesOrganization SalesOrganization 1
SoldToParty SoldToParty 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: #COMPOSITE
@AbapCatalog.sqlViewName: 'PSOFAPROCF20'

define view P_SOFAProcFlow20 
 as select from   P_SOFAProcFlow10        as Level1
 inner join       I_SDDocumentProcessFlow as Level2
on 
     Level1.Level1Document         = Level2.PrecedingDocument
and  Level1.Level1DocumentCategory = Level2.PrecedingDocumentCategory
and  Level1.Level1DocumentItem     = Level2.PrecedingDocumentItem
and ( Level2.SubsequentDocumentCategory = 'M' or   --> Invoice
      Level2.SubsequentDocumentCategory = 'U' or   --> Pro Forma Invoice      
      Level2.SubsequentDocumentCategory = 'P' )    --> Debit Memo 
left outer to one join 
I_BillingDocument as BillingDocument
  on Level2.SubsequentDocument         = BillingDocument.BillingDocument  and
     Level2.SubsequentDocumentCategory = BillingDocument.SDDocumentCategory                   
{
   //SalesOrder

   key SalesDocument,
   key Level1.SDDocumentCategory,
   
   key Level1Document,
   key Level1DocumentItem,
   key Level1DocumentCategory,
   
   key Level2.SubsequentDocument         as Level2Document,
   key Level2.SubsequentDocumentItem     as Level2DocumentItem,
   key Level2.SubsequentDocumentCategory as Level2DocumentCategory,
   
   Level1.SalesDocumentType,

    //Organization

   Level1.SalesOrganization,
   Level1.DistributionChannel,
   Level1.OrganizationDivision,   
   
   Level1.OverallSDProcessStatus,
   Level1.OverallTotalDeliveryStatus,
   Level1.OverallOrdReltdBillgStatus,
   
   //Misc

    Level1.RequestedDeliveryDate,
    --OverallSDProcessStatus,
    Level1.SalesDocumentDate,
    Level1.SalesGroup,
    Level1.SalesOffice,
    Level1.SoldToParty,
    Level1.PurchaseOrderByCustomer,
   
                
   case 
     when
      BillingDocument.BillingDocumentIsCancelled = 'X'
     then 'X' 
     else ''
    end as BillingDocumentIsCancelled   
 }