P_SOFAPROCFLOW10

CDS View

P_SOFAPROCFLOW10 is a CDS View in S/4HANA. It contains 14 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_SOFAProcFlow20 view from COMPOSITE

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: 'PSOFAPROCF10'

define view P_SOFAProcFlow10 
as select from P_SOFAProcFlow00           as SalesDocument  --> Level 0
    inner join I_SDDocumentProcessFlow    as Level1  --> Level 1
on SalesDocument.SalesDocument = Level1.PrecedingDocument   
  and (
       Level1.SubsequentDocumentCategory = 'J' or   --> Delivery
       Level1.SubsequentDocumentCategory = 'T' or   --> Returns Delivery 
       Level1.SubsequentDocumentCategory = 'M' or   --> Invoice
       Level1.SubsequentDocumentCategory = 'O' or   --> Credit memo
       Level1.SubsequentDocumentCategory = 'P' or   --> Debit memo       
       Level1.SubsequentDocumentCategory = 'U' or   --> Pro Forma Invoice      
       Level1.SubsequentDocumentCategory = 'L' ) --> Debit Memo Request    
left outer to one join 
I_BillingDocument as BillingDocument
  on Level1.SubsequentDocument         = BillingDocument.BillingDocument     and
     Level1.SubsequentDocumentCategory = BillingDocument.SDDocumentCategory       
{
   key SalesDocument,   
   key SalesDocument.SDDocumentCategory,
   key Level1.SubsequentDocument         as Level1Document,
   key Level1.SubsequentDocumentItem     as Level1DocumentItem,
   key Level1.SubsequentDocumentCategory as Level1DocumentCategory, 
   // double entries for credit debit memos should be no problem

   
   SalesDocumentType,
   
   //Organization

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

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

    
  
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BILLINGDOCUMENT",
"I_SDDOCUMENTPROCESSFLOW",
"P_SOFAPROCFLOW00"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/