P_ARProcessFlowSalesDoc

DDL: P_ARPROCESSFLOWSALESDOC SQL: PARPROCFLOWSDDOC Type: view CONSUMPTION

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.

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 SD Document
SalesDocumentDate SalesDocumentDate Document Date
SalesDocumentType SalesDocumentType Sales Doc. Type
SalesDocumentTypeName
OverallSDProcessStatus OverallSDProcessStatus
OverallSDProcessStatusDesc
TotalNetAmount TotalNetAmount Total Net Amount
TransactionCurrency TransactionCurrency Transaction Currency
SoldToParty SoldToParty Sold-to Party
CustomerName _SoldToParty CustomerName Name of Customer
CustomerFullName _SoldToParty CustomerFullName Customer Name
ShipToParty _SDDocumentPartner Customer Sold-to Party
ShipToPartyName _SDDocumentPartner CustomerName Name of Customer
PurchaseOrderByCustomer PurchaseOrderByCustomer Purchase Order Number
SalesOrganization SalesOrganization Sales Organization
SalesOrganizationName
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
DistributionChannelName
OrganizationDivision OrganizationDivision Org. Division
DivisionName
DivisionName1astxt_vtrberasSalesAreaDesc
CustomerPaymentTerms CustomerPaymentTerms Pyt Terms
CustomerPaymentTermsName
CreatedByUser I_SalesDocument CreatedByUser User Name
FullName _UserContactCard FullName Name
CreationDate I_SalesDocument CreationDate Time Stamp
CreationTime CreationTime Time of Change
SalesOffice SalesOffice Sales Office
SalesGroup SalesGroup Sales Group
CustomerPurchaseOrderDate CustomerPurchaseOrderDate Purchase Order Date
_Item _Item
_ShipToParty _SDDocumentPartner _ShipToParty
_SoldToParty _SoldToParty
_TransactionCurrency _TransactionCurrency
_UserContactCard _UserContactCard

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view P_ARProcessFlowSalesDoc.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: PARPROCFLOWSDDOC

CREATE VIEW P_ARProcessFlowSalesDoc AS
SELECT
  SalesDocument,
  SalesDocumentDate,
  SalesDocumentType,
  _SalesDocumentType._Text[1:Language = $session.system_language].SalesDocumentTypeName AS SalesDocumentTypeName,
  OverallSDProcessStatus,
  _OverallSDProcessStatus._Text[1:Language = $session.system_language].OverallSDProcessStatusDesc AS OverallSDProcessStatusDesc,
  TotalNetAmount,
  TransactionCurrency,
  SoldToParty,
  _SoldToParty.CustomerName AS CustomerName,
  _SoldToParty.CustomerFullName AS CustomerFullName,
  _SDDocumentPartner.Customer AS ShipToParty,
  _SDDocumentPartner.CustomerName AS ShipToPartyName,
  PurchaseOrderByCustomer,
  SalesOrganization,
  _SalesOrganization._Text[1:Language = $session.system_language].SalesOrganizationName AS SalesOrganizationName,
  DistributionChannel,
  _DistributionChannel._Text[1:Language = $session.system_language].DistributionChannelName AS DistributionChannelName,
  OrganizationDivision,
  _OrganizationDivision._Text[1:Language = $session.system_language].DivisionName AS DivisionName,
  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 AS DivisionName1astxt_vtrberasSalesAreaDesc,
  CustomerPaymentTerms,
  _CustomerPaymentTerms._Text[1:Language = $session.system_language].CustomerPaymentTermsName AS CustomerPaymentTermsName,
  I_SalesDocument.CreatedByUser AS CreatedByUser,
  _UserContactCard.FullName AS FullName,
  I_SalesDocument.CreationDate AS CreationDate,
  CreationTime,
  SalesOffice,
  SalesGroup,
  CustomerPurchaseOrderDate,
  _SDDocumentPartner._ShipToParty AS _ShipToParty
FROM I_SalesDocument
LEFT OUTER JOIN I_UserContactCard AS _UserContactCard ON _UserContactCard.ContactCardID = CreatedByUser  -- association [1..1]
LEFT OUTER JOIN P_ARProcFlwSDDocumentPartner AS _SDDocumentPartner ON SalesDocument = _SDDocumentPartner.SDDocument AND _SDDocumentPartner.PartnerFunction = 'WE'  -- association [0..1]
;