P_SlsOrdFlfmtProcHierNode1

DDL: P_SLSORDFLFMTPROCHIERNODE1 SQL: PSDSOFPROCHRCND1 Type: view CONSUMPTION

P_SlsOrdFlfmtProcHierNode1 is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (P_SlsOrdFlfmtProcHierNode2, I_SalesOrderFlfmtIssueBasic) and exposes 97 fields with key fields SalesDocument, HierarchyNode, HierarchyNodeLevel, ParentNode, NodeType. It has 16 associations to related views.

Data Sources (2)

SourceAliasJoin Type
P_SlsOrdFlfmtProcHierNode2 Flfmt from
I_SalesOrderFlfmtIssueBasic Issue union_all

Associations (16)

CardinalityTargetAliasCondition
[0..1] I_Currency _TransactionCurrency $projection.TransactionCurrency = _TransactionCurrency.Currency
[0..1] I_SalesDocumentType _RootNodeDocumentSalesDocType $projection.RootNodeDocumentSalesDocType = _RootNodeDocumentSalesDocType.SalesDocumentType
[0..1] I_SalesDocumentType _SalesDocumentType $projection.SalesDocumentType = _SalesDocumentType.SalesDocumentType
[0..1] I_DeliveryDocumentType _DeliveryDocumentType $projection.DeliveryDocumentType = _DeliveryDocumentType.DeliveryDocumentType
[0..1] I_BillingDocumentType _BillingDocumentType $projection.BillingDocumentType = _BillingDocumentType.BillingDocumentType
[0..1] I_PurchasingDocumentType _PurchaseOrderType _PurchaseOrderType.PurchasingDocumentCategory = 'F' and $projection.PurchaseOrderType = _PurchaseOrderType.PurchasingDocumentType
[0..1] I_MfgOrderType _MfgOrderType $projection.ManufacturingOrderType = _MfgOrderType.ManufacturingOrderType
[0..1] I_SalesOrdOvrlDelivFlfmtSts _SalesOrdOvrlDelivFlfmtSts $projection.SalesOrdOvrlDelivFlfmtSts = _SalesOrdOvrlDelivFlfmtSts.SalesOrdOvrlDelivFlfmtSts
[0..1] I_SalesOrdOvrlInvcgFlfmtSts _SalesOrdOvrlInvcgFlfmtSts $projection.SalesOrdOvrlInvcgFlfmtSts = _SalesOrdOvrlInvcgFlfmtSts.SalesOrdOvrlInvcgFlfmtSts
[0..1] I_SalesDocFulfillmentStatus _SalesDocFulfillmentStatus $projection.SalesDocFulfillmentStatus = _SalesDocFulfillmentStatus.SalesDocFulfillmentStatus
[0..1] I_OutbDelivFulfillmentStatus _OutbDelivFulfillmentStatus $projection.OutbDelivFulfillmentStatus = _OutbDelivFulfillmentStatus.OutbDelivFulfillmentStatus
[0..1] I_AccountingTransferStatus _AccountingTransferStatus $projection.AccountingTransferStatus = _AccountingTransferStatus.AccountingTransferStatus
[0..1] I_PurchasingDocumentStatus _PurchasingDocumentStatus $projection.PurchasingDocumentStatus = _PurchasingDocumentStatus.PurchasingDocumentStatus
[0..1] I_SlsOrdReltdPurProcFlfmtSts _SlsOrdReltdPurProcFlfmtSts $projection.SlsOrdReltdPurProcFlfmtSts = _SlsOrdReltdPurProcFlfmtSts.SlsOrdReltdPurProcFlfmtSts
[0..1] I_SlsOrdReltdMfgProcFlfmtSts _SlsOrdReltdMfgProcFlfmtSts $projection.SlsOrdReltdMfgProcFlfmtSts = _SlsOrdReltdMfgProcFlfmtSts.SlsOrdReltdMfgProcFlfmtSts
[0..1] I_OverallSDProcessStatus _OverallSDProcessStatus $projection.OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus

Annotations (8)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
AbapCatalog.sqlViewName PSDSOFPROCHRCND1 view

Fields (97)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument SalesDocument
KEY HierarchyNode HierarchyNode
KEY HierarchyNodeLevel HierarchyNodeLevel
KEY ParentNode ParentNode
KEY NodeType NodeType
KEY DocumentCategory DocumentCategory
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
OrganizationDivision OrganizationDivision
RootNodeDocumentSalesDocType RootNodeDocumentSalesDocType
SalesDocumentType SalesDocumentType
TotalNetAmount TotalNetAmount
TransactionCurrency TransactionCurrency
DeliveryDocumentType DeliveryDocumentType
BillingDocumentType BillingDocumentType
PurchaseOrderType PurchaseOrderType
ManufacturingOrderType ManufacturingOrderType
OverallSDProcessStatus OverallSDProcessStatus
SalesOrdOvrlDelivFlfmtSts SalesOrdOvrlDelivFlfmtSts
SalesOrdOvrlInvcgFlfmtSts SalesOrdOvrlInvcgFlfmtSts
SalesDocFulfillmentStatus SalesDocFulfillmentStatus
OutbDelivFulfillmentStatus OutbDelivFulfillmentStatus
AccountingTransferStatus AccountingTransferStatus
PurchasingDocumentStatus PurchasingDocumentStatus
SlsOrdReltdPurProcFlfmtSts SlsOrdReltdPurProcFlfmtSts
SlsOrdReltdMfgProcFlfmtSts SlsOrdReltdMfgProcFlfmtSts
Issue
NumberOfItemsWithIssue
DueDays
DueDateStatus
_SalesOrganization _SalesOrganization
_DistributionChannel _DistributionChannel
_OrganizationDivision _OrganizationDivision
_RootNodeDocumentSalesDocType _RootNodeDocumentSalesDocType
_SalesDocumentType _SalesDocumentType
_TransactionCurrency _TransactionCurrency
_DeliveryDocumentType _DeliveryDocumentType
_BillingDocumentType _BillingDocumentType
_PurchaseOrderType _PurchaseOrderType
_MfgOrderType _MfgOrderType
_OverallSDProcessStatus _OverallSDProcessStatus
_SalesOrdOvrlDelivFlfmtSts _SalesOrdOvrlDelivFlfmtSts
_SalesOrdOvrlInvcgFlfmtSts _SalesOrdOvrlInvcgFlfmtSts
_SalesDocFulfillmentStatus _SalesDocFulfillmentStatus
_OutbDelivFulfillmentStatus _OutbDelivFulfillmentStatus
_AccountingTransferStatus _AccountingTransferStatus
_PurchasingDocumentStatus _PurchasingDocumentStatus
_SlsOrdReltdPurProcFlfmtSts _SlsOrdReltdPurProcFlfmtSts
_SlsOrdReltdMfgProcFlfmtSts _SlsOrdReltdMfgProcFlfmtSts
_Issue _Issue
KEY HierarchyNode
KEY NodeType
KEY DocumentCategory
SalesOrganization SalesOrganization
DistributionChannel DistributionChannel
OrganizationDivision OrganizationDivision
RootNodeDocumentSalesDocType
SalesDocumentType
TotalNetAmount
TransactionCurrency
DeliveryDocumentType
BillingDocumentType
PurchaseOrderType
ManufacturingOrderType
OverallSDProcessStatus
SalesOrdOvrlDelivFlfmtSts
SalesOrdOvrlInvcgFlfmtSts
SalesDocFulfillmentStatus
OutbDelivFulfillmentStatus
AccountingTransferStatus
PurchasingDocumentStatus
SlsOrdReltdPurProcFlfmtSts
SlsOrdReltdMfgProcFlfmtSts
Issue I_SalesOrderFlfmtIssueBasic Issue
DueDays I_SalesOrderFlfmtIssueBasic DueDays
DueDateStatus I_SalesOrderFlfmtIssueBasic DueDateStatus
_SalesOrganization _SalesOrganization
_DistributionChannel _DistributionChannel
_OrganizationDivision _OrganizationDivision
_RootNodeDocumentSalesDocType _RootNodeDocumentSalesDocType
_SalesDocumentType _SalesDocumentType
_TransactionCurrency _TransactionCurrency
_DeliveryDocumentType _DeliveryDocumentType
_BillingDocumentType _BillingDocumentType
_PurchaseOrderType _PurchaseOrderType
_MfgOrderType _MfgOrderType
_OverallSDProcessStatus _OverallSDProcessStatus
_SalesOrdOvrlDelivFlfmtSts _SalesOrdOvrlDelivFlfmtSts
_SalesOrdOvrlInvcgFlfmtSts _SalesOrdOvrlInvcgFlfmtSts
_SalesDocFulfillmentStatus _SalesDocFulfillmentStatus
_OutbDelivFulfillmentStatus _OutbDelivFulfillmentStatus
_AccountingTransferStatus _AccountingTransferStatus
_PurchasingDocumentStatus _PurchasingDocumentStatus
_SlsOrdReltdPurProcFlfmtSts _SlsOrdReltdPurProcFlfmtSts
_SlsOrdReltdMfgProcFlfmtSts _SlsOrdReltdMfgProcFlfmtSts
_Issue I_SalesOrderFlfmtIssueBasic _Issue
_DueDateStatus I_SalesOrderFlfmtIssueBasic _DueDateStatus
@ClientHandling.algorithm: #SESSION_VARIABLE 
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L

@VDM.private: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #CONSUMPTION

@AbapCatalog.sqlViewName: 'PSDSOFPROCHRCND1'

-- Union of Nodes for Sales Order Overall Fullfillment and Processes 
-- with Nodes for Issues

define view P_SlsOrdFlfmtProcHierNode1 
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
//Nodes for Sales Order Overall Fullfillment and Processes


as select from       P_SlsOrdFlfmtProcHierNode2 as Flfmt

association[0..1] to I_Issue                    as _Issue          on $projection.Issue         = _Issue.Issue 
association[0..1] to I_DueDateStatus            as _DueDateStatus  on $projection.DueDateStatus = _DueDateStatus.DueDateStatus

{
  //Key

  key SalesDocument,
  key HierarchyNode,
  key HierarchyNodeLevel,
  key ParentNode,
  key NodeType,
  key DocumentCategory,
  
  //Organization

  SalesOrganization,
  DistributionChannel,
  OrganizationDivision,
  
  //Category

  RootNodeDocumentSalesDocType,
  SalesDocumentType,
  
  //Sales

  TotalNetAmount,
  TransactionCurrency, 
  
  //Subsequent Category

  DeliveryDocumentType,
  BillingDocumentType,
  PurchaseOrderType,
  ManufacturingOrderType, 
  
  //Status

  OverallSDProcessStatus,

  //Sales Order Overall Delivery Fulfillment and Overall Invoicing Fulfillment Status

  SalesOrdOvrlDelivFlfmtSts,
  SalesOrdOvrlInvcgFlfmtSts,
  
  //Sales Document Fulfillment Status 

  SalesDocFulfillmentStatus,
  
  //Outbound Delivery Fulfillment Status

  OutbDelivFulfillmentStatus,
  
  //Accounting Transfer Status

  AccountingTransferStatus, 
  
  //Purchasing Document Status,

  PurchasingDocumentStatus,
  
  //Sales Order Related Purchase Process Fulfillment Status

  SlsOrdReltdPurProcFlfmtSts,
  
  //Sales Order Related Manfacturing Process Fulfillment Status

  SlsOrdReltdMfgProcFlfmtSts,
  
  //Issue

  cast('' as issue_sof ) as  Issue,

  //Number of items with issue

  cast( 0 as int2 )      as NumberOfItemsWithIssue,     
  
  //Issue due days 

  cast( 0 as due_days )  as DueDays, 
  
  //Issue due date status

  @ObjectModel.foreignKey.association: '_DueDateStatus'
  cast('' as due_date_status) as DueDateStatus, 

  //Associations

  _SalesOrganization,
  _DistributionChannel,
  _OrganizationDivision,
  
  _RootNodeDocumentSalesDocType,
  _SalesDocumentType,
  
  _TransactionCurrency, 
  
  _DeliveryDocumentType,
  _BillingDocumentType,
  _PurchaseOrderType,
  _MfgOrderType,
  
  _OverallSDProcessStatus,
  _SalesOrdOvrlDelivFlfmtSts,
  _SalesOrdOvrlInvcgFlfmtSts,
  _SalesDocFulfillmentStatus,
  _OutbDelivFulfillmentStatus,
  _AccountingTransferStatus,
  _PurchasingDocumentStatus,
  _SlsOrdReltdPurProcFlfmtSts,
  _SlsOrdReltdMfgProcFlfmtSts,
  
  _Issue,
  _DueDateStatus 
}
---------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
 // Nodes for Issues

union all 
 select from           I_SalesOrderFlfmtIssueBasic  as Issue

 association [0..1] to I_Currency                   as _TransactionCurrency           on $projection.TransactionCurrency               = _TransactionCurrency.Currency
 association [0..1] to I_SalesDocumentType          as _RootNodeDocumentSalesDocType  on $projection.RootNodeDocumentSalesDocType      = _RootNodeDocumentSalesDocType.SalesDocumentType
 association [0..1] to I_SalesDocumentType          as _SalesDocumentType             on $projection.SalesDocumentType                 = _SalesDocumentType.SalesDocumentType
 association [0..1] to I_DeliveryDocumentType       as _DeliveryDocumentType          on $projection.DeliveryDocumentType              = _DeliveryDocumentType.DeliveryDocumentType 
 association [0..1] to I_BillingDocumentType        as _BillingDocumentType           on $projection.BillingDocumentType               = _BillingDocumentType.BillingDocumentType                                      
 association [0..1] to I_PurchasingDocumentType     as _PurchaseOrderType             on _PurchaseOrderType.PurchasingDocumentCategory = 'F' 
                                                                                     and $projection.PurchaseOrderType                 = _PurchaseOrderType.PurchasingDocumentType 
 association [0..1] to I_MfgOrderType               as _MfgOrderType                  on $projection.ManufacturingOrderType            = _MfgOrderType.ManufacturingOrderType
 association [0..1] to I_SalesOrdOvrlDelivFlfmtSts  as _SalesOrdOvrlDelivFlfmtSts     on $projection.SalesOrdOvrlDelivFlfmtSts         = _SalesOrdOvrlDelivFlfmtSts.SalesOrdOvrlDelivFlfmtSts     
 association [0..1] to I_SalesOrdOvrlInvcgFlfmtSts  as _SalesOrdOvrlInvcgFlfmtSts     on $projection.SalesOrdOvrlInvcgFlfmtSts         = _SalesOrdOvrlInvcgFlfmtSts.SalesOrdOvrlInvcgFlfmtSts    
 association [0..1] to I_SalesDocFulfillmentStatus  as _SalesDocFulfillmentStatus     on $projection.SalesDocFulfillmentStatus         = _SalesDocFulfillmentStatus.SalesDocFulfillmentStatus 
 association [0..1] to I_OutbDelivFulfillmentStatus as _OutbDelivFulfillmentStatus    on $projection.OutbDelivFulfillmentStatus        = _OutbDelivFulfillmentStatus.OutbDelivFulfillmentStatus
 association [0..1] to I_AccountingTransferStatus   as _AccountingTransferStatus      on $projection.AccountingTransferStatus          = _AccountingTransferStatus.AccountingTransferStatus       
 association [0..1] to I_PurchasingDocumentStatus   as _PurchasingDocumentStatus      on $projection.PurchasingDocumentStatus          = _PurchasingDocumentStatus.PurchasingDocumentStatus                                                                   
 association [0..1] to I_SlsOrdReltdPurProcFlfmtSts as _SlsOrdReltdPurProcFlfmtSts    on $projection.SlsOrdReltdPurProcFlfmtSts        = _SlsOrdReltdPurProcFlfmtSts.SlsOrdReltdPurProcFlfmtSts
 association [0..1] to I_SlsOrdReltdMfgProcFlfmtSts as _SlsOrdReltdMfgProcFlfmtSts    on $projection.SlsOrdReltdMfgProcFlfmtSts        = _SlsOrdReltdMfgProcFlfmtSts.SlsOrdReltdMfgProcFlfmtSts
 association [0..1] to I_OverallSDProcessStatus     as _OverallSDProcessStatus        on $projection.OverallSDProcessStatus            = _OverallSDProcessStatus.OverallSDProcessStatus                    

{
  //key

  key SalesOrder                                              as SalesDocument,
  key cast( Issue            as dme_rootnode )                as HierarchyNode,
  key cast( 
       case Issue.IssueCategory 
         when '10_SO' then 2      
                     else 3
        end                  as int2 )                        as HierarchyNodeLevel,
  key cast(
       case 
        when DeliveryDocument   != '' then DeliveryDocument
        when BillingDocument    != '' then BillingDocument
        when PurchasingDocument != '' then PurchasingDocument          
        when ManufacturingOrder != '' then ManufacturingOrder       
                                     else  SalesOrder
        end                  as parnode )                     as ParentNode,
  key cast( Issue            as sls_ord_flfllmnt_node_type )  as NodeType,
  key cast( ''               as vbtypl )                      as DocumentCategory,
  
  //Organization

  SalesOrganization,
  DistributionChannel,
  OrganizationDivision,
  
  //Category

  @ObjectModel.foreignKey.association: '_RootNodeDocumentSalesDocType'
  cast( Issue.SalesOrderType as auart )                       as RootNodeDocumentSalesDocType,
  cast( ''                   as auart )                       as SalesDocumentType,
  
  //Sales

  @DefaultAggregation: #NONE
  @Semantics.amount.currencyCode: 'TransactionCurrency'
  cast ( 0                   as netwr_ak )                    as TotalNetAmount,
  @Semantics.currencyCode: true
  @ObjectModel.foreignKey.association: '_TransactionCurrency'
  cast ( ''                  as waerk )                       as TransactionCurrency,   
  
  //Subsequent Category

  cast( ''                   as lfart )                       as DeliveryDocumentType,
  cast( ''                   as fkart )                       as BillingDocumentType,
  cast( ''                   as esart )                       as PurchaseOrderType,
  cast( ''                   as manufacturingordertype )      as ManufacturingOrderType,    
  
  //Overall SD Process Status

  cast( ''                   as gbstk )                       as OverallSDProcessStatus,       
  
  //Sales Order Overall Delivery Fulfillment and Overall Invoicing Fulfillment Status

  cast( ''                   as salesordovrldelivflfmtsts )   as SalesOrdOvrlDelivFlfmtSts,
  cast( ''                   as salesordovrlinvcgflfmtsts )   as SalesOrdOvrlInvcgFlfmtSts,  
 
  //Sales Document Fulfillment Status 

  cast( ''                   as salesdocfulfillmentstatus )   as SalesDocFulfillmentStatus,
   
  //Outbound Delivery Fulfillment Status

  cast( ''                   as outbdelivfulfillmentstatus )  as OutbDelivFulfillmentStatus,  
  
  //Accounting Transfer Status

  cast( ''                   as rfbsk )                       as AccountingTransferStatus,
   
  //Purchasing Document Status

  cast( ''                   as mmpur_doc_status )            as PurchasingDocumentStatus, 
   
  //Sales Order Related Purchase Process Fulfillment Status

  cast( ''                   as slsordreltdpurprocflfmtsts )  as SlsOrdReltdPurProcFlfmtSts,
  
  //Sales Order Related Manfacturing Process Fulfillment Status

  cast( ''                   as slsordreltdmfgprocflfmtsts )  as SlsOrdReltdMfgProcFlfmtSts,  

  //Issue

  Issue.Issue,
   
  //Number of items with issue

  cast(
    case 
     when DeliveryDocument   != '' then NmbrOfItemsInDelivery
     when BillingDocument    != '' then 0
     when PurchasingDocument != '' then NmbrOfItemsInSupply          
     when ManufacturingOrder != '' then 0       
                                  else  NmbrOfItemsInOrder
     end                     as int2 )                        as NumberOfItemsWithIssue,    
  
  //Issue due days 

  Issue.DueDays,
  
  //Issue Due Date Status

  Issue.DueDateStatus,
  
  //Associations

  _SalesOrganization,
  _DistributionChannel,
  _OrganizationDivision,
  
  _RootNodeDocumentSalesDocType,
  _SalesDocumentType,
  
  _TransactionCurrency, 
  
  _DeliveryDocumentType,
  _BillingDocumentType,
  _PurchaseOrderType,
  _MfgOrderType,
  
  _OverallSDProcessStatus,
  _SalesOrdOvrlDelivFlfmtSts,
  _SalesOrdOvrlInvcgFlfmtSts,
  _SalesDocFulfillmentStatus,
  _OutbDelivFulfillmentStatus,
  _AccountingTransferStatus,
  _PurchasingDocumentStatus,
  _SlsOrdReltdPurProcFlfmtSts,
  _SlsOrdReltdMfgProcFlfmtSts,
  
  Issue._Issue,
  Issue._DueDateStatus  
 }
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_SALESORDERFLFMTISSUEBASIC",
"P_SLSORDFLFMTPROCHIERNODE2"
],
"ASSOCIATED":
[
"I_ACCOUNTINGTRANSFERSTATUS",
"I_BILLINGDOCUMENTTYPE",
"I_CURRENCY",
"I_DELIVERYDOCUMENTTYPE",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_DUEDATESTATUS",
"I_ISSUE",
"I_MFGORDERTYPE",
"I_OUTBDELIVFULFILLMENTSTATUS",
"I_OVERALLSDPROCESSSTATUS",
"I_PURCHASINGDOCUMENTSTATUS",
"I_PURCHASINGDOCUMENTTYPE",
"I_SALESDOCFULFILLMENTSTATUS",
"I_SALESDOCUMENTTYPE",
"I_SALESORDOVRLDELIVFLFMTSTS",
"I_SALESORDOVRLINVCGFLFMTSTS",
"I_SALESORGANIZATION",
"I_SLSORDRELTDMFGPROCFLFMTSTS",
"I_SLSORDRELTDPURPROCFLFMTSTS"
],
"BASE":
[
"P_SLSORDFLFMTPROCHIERNODE2"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/