P_ARProcessFlowBillingDoc

DDL: P_ARPROCESSFLOWBILLINGDOC SQL: PARPROCFLOWBLDOC Type: view CONSUMPTION

Billing Doc details for AR Process Flow

P_ARProcessFlowBillingDoc is a Consumption CDS View that provides data about "Billing Doc details for AR Process Flow" in SAP S/4HANA. It reads from 3 data sources (I_SDDocumentPartner, I_SDDocumentPartner, I_BillingDocument) and exposes 38 fields with key field BillingDocument. It has 3 associations to related views.

Data Sources (3)

SourceAliasJoin Type
I_SDDocumentPartner _BillTo left_outer
I_SDDocumentPartner _ShipTo left_outer
I_BillingDocument I_BillingDocument from

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_UserContactCard _UserContactCard _UserContactCard.ContactCardID = $projection.CreatedByUser
[0..1] I_Customer _ShipToParty $projection.ShipToParty = _ShipToParty.Customer
[0..1] I_Customer _BillToParty $projection.BillToParty = _BillToParty.Customer

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PARPROCFLOWBLDOC view
VDM.viewType #CONSUMPTION view
VDM.private true view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Billing Doc 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 (38)

KeyFieldSource TableSource FieldDescription
KEY BillingDocument BillingDocument
BillingDocumentType BillingDocumentType
BillingDocumentTypeName
SoldToParty SoldToParty
CustomerName _SoldToParty CustomerName
ShipToParty I_SDDocumentPartner Customer
ShipToPartyName _ShipToParty CustomerName
PayerParty PayerParty
PayerPartyName _PayerParty CustomerName
BillToParty I_SDDocumentPartner Customer
BillToPartyName _BillToParty CustomerName
TaxAmount TotalTaxAmount
TotalGrossAmount
TotalNetAmount TotalNetAmount
TransactionCurrency TransactionCurrency
BillingDocumentDate BillingDocumentDate
OverallSDProcessStatus OverallSDProcessStatus
OverallSDProcessStatusDesc
SalesOrganization SalesOrganization
SalesOrganizationName
DistributionChannel DistributionChannel
DistributionChannelName
Division Division
DivisionName
DivisionName1astxt_vtrberasSalesAreaDesc
CustomerPaymentTerms CustomerPaymentTerms
CustomerPaymentTermsName
CreatedByUser I_BillingDocument CreatedByUser
FullName _UserContactCard FullName
CreationDate I_BillingDocument CreationDate
CreationTime CreationTime
_Item _Item
_SoldToParty _SoldToParty
_PayerParty _PayerParty
_ShipToParty _ShipToParty
_BillToParty _BillToParty
_TransactionCurrency _TransactionCurrency
_UserContactCard _UserContactCard
@AbapCatalog.sqlViewName: 'PARPROCFLOWBLDOC'
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.privilegedAssociations:  [ '_UserContactCard'] 
@EndUserText.label: 'Billing Doc 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_ARProcessFlowBillingDoc
  as
  
select from I_BillingDocument

  left outer join I_SDDocumentPartner as _ShipTo        on  BillingDocument = _ShipTo.SDDocument  
                                                        and _ShipTo.PartnerFunction = 'WE'
//  left outer join I_Customer          as _ShipToParty   on _ShipToParty.Customer = _ShipTo.Customer

 
  left outer join I_SDDocumentPartner as _BillTo        on  BillingDocument = _BillTo.SDDocument  
                                                        and _BillTo.PartnerFunction = 'RE'
//  left outer join I_Customer          as _BillToParty   on _BillToParty.Customer = _BillTo.Customer


  association [1..1] to I_UserContactCard  as _UserContactCard on  _UserContactCard.ContactCardID = $projection.CreatedByUser
  
  association [0..1] to I_Customer         as _ShipToParty     on  $projection.ShipToParty = _ShipToParty.Customer
  association [0..1] to I_Customer         as _BillToParty     on  $projection.BillToParty = _BillToParty.Customer

{
  key BillingDocument,
      
      BillingDocumentType,
      _BillingDocumentType._Text[1:Language = $session.system_language].BillingDocumentTypeName,
      
      SoldToParty,
      _SoldToParty.CustomerName,
      
      _ShipTo.Customer                                        as ShipToParty,
      _ShipToParty.CustomerName                               as ShipToPartyName,   
      
      PayerParty,
      _PayerParty.CustomerName                                as PayerPartyName,
      
      _BillTo.Customer                                        as BillToParty,
      _BillToParty.CustomerName                               as BillToPartyName,
      
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      TotalTaxAmount as TaxAmount,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      (TotalTaxAmount + TotalNetAmount) as TotalGrossAmount,
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      TotalNetAmount,
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_TransactionCurrency'     
      TransactionCurrency,
            
      BillingDocumentDate,
            
      OverallSDProcessStatus,
      _OverallSDProcessStatus._Text[1:Language = $session.system_language].OverallSDProcessStatusDesc,
      
      SalesOrganization,
      _SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName,
      DistributionChannel,
      _DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName,
      Division,
      _Division._Text[1:Language = $session.system_language].DivisionName,
      cast( 
        concat(
        concat( 
        concat(
        concat(
        SalesOrganization, 
        '/'), 
         DistributionChannel), 
         '/'), 
         Division)                                                                       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), 
        ','),  
        _Division._Text[1:Language = $session.system_language].DivisionName, 1)            as txt_vtrber ) as SalesAreaDesc,
         
      
      CustomerPaymentTerms,
      _CustomerPaymentTerms._Text[1:Language = $session.system_language].CustomerPaymentTermsName,
      
      I_BillingDocument.CreatedByUser,
      _UserContactCard.FullName,
      
      I_BillingDocument.CreationDate,
      CreationTime,
      _Item,
      _SoldToParty,
      _PayerParty,
      _ShipToParty,
      _BillToParty,
      _TransactionCurrency,
      _UserContactCard

}