P_ARProcessFlowSalesDoc

DDL: P_ARPROCESSFLOWSALESDOC SQL: PARPROCFLOWSDDOC Type: view CONSUMPTION Package: ODATA_PROCESS_FLOW_AR

Sales Document details for AR process flow

P_ARProcessFlowSalesDoc is a Consumption CDS View that provides data about "Sales Document details for AR process flow" in SAP S/4HANA. It reads from 1 data source (I_SalesDocument) and exposes 35 fields with key field SalesDocument. It has 2 associations to related views. Part of development package ODATA_PROCESS_FLOW_AR.

Data Sources (1)

SourceAliasJoin Type
I_SalesDocument I_SalesDocument from

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_UserContactCard _UserContactCard _UserContactCard.ContactCardID = $projection.CreatedByUser
[0..1] P_ARProcFlwSDDocumentPartner _SDDocumentPartner $projection.SalesDocument = _SDDocumentPartner.SDDocument and _SDDocumentPartner.PartnerFunction = 'WE'

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PARPROCFLOWSDDOC view
VDM.viewType #CONSUMPTION view
VDM.private true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Sales Document details for AR process flow view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.personalData.blocking #REQUIRED view

Fields (35)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument SalesDocument
SalesDocumentDate SalesDocumentDate
SalesDocumentType SalesDocumentType
SalesDocumentTypeName
OverallSDProcessStatus OverallSDProcessStatus
OverallSDProcessStatusDesc
TotalNetAmount TotalNetAmount
TransactionCurrency TransactionCurrency
SoldToParty SoldToParty
CustomerName _SoldToParty CustomerName
CustomerFullName _SoldToParty CustomerFullName
ShipToParty _SDDocumentPartner Customer
ShipToPartyName _SDDocumentPartner CustomerName
PurchaseOrderByCustomer PurchaseOrderByCustomer
SalesOrganization SalesOrganization
SalesOrganizationName
DistributionChannel DistributionChannel
DistributionChannelName
OrganizationDivision OrganizationDivision
DivisionName
DivisionName1astxt_vtrberasSalesAreaDesc
CustomerPaymentTerms CustomerPaymentTerms
CustomerPaymentTermsName
CreatedByUser I_SalesDocument CreatedByUser
FullName _UserContactCard FullName
CreationDate I_SalesDocument CreationDate
CreationTime CreationTime
SalesOffice SalesOffice
SalesGroup SalesGroup
CustomerPurchaseOrderDate CustomerPurchaseOrderDate
_Item _Item
_ShipToParty _SDDocumentPartner _ShipToParty
_SoldToParty _SoldToParty
_TransactionCurrency _TransactionCurrency
_UserContactCard _UserContactCard
@AbapCatalog.sqlViewName: 'PARPROCFLOWSDDOC'
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations:  [ '_UserContactCard'] 
@EndUserText.label: 'Sales Document details for AR process flow'
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass:  #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ClientHandling.algorithm: #SESSION_VARIABLE
@AccessControl.personalData.blocking: #REQUIRED
define view P_ARProcessFlowSalesDoc
  as
  
select from I_SalesDocument

  association [1..1] to I_UserContactCard         as _UserContactCard on  _UserContactCard.ContactCardID = $projection.CreatedByUser
  association [0..1] to P_ARProcFlwSDDocumentPartner as _SDDocumentPartner    on  $projection.SalesDocument = _SDDocumentPartner.SDDocument
                                                                              and _SDDocumentPartner.PartnerFunction = 'WE' 

{
  key SalesDocument,
      
      SalesDocumentDate,
      
      SalesDocumentType,
      _SalesDocumentType._Text[1:Language = $session.system_language].SalesDocumentTypeName,
      
      OverallSDProcessStatus,
      _OverallSDProcessStatus._Text[1:Language = $session.system_language].OverallSDProcessStatusDesc,
      
      TotalNetAmount,
      
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_TransactionCurrency'       
      TransactionCurrency,
      
      SoldToParty,
      _SoldToParty.CustomerName,
      _SoldToParty.CustomerFullName,
      _SDDocumentPartner.Customer as ShipToParty,
      _SDDocumentPartner.CustomerName as ShipToPartyName,
       
      PurchaseOrderByCustomer,
      
      SalesOrganization,
      _SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName,
      DistributionChannel,
      _DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName,
      OrganizationDivision,
      _OrganizationDivision._Text[1:Language = $session.system_language].DivisionName,
      cast( 
        concat(
        concat( 
        concat(
        concat(
        SalesOrganization, 
        '/'), 
         DistributionChannel), 
         '/'), 
         OrganizationDivision)                                                                       as txt_vtrber ) as SalesArea,
         
      cast( 
        concat_with_space(
        concat(
        concat_with_space(
        concat(
        _SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName, 
        ','), 
        cast(_DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName as vtxtk), 1), 
        ','),  
        _OrganizationDivision._Text[1:Language = $session.system_language].DivisionName, 1)            as txt_vtrber ) as SalesAreaDesc,
         
      
      CustomerPaymentTerms,
      _CustomerPaymentTerms._Text[1:Language = $session.system_language].CustomerPaymentTermsName,
      
      I_SalesDocument.CreatedByUser,
      _UserContactCard.FullName,
      I_SalesDocument.CreationDate,
      CreationTime,
      
      SalesOffice,
      SalesGroup,
      CustomerPurchaseOrderDate,
            
      _Item,
      _SDDocumentPartner._ShipToParty,
      _SoldToParty,
      _TransactionCurrency,
      _UserContactCard

}
where
  OvrlItmGeneralIncompletionSts <> ''
  and
  (   
     // Sales Order categories: 

     SDDocumentCategory = 'C' //Order 

  or SDDocumentCategory = 'H' //Returns 

  or SDDocumentCategory = 'I' //Order Without Charge

  or SDDocumentCategory = 'K' //Credit Memo Request

  or SDDocumentCategory = 'L' //Debit Memo Request

  or SDDocumentCategory = 'G' //Contract

  )