P_SOFAProcFlow10
P_SOFAProcFlow10 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_SDDocumentProcessFlow, P_SOFAProcFlow00) and exposes 19 fields with key fields SalesDocument, SDDocumentCategory, Level1Document, Level1DocumentItem, Level1DocumentCategory.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_SDDocumentProcessFlow | Level1 | inner |
| P_SOFAProcFlow00 | SalesDocument | from |
Annotations (8)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XL | view | |
| VDM.private | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| AbapCatalog.sqlViewName | PSOFAPROCF10 | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesDocument | SalesDocument | ||
| KEY | SDDocumentCategory | P_SOFAProcFlow00 | SDDocumentCategory | |
| KEY | Level1Document | I_SDDocumentProcessFlow | SubsequentDocument | |
| KEY | Level1DocumentItem | I_SDDocumentProcessFlow | SubsequentDocumentItem | |
| KEY | Level1DocumentCategory | I_SDDocumentProcessFlow | SubsequentDocumentCategory | |
| SalesDocumentType | SalesDocumentType | |||
| SalesOrganization | P_SOFAProcFlow00 | SalesOrganization | ||
| DistributionChannel | P_SOFAProcFlow00 | DistributionChannel | ||
| OrganizationDivision | P_SOFAProcFlow00 | OrganizationDivision | ||
| OverallSDProcessStatus | P_SOFAProcFlow00 | OverallSDProcessStatus | ||
| OverallTotalDeliveryStatus | P_SOFAProcFlow00 | OverallTotalDeliveryStatus | ||
| OverallOrdReltdBillgStatus | P_SOFAProcFlow00 | OverallOrdReltdBillgStatus | ||
| RequestedDeliveryDate | P_SOFAProcFlow00 | RequestedDeliveryDate | ||
| OverallSDProcessStatus | ||||
| SalesDocumentDate | P_SOFAProcFlow00 | SalesDocumentDate | ||
| SalesGroup | P_SOFAProcFlow00 | SalesGroup | ||
| SalesOffice | P_SOFAProcFlow00 | SalesOffice | ||
| SoldToParty | P_SOFAProcFlow00 | SoldToParty | ||
| PurchaseOrderByCustomer | P_SOFAProcFlow00 | PurchaseOrderByCustomer |
@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":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA