P_SalesContractProcessFlow40
Contract process flow level 4-0
P_SalesContractProcessFlow40 is a Composite CDS View that provides data about "Contract process flow level 4-0" in SAP S/4HANA. It reads from 2 data sources (I_SDDocumentProcessFlow, P_SalesContractProcessFlow30) and exposes 20 fields with key fields SalesContract, PrecedingDocument, PrecedingDocumentItem, PrecedingDocumentCategory, SubsequentDocument. It has 2 associations to related views. Part of development package ODATA_SD_CONTRACT.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_SDDocumentProcessFlow | _ProcessFlow | inner |
| P_SalesContractProcessFlow30 | P_SalesContractProcessFlow30 | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_SalesContract | vbeln_von |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_UnitOfMeasure | _BaseUnit | $projection.BaseUnit = _BaseUnit.UnitOfMeasure |
| [0..1] | I_Currency | _StatisticsCurrency | $projection.StatisticsCurrency = _StatisticsCurrency.Currency |
Annotations (11)
| 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 | PSLSCONPROCFL40 | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| EndUserText.label | Contract process flow level 4-0 | view |
Fields (20)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SalesContract | Level30 | SalesContract | |
| KEY | PrecedingDocument | I_SDDocumentProcessFlow | PrecedingDocument | |
| KEY | PrecedingDocumentItem | I_SDDocumentProcessFlow | PrecedingDocumentItem | |
| KEY | PrecedingDocumentCategory | I_SDDocumentProcessFlow | PrecedingDocumentCategory | |
| KEY | SubsequentDocument | I_SDDocumentProcessFlow | SubsequentDocument | |
| KEY | SubsequentDocumentItem | I_SDDocumentProcessFlow | SubsequentDocumentItem | |
| KEY | SubsequentDocumentCategory | I_SDDocumentProcessFlow | SubsequentDocumentCategory | |
| QuantityInBaseUnit | I_SDDocumentProcessFlow | QuantityInBaseUnit | ||
| BaseUnit | I_SDDocumentProcessFlow | BaseUnit | ||
| NetAmount | I_SDDocumentProcessFlow | NetAmount | ||
| StatisticsCurrency | I_SDDocumentProcessFlow | StatisticsCurrency | ||
| SDProcessStatusDesc | ||||
| FiscalYear | ||||
| CompanyCode | ||||
| MaterialDocumentYear | ||||
| SDDocumentCategoryName | ||||
| CreationDate | I_SDDocumentProcessFlow | CreationDate | ||
| CreationTime | I_SDDocumentProcessFlow | CreationTime | ||
| _BaseUnit | _BaseUnit | |||
| _StatisticsCurrency | _StatisticsCurrency |
@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: 'PSLSCONPROCFL40'
@AbapCatalog.preserveKey:true
@AbapCatalog.compiler.compareFilter:true
@EndUserText.label: 'Contract process flow level 4-0'
define view P_SalesContractProcessFlow40
with parameters P_SalesContract: vbeln_von
as select from P_SalesContractProcessFlow30(P_SalesContract: $parameters.P_SalesContract) as Level30
inner join I_SDDocumentProcessFlow as _ProcessFlow on Level30.SubsequentDocument = _ProcessFlow.PrecedingDocument
and Level30.SubsequentDocumentItem = _ProcessFlow.PrecedingDocumentItem
and Level30.SubsequentDocumentCategory = _ProcessFlow.PrecedingDocumentCategory
and (
_ProcessFlow.SubsequentDocumentCategory = 'M' or --> Invoice
_ProcessFlow.SubsequentDocumentCategory = 'O' or --> Credit Memo
_ProcessFlow.SubsequentDocumentCategory = 'P' or --> Debit Memo
_ProcessFlow.SubsequentDocumentCategory = 'I' or --> Order w/o charge
_ProcessFlow.SubsequentDocumentCategory = 'K' or --> Credit Memo Request
_ProcessFlow.SubsequentDocumentCategory = 'L' or --> Debit Memo Request
_ProcessFlow.SubsequentDocumentCategory = 'U' or --> Pro Forma Invoice
_ProcessFlow.SubsequentDocumentCategory = '5' or --> Intercompany Invoice
_ProcessFlow.SubsequentDocumentCategory = '6' or --> Intercompany Credit Memo
_ProcessFlow.SubsequentDocumentCategory = 'H' --> Customer Return
)
left outer to one join I_SDDocumentCategory as _SDDocumentCategory on _SDDocumentCategory.SDDocumentCategory = _ProcessFlow.SubsequentDocumentCategory
association [0..1] to I_UnitOfMeasure as _BaseUnit on $projection.BaseUnit = _BaseUnit.UnitOfMeasure
association [0..1] to I_Currency as _StatisticsCurrency on $projection.StatisticsCurrency = _StatisticsCurrency.Currency
{
key Level30.SalesContract,
key _ProcessFlow.PrecedingDocument,
key _ProcessFlow.PrecedingDocumentItem,
key _ProcessFlow.PrecedingDocumentCategory,
key _ProcessFlow.SubsequentDocument,
key _ProcessFlow.SubsequentDocumentItem,
key _ProcessFlow.SubsequentDocumentCategory,
@Semantics.quantity.unitOfMeasure: 'BaseUnit'
_ProcessFlow.QuantityInBaseUnit,
_ProcessFlow.BaseUnit,
@Semantics.amount.currencyCode: 'StatisticsCurrency'
_ProcessFlow.NetAmount,
@Semantics.currencyCode: true
_ProcessFlow.StatisticsCurrency,
cast( '' as status_bez ) as SDProcessStatusDesc,
cast( '0000' as gjahr ) as FiscalYear,
cast( '' as bukrs ) as CompanyCode,
cast( '0000' as mjahr ) as MaterialDocumentYear,
cast( ( case _ProcessFlow.SubsequentDocumentCategory
when 'C' then 'SalesOrder'
when 'J' then 'OutboundDelivery'
when 'H' then 'CustomerReturn'
when 'K' then 'CreditMemoRequest'
when 'L' then 'DebitMemoRequest'
when 'M' then 'BillingDocument'
when 'N' then 'BillingDocument'
when 'O' then 'BillingDocument'
when 'P' then 'BillingDocument'
when 'S' then 'BillingDocument'
end ) as bpf_sem_obj ) as SemanticObject,
_SDDocumentCategory._Text[1:Language=$session.system_language].SDDocumentCategoryName as SDDocumentCategoryName,
_ProcessFlow.CreationDate,
_ProcessFlow.CreationTime,
_BaseUnit,
_StatisticsCurrency
}
//where ( Level30.SubsequentDocumentCategory = 'M' or --> Invoice
// Level30.SubsequentDocumentCategory = '5' or --> Intercompany Invoice
// Level30.SubsequentDocumentCategory = 'O' or --> Credit Memo
// Level30.SubsequentDocumentCategory = '6' or --> Intercompany Credit Memo
// Level30.SubsequentDocumentCategory = 'P' ) --> Debit Memo
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