P_Fqmflow

DDL: P_FQMFLOW SQL: PFQMFLOW Type: view BASIC

P_Fqmflow is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (fqm_flow, P_FqmFlowTypeKeyFigure) and exposes 59 fields. It has 6 associations to related views.

Data Sources (2)

SourceAliasJoin Type
fqm_flow fqm_flow from
P_FqmFlowTypeKeyFigure P_FqmFlowTypeKeyFigure inner

Associations (6)

CardinalityTargetAliasCondition
[1..1] I_CompanyCode _CompanyCode $projection.CompanyCode = _CompanyCode.CompanyCode
[0..1] I_AccountingDocument _AccountingDocument $projection.OriginDocumentRl = _AccountingDocument.OriginalReferenceDocument and $projection.OriginApplication = _AccountingDocument.ReferenceDocumentType
[0..1] I_JournalEntry _JournalEntry $projection.CompanyCode = _JournalEntry.CompanyCode and $projection.ReferenceDocument = _JournalEntry.AccountingDocument and $projection.FiscalYear = _JournalEntry.FiscalYear
[0..1] I_JournalEntryItem _JournalEntryItem $projection.ReferenceDocument = _JournalEntryItem.ReferenceDocument and $projection.ReferenceDocumentContext = _JournalEntryItem.ReferenceDocumentContext and $projection.LedgerGLLineItem = _JournalEntryItem.LedgerGLLineItem
[0..1] I_OperationalAcctgDocItem _OperationalAcctgDocItem $projection.CompanyCode = _OperationalAcctgDocItem.CompanyCode and $projection.ReferenceDocument = _OperationalAcctgDocItem.AccountingDocument and $projection.FiscalYear = _OperationalAcctgDocItem.FiscalYear and $projection.AccountingDocumentItem = _OperationalAcctgDocItem.AccountingDocumentItem
[0..1] P_Fqmbankstatement _BankStatement $projection.BankStatementShortID = _BankStatement.BankStatementShortID and $projection.BankStatementItem = _BankStatement.BankStatementItem

Annotations (9)

NameValueLevelField
VDM.private true view
VDM.viewType #BASIC view
AbapCatalog.sqlViewName PFQMFLOW view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (59)

KeyFieldSource TableSource FieldDescription
ValidFrom fqm_flow valid_from Validity Start Time
ValidTo fqm_flow valid_to Validity End Time
CreatedByUser fqm_flow create_user User Name
LastChangedByUser fqm_flow last_update_user Fqm Last Update User
OriginSystem fqm_flow origin_system Logical system
OriginApplication fqm_flow origin_application Source Application
OriginDocument fqm_flow origin_document_id Source Doc. ID
OriginTransaction fqm_flow origin_transaction_id Source Trans. ID
OriginTransQualifier fqm_flow origin_trans_qualifier Trans. Qualifier
OriginFlowId fqm_flow origin_flow_id Source Flow ID
OriginSystemRl fqm_flow origin_system_rl Logical system
OriginApplicationRl fqm_flow origin_application_rl Source Application
OriginDocumentRl fqm_flow origin_document_id_rl Source Doc. ID
OriginTransactionRl fqm_flow origin_transaction_id_rl Source Trans. ID
OriginTransQualifierRl fqm_flow origin_trans_qualifier_rl Trans. Qualifier
OriginFlowIdRl fqm_flow origin_flow_id_rl Source Flow ID
CertaintyLevel fqm_flow certainty_level Certainty Level
TransactionDate fqm_flow transaction_date Value Date
FlowCategory fqm_flow flow_category Flow Category
FlowType fqm_flow flow_type Flow Type
PaymentMethodCode fqm_flow payment_method Pymt Meth.
GLAccount fqm_flow fi_account G/L Acct
Amount
Currency fqm_flow currency Valuation Crcy
ProductType fqm_flow trm_product_type Product Type
FinancialTransactionType fqm_flow trm_transaction_type Transactn Type
TrmActivityCategory fqm_flow trm_activity_category Activity Cat.
SecurityClass fqm_flow trm_security_id Security Class
TrmSecurityAccount fqm_flow trm_security_account Securities Acct
Portfolio fqm_flow trm_portfolio Portfolio
HouseBank fqm_flow house_bank House Bank
HouseBankAccount fqm_flow house_bank_account Account ID
BankAccountId fqm_flow bank_account_id Technical ID
CompanyCode fqm_flow company_code Company Code
Customer fqm_flow customer_number Customer
Vendor fqm_flow vendor_number Supplier
Partner fqm_flow partner With Partner
Material fqm_flow material Vehicle Model
BusinessArea fqm_flow business_area Business Area
ProfitCenter fqm_flow profit_center Profit Center
Project fqm_flow project WBS Element
CostCenter fqm_flow cost_center Posted Cost Center
PartnerCompany fqm_flow trading_partner Trading Partner
LiquidityItem fqm_flow liquidity_item Liquidity Item
Segment fqm_flow segment Segment number
PlanningLevel fqm_flow planning_level Planning Level
PlanningGroup fqm_flow planning_group Planning group
AssignedCompanyCode fqm_flow assigned_company_code Company Code
DocumentReferenceID fqm_flow internal_reference Internal Ref.
Characteristics fqm_flow characteristics Characteristics
AssignmentReference fqm_flow assignment Assignment
KeyFigure P_FqmFlowTypeKeyFigure KeyFigure Key Figure
origin_document_id114elseendasFiscalYear
_CompanyCode _CompanyCode
_AccountingDocument _AccountingDocument
_JournalEntry _JournalEntry
_JournalEntryItem _JournalEntryItem
_OperationalAcctgDocItem _OperationalAcctgDocItem
_BankStatement _BankStatement

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_Fqmflow.
-- 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: PFQMFLOW

CREATE VIEW P_Fqmflow AS
SELECT
  fqm_flow.valid_from AS ValidFrom,
  fqm_flow.valid_to AS ValidTo,
  fqm_flow.create_user AS CreatedByUser,
  fqm_flow.last_update_user AS LastChangedByUser,
  fqm_flow.origin_system AS OriginSystem,
  fqm_flow.origin_application AS OriginApplication,
  fqm_flow.origin_document_id AS OriginDocument,
  fqm_flow.origin_transaction_id AS OriginTransaction,
  fqm_flow.origin_trans_qualifier AS OriginTransQualifier,
  fqm_flow.origin_flow_id AS OriginFlowId,
  fqm_flow.origin_system_rl AS OriginSystemRl,
  fqm_flow.origin_application_rl AS OriginApplicationRl,
  fqm_flow.origin_document_id_rl AS OriginDocumentRl,
  fqm_flow.origin_transaction_id_rl AS OriginTransactionRl,
  fqm_flow.origin_trans_qualifier_rl AS OriginTransQualifierRl,
  fqm_flow.origin_flow_id_rl AS OriginFlowIdRl,
  fqm_flow.certainty_level AS CertaintyLevel,
  fqm_flow.transaction_date AS TransactionDate,
  fqm_flow.flow_category AS FlowCategory,
  fqm_flow.flow_type AS FlowType,
  fqm_flow.payment_method AS PaymentMethodCode,
  fqm_flow.fi_account AS GLAccount,
  sum(fqm_flow.amount) AS Amount,
  fqm_flow.currency AS Currency,
  fqm_flow.trm_product_type AS ProductType,
  fqm_flow.trm_transaction_type AS FinancialTransactionType,
  fqm_flow.trm_activity_category AS TrmActivityCategory,
  fqm_flow.trm_security_id AS SecurityClass,
  fqm_flow.trm_security_account AS TrmSecurityAccount,
  fqm_flow.trm_portfolio AS Portfolio,
  fqm_flow.house_bank AS HouseBank,
  fqm_flow.house_bank_account AS HouseBankAccount,
  fqm_flow.bank_account_id AS BankAccountId,
  fqm_flow.company_code AS CompanyCode,
  fqm_flow.customer_number AS Customer,
  fqm_flow.vendor_number AS Vendor,
  fqm_flow.partner AS Partner,
  fqm_flow.material AS Material,
  fqm_flow.business_area AS BusinessArea,
  fqm_flow.profit_center AS ProfitCenter,
  fqm_flow.project AS Project,
  fqm_flow.cost_center AS CostCenter,
  fqm_flow.trading_partner AS PartnerCompany,
  fqm_flow.liquidity_item AS LiquidityItem,
  fqm_flow.segment AS Segment,
  fqm_flow.planning_level AS PlanningLevel,
  fqm_flow.planning_group AS PlanningGroup,
  fqm_flow.assigned_company_code AS AssignedCompanyCode,
  fqm_flow.internal_reference AS DocumentReferenceID,
  fqm_flow.characteristics AS Characteristics,
  fqm_flow.assignment AS AssignmentReference,
  P_FqmFlowTypeKeyFigure.KeyFigure AS KeyFigure,
  case fqm_flow.origin_application when 'BKPF' then substring( fqm_flow.origin_document_id, 15, 4 ) when 'BKPFE' then substring( fqm_flow.origin_document_id, 15, 4 ) when 'BKPFF' then substring( fqm_flow.origin_document_id, 15, 4 ) when 'IBKPF' then substring( fqm_flow.origin_document_id, 15, 4 ) when 'BSEGV' then substring( fqm_flow.origin_document_id, 15, 4 ) when 'RMRP' then substring( fqm_flow.origin_document_id, 11, 4 ) else ' ' end as FiscalYear AS origin_document_id114elseendasFiscalYear
FROM fqm_flow
INNER JOIN P_FqmFlowTypeKeyFigure ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_CompanyCode AS _CompanyCode ON CompanyCode = _CompanyCode.CompanyCode  -- association [1..1]
LEFT OUTER JOIN I_AccountingDocument AS _AccountingDocument ON OriginDocumentRl = _AccountingDocument.OriginalReferenceDocument AND OriginApplication = _AccountingDocument.ReferenceDocumentType  -- association [0..1]
LEFT OUTER JOIN I_JournalEntry AS _JournalEntry ON CompanyCode = _JournalEntry.CompanyCode AND ReferenceDocument = _JournalEntry.AccountingDocument AND FiscalYear = _JournalEntry.FiscalYear  -- association [0..1]
LEFT OUTER JOIN I_JournalEntryItem AS _JournalEntryItem ON ReferenceDocument = _JournalEntryItem.ReferenceDocument AND ReferenceDocumentContext = _JournalEntryItem.ReferenceDocumentContext AND LedgerGLLineItem = _JournalEntryItem.LedgerGLLineItem  -- association [0..1]
LEFT OUTER JOIN I_OperationalAcctgDocItem AS _OperationalAcctgDocItem ON CompanyCode = _OperationalAcctgDocItem.CompanyCode AND ReferenceDocument = _OperationalAcctgDocItem.AccountingDocument AND FiscalYear = _OperationalAcctgDocItem.FiscalYear AND AccountingDocumentItem = _OperationalAcctgDocItem.AccountingDocumentItem  -- association [0..1]
LEFT OUTER JOIN P_Fqmbankstatement AS _BankStatement ON BankStatementShortID = _BankStatement.BankStatementShortID AND BankStatementItem = _BankStatement.BankStatementItem  -- association [0..1]
;