P_GrossMarginUnion

DDL: P_GROSSMARGINUNION SQL: PGRSSMARGUNION Type: view COMPOSITE Package: ODATA_GROSSMARGIN

Gross Margin Union

P_GrossMarginUnion is a Composite CDS View that provides data about "Gross Margin Union" in SAP S/4HANA. It reads from 3 data sources (I_Ledger, I_PlanLineItemSemTag, I_GLAccountLineItemSemTag) and exposes 317 fields with key fields Ledger, SourceLedger, CompanyCode, FiscalYear, AccountingDocument. It has 2 associations to related views. Part of development package ODATA_GROSSMARGIN.

Data Sources (3)

SourceAliasJoin Type
I_Ledger _LeadingLedger inner
I_PlanLineItemSemTag _PlanLineItem union_all
I_GLAccountLineItemSemTag I_GLAccountLineItemSemTag from

Parameters (1)

NameTypeDefault
P_Ledger fins_ledger

Associations (2)

CardinalityTargetAliasCondition
[0..1] I_SalesOrder _SalesOrder $projection.SalesOrder = _SalesOrder.SalesOrder
[0..1] I_SalesOrderItem _SalesOrderItem $projection.SalesOrder = _SalesOrderItem.SalesOrder and $projection.SalesOrderItem = _SalesOrderItem.SalesOrderItem

Annotations (5)

NameValueLevelField
AbapCatalog.sqlViewName PGRSSMARGUNION view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.private true view

Fields (317)

KeyFieldSource TableSource FieldDescription
KEY Ledger Ledger Ledger
KEY SourceLedger SourceLedger Source Ledger
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument AccountingDocument Journal Entry
KEY LedgerGLLineItem LedgerGLLineItem Journal Entry Item
KEY GLAccountHierarchy GLAccountHierarchy
KEY SemanticTag SemanticTag Semantic Tag
KEY ValidityStartDate ValidityStartDate Validity Start Date
KEY ValidityEndDate ValidityEndDate ValidTo
KEY FinancialPlanningReqTransSqnc Request TSN
KEY FinancialPlanningDataPacket Data packet number
KEY FinancialPlanningEntryItem
DocumentDate DocumentDate Journal Entry Date
SalesOrganization SalesOrganization Sales Organization
CustomerGroup CustomerGroup Customer Group
Customer Customer Sold-to Party
FiscalQuarter FiscalQuarter
FiscalPeriod FiscalPeriod Tax period
CompanyCodeCurrency CompanyCodeCurrency Local Currency
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
MaterialGroup Product Group
ProfitCenter ProfitCenter Profit Center
ControllingArea ControllingArea Controlling Area
SalesDistrict SalesDistrict Sales District
Segment Segment Segment number
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
SoldMaterial SoldProduct Product Sold
BusinessTransactionType BusinessTransactionType Bus.transaction
BusinessArea BusinessArea Business Area
CostCenter CostCenter Cost Center
CustomerSupplierCountry CustomerSupplierCountry Customer or Supplier Country/Region
FiscalYearPeriod FiscalYearPeriod Period/Year
AmountInCompanyCodeCurrency AmountInCompanyCodeCurrency Local Crcy Amt
AmountInGlobalCurrency AmountInGlobalCurrency Amount in Global Currency
AccountingDocumentCategory AccountingDocumentCategory Journal Entry Category
GLAccount GLAccount General Ledger
PostingDate PostingDate Posting Date for GR
CreationDate CreationDate Time Stamp
ChartOfAccounts ChartOfAccounts Node Class
LedgerFiscalYear LedgerFiscalYear
FinancialTransactionType FinancialTransactionType Transact. Type
TransactionCurrency TransactionCurrency Transaction Currency
AmountInTransactionCurrency AmountInTransactionCurrency Pt Crcy Amt
DebitCreditCode DebitCreditCode Single-Character Flag
AssignmentReference AssignmentReference Assignment Reference
PostingKey PostingKey Posting Key
AccountingDocCreatedByUser AccountingDocCreatedByUser User which created overhead document
GLAccountType GLAccountType G/L Account Type
Plant Plant Valuation Area
FinancialAccountType FinancialAccountType Fin. Account Type
SpecialGLCode SpecialGLCode Special G/L Ind
ClearingDate ClearingDate Clearing Date
ClearingAccountingDocument ClearingAccountingDocument Clearing Journal Entry
BillingDocumentType BillingDocumentType Billing Type
OrganizationDivision OrganizationDivision Org. Division
CustomerSupplierIndustry CustomerSupplierIndustry Industry
BillToParty BillToParty Inv. Recipient
ShipToParty ShipToParty Ship-To Party (obsolete)
SourceReferenceDocumentType Ref. procedure
SourceReferenceDocument Reference Doc.
OperatingConcern Operating concern
TransactionTypeDetermination TransactionTypeDetermination Transaction Key
ControllingDebitCreditCode Dr/Cr ind. CO
AccountingDocumentType AccountingDocumentType Journal Entry Type
ReferenceDocumentType ReferenceDocumentType Reference Document Type
FiscalYearVariant FiscalYearVariant FY Variant
JrnlEntryItemObsoleteReason
RecognizedRevnAmtInCCCrcy RecognizedRevnAmtInCCCrcy
RecognizedRevnAmtInGlobCrcy RecognizedRevnAmtInGlobCrcy
CostAmountInCompanyCodeCrcy CostAmountInCompanyCodeCrcy
CostOfGoodsSoldAmtInGlobCrcy CostOfGoodsSoldAmtInGlobCrcy
RecognizedMarginAmtInCCCrcy RecognizedMarginAmtInCCCrcy
SalesDeductionAmountInGlobCrcy SalesDeductionAmountInGlobCrcy
SalesDeductionAmtInCoCodeCrcy SalesDeductionAmtInCoCodeCrcy
BilledRevenueAmtInGlobCrcy BilledRevenueAmtInGlobCrcy
BilledRevenueAmtInCoCodeCrcy BilledRevenueAmtInCoCodeCrcy
PlnRecognizedRevnAmtInCCCrcy
PlnRecgdRevenueAmtInGlobCrcy
PlnCostAmtInCompanyCodeCrcy
PlnCostOfGdsSoldAmtInGlobCrcy
PlnRecognizedMargAmtInCCCrcy
PlnRecognizedMargAmtInGlobCrcy
PlnSlsDeductionAmtInGlobCrcy
PlnSlsDeductionAmtInCCCrcy
PlnBilledRevenueAmtInGlobCrcy
PlnBilledRevenueAmtInCCCrcy
PlanningCategory Plan Category
PlanAmountInCompanyCodeCrcy Local Crcy Amt
PlanAmountInGlobalCurrency Amount in Global Currency
PlanAmountInTransactionCrcy Pt Crcy Amt
FreeDefinedCurrency1 FreeDefinedCurrency1 Freely Defined Currency 1
AmountInFreeDefinedCurrency1 AmountInFreeDefinedCurrency1 Amount in Freely Defined Currency 1
PlanAmountInFreeDefinedCrcy1 Amount in Freely Defined Currency 1
FreeDefinedCurrency2 FreeDefinedCurrency2 Freely Defined Currency 2
AmountInFreeDefinedCurrency2 AmountInFreeDefinedCurrency2 Amount in Freely Defined Currency 2
PlanAmountInFreeDefinedCrcy2 Amount in Freely Defined Currency 2
FreeDefinedCurrency3 FreeDefinedCurrency3 Freely Defined Currency 3
AmountInFreeDefinedCurrency3 AmountInFreeDefinedCurrency3 Amount in Freely Defined Currency 3
PlanAmountInFreeDefinedCrcy3 Amount in Freely Defined Currency 3
FreeDefinedCurrency4 FreeDefinedCurrency4 Freely Defined Currency 4
AmountInFreeDefinedCurrency4 AmountInFreeDefinedCurrency4 Amount in Freely Defined Currency 4
PlanAmountInFreeDefinedCrcy4 Amount in Freely Defined Currency 4
FreeDefinedCurrency5 FreeDefinedCurrency5 Freely Defined Currency 5
AmountInFreeDefinedCurrency5 AmountInFreeDefinedCurrency5 Amount in Freely Defined Currency 5
PlanAmountInFreeDefinedCrcy5 Amount in Freely Defined Currency 5
FreeDefinedCurrency6 FreeDefinedCurrency6 Freely Defined Currency 6
AmountInFreeDefinedCurrency6 AmountInFreeDefinedCurrency6 Amount in Freely Defined Currency 6
PlanAmountInFreeDefinedCrcy6 Amount in Freely Defined Currency 6
FreeDefinedCurrency7 FreeDefinedCurrency7 Freely Defined Currency 7
AmountInFreeDefinedCurrency7 AmountInFreeDefinedCurrency7 Amount in Freely Defined Currency 7
PlanAmountInFreeDefinedCrcy7 Amount in Freely Defined Currency 7
FreeDefinedCurrency8 FreeDefinedCurrency8 Freely Defined Currency 8
AmountInFreeDefinedCurrency8 AmountInFreeDefinedCurrency8 Amount in Freely Defined Currency 8
PlanAmountInFreeDefinedCrcy8 Amount in Freely Defined Currency 8
BaseUnit BaseUnit Unit of Measure
Quantity Quantity Value
IsSimulation
_FiscalYear _FiscalYear
_CompanyCodeCurrency _CompanyCodeCurrency
_GlobalCurrency _GlobalCurrency
_SalesOrganization _SalesOrganization
_Customer _Customer
_SalesDistrict _SalesDistrict
_Segment _Segment
_SalesOrder _SalesOrder
_SalesOrderItem _SalesOrderItem
_DistributionChannel _DistributionChannel
_BusinessArea _BusinessArea
_CostCenter _CostCenter
_ControllingArea _ControllingArea
_CustomerSupplierCountry _CustomerSupplierCountry
_CompanyCode _CompanyCode
_CustomerGroup _CustomerGroup
_SemanticTag _SemanticTag
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_ChartOfAccounts _ChartOfAccounts
_LedgerFiscalYear _LedgerFiscalYear
_TransactionCurrency _TransactionCurrency
_Plant _Plant
_BillingDocumentType _BillingDocumentType
_BillToParty _BillToParty
_ShipToParty _ShipToParty
_ControllingDebitCreditCode _ControllingDebitCreditCode
_FiscalYearVariant _FiscalYearVariant
_FiscalPeriodForVariant _FiscalPeriodForVariant
_GLAccountInCompanyCode _GLAccountInCompanyCode
P_LedgerasLedger
KEY SourceLedger Source Ledger
KEY CompanyCode CompanyCode Receiver Company Code
KEY FiscalYear FiscalYear G/L Fiscal Year
KEY AccountingDocument Journal Entry
KEY LedgerGLLineItem Journal Entry Item
KEY GLAccountHierarchy GLAccountHierarchy
KEY SemanticTag SemanticTag Semantic Tag
KEY ValidityStartDate ValidityStartDate Validity Start Date
KEY ValidityEndDate ValidityEndDate ValidTo
KEY FinancialPlanningReqTransSqnc FinancialPlanningReqTransSqnc Request TSN
KEY FinancialPlanningDataPacket FinancialPlanningDataPacket Data packet number
KEY FinancialPlanningEntryItem FinancialPlanningEntryItem
DocumentDate Journal Entry Date
SalesOrganization SalesOrganization Sales Organization
CustomerGroup CustomerGroup Customer Group
Customer Customer Sold-to Party
FiscalQuarter
FiscalPeriod FiscalPeriod Tax period
CompanyCodeCurrency CompanyCodeCurrency Local Currency
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
MaterialGroup MaterialGroup Product Group
ProfitCenter ProfitCenter Profit Center
ControllingArea ControllingArea Controlling Area
SalesDistrict SalesDistrict Sales District
Segment Segment Segment number
SalesOrder SalesOrder SD Document
SalesOrderItem SalesOrderItem Sales Order Item
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
SoldMaterial SoldMaterial Product Sold
BusinessTransactionType Bus.transaction
BusinessArea BusinessArea Business Area
CostCenter CostCenter Cost Center
CustomerSupplierCountry CustomerSupplierCountry Customer or Supplier Country/Region
FiscalYearPeriod FiscalYearPeriod Period/Year
AmountInCompanyCodeCurrency Local Crcy Amt
AmountInGlobalCurrency Amount in Global Currency
AccountingDocumentCategory Journal Entry Category
GLAccount GLAccount General Ledger
PostingDate Posting Date for GR
CreationDate Time Stamp
ChartOfAccounts ChartOfAccounts Node Class
LedgerFiscalYear LedgerFiscalYear
FinancialTransactionType Transact. Type
TransactionCurrency TransactionCurrency Transaction Currency
AmountInTransactionCurrency Pt Crcy Amt
DebitCreditCode Single-Character Flag
AssignmentReference Assignment Reference
PostingKey Posting Key
AccountingDocCreatedByUser User which created overhead document
GLAccountType G/L Account Type
Plant Plant Valuation Area
FinancialAccountType Fin. Account Type
SpecialGLCode Special G/L Ind
ClearingDate Clearing Date
ClearingAccountingDocument Clearing Journal Entry
BillingDocumentType BillingDocumentType Billing Type
OrganizationDivision Org. Division
CustomerSupplierIndustry CustomerSupplierIndustry Industry
BillToParty BillToParty Inv. Recipient
ShipToParty ShipToParty Ship-To Party (obsolete)
SourceReferenceDocumentType Ref. procedure
SourceReferenceDocument Reference Doc.
OperatingConcern Operating concern
TransactionTypeDetermination Transaction Key
ControllingDebitCreditCode Dr/Cr ind. CO
AccountingDocumentType Journal Entry Type
ReferenceDocumentType ReferenceDocumentType Reference Document Type
FiscalYearVariant FiscalYearVariant FY Variant
JrnlEntryItemObsoleteReason
ActlRecognizedRevnAmtInCCCrcy
ActlRecgdRevenueAmtInGlobCrcy
ActualCostAmtInCCCrcy
ActlCostOfGdsSoldAmtInGlobCrcy
ActlRecognizedMargAmtInCCCrcy
ActlRecgdMargAmtInGlobCrcy
ActlSlsDeductionAmtInGlobCrcy
ActlSlsDeductionAmtInCCCrcy
ActlBilledRevenueAmtInGlobCrcy
ActlBilledRevenueAmtInCCCrcy
PrdtdRecognizedRevnAmtInCCCrcy
PrdtdRecgdRevenueAmtInGlobCrcy
PrdtdCostAmtInCompanyCodeCrcy
PrdtdCostAmtInGlobCrcy
PrdtdRecognizedMargAmtInCCCrcy
PrdtdRecgdMargAmtInGlobCrcy
PrdtdSlsDeductionAmtInGlobCrcy
PrdtdSlsDeductionAmtInCCCrcy
PrdtdBilledRevnAmtInGlobCrcy
PrdtdBilledRevenueAmtInCCCrcy
RecognizedRevnAmtInCCCrcy
RecognizedRevnAmtInGlobCrcy
CostAmountInCompanyCodeCrcy
CostOfGoodsSoldAmtInGlobCrcy
RecognizedMarginAmtInCCCrcy
RecognizedMarginAmount
SalesDeductionAmountInGlobCrcy
SalesDeductionAmtInCoCodeCrcy
BilledRevenueAmtInGlobCrcy
BilledRevenueAmtInCoCodeCrcy
PlnRecognizedRevnAmtInCCCrcy PlnRecognizedRevnAmtInCCCrcy
PlnRecgdRevenueAmtInGlobCrcy PlnRecgdRevenueAmtInGlobCrcy
PlnCostAmtInCompanyCodeCrcy PlnCostAmtInCompanyCodeCrcy
PlnCostOfGdsSoldAmtInGlobCrcy PlnCostOfGdsSoldAmtInGlobCrcy
PlnRecognizedMargAmtInCCCrcy PlnRecognizedMargAmtInCCCrcy
PlnSlsDeductionAmtInGlobCrcy PlnSlsDeductionAmtInGlobCrcy
PlnSlsDeductionAmtInCCCrcy PlnSlsDeductionAmtInCCCrcy
PlnBilledRevenueAmtInGlobCrcy PlnBilledRevenueAmtInGlobCrcy
PlnBilledRevenueAmtInCCCrcy PlnBilledRevenueAmtInCCCrcy
PlanningCategory PlanningCategory Plan Category
PlanAmountInCompanyCodeCrcy AmountInCompanyCodeCurrency Local Crcy Amt
PlanAmountInGlobalCurrency AmountInGlobalCurrency Amount in Global Currency
PlanAmountInTransactionCrcy AmountInTransactionCurrency Pt Crcy Amt
FreeDefinedCurrency1 FreeDefinedCurrency1 Freely Defined Currency 1
AmountInFreeDefinedCurrency1 Amount in Freely Defined Currency 1
PlanAmountInFreeDefinedCrcy1 Amount in Freely Defined Currency 1
FreeDefinedCurrency2 FreeDefinedCurrency2 Freely Defined Currency 2
AmountInFreeDefinedCurrency2 Amount in Freely Defined Currency 2
PlanAmountInFreeDefinedCrcy2 Amount in Freely Defined Currency 2
FreeDefinedCurrency3 FreeDefinedCurrency3 Freely Defined Currency 3
AmountInFreeDefinedCurrency3 Amount in Freely Defined Currency 3
PlanAmountInFreeDefinedCrcy3 Amount in Freely Defined Currency 3
FreeDefinedCurrency4 FreeDefinedCurrency4 Freely Defined Currency 4
AmountInFreeDefinedCurrency4 Amount in Freely Defined Currency 4
PlanAmountInFreeDefinedCrcy4 Amount in Freely Defined Currency 4
FreeDefinedCurrency5 FreeDefinedCurrency5 Freely Defined Currency 5
AmountInFreeDefinedCurrency5 Amount in Freely Defined Currency 5
PlanAmountInFreeDefinedCrcy5 Amount in Freely Defined Currency 5
FreeDefinedCurrency6 FreeDefinedCurrency6 Freely Defined Currency 6
AmountInFreeDefinedCurrency6 Amount in Freely Defined Currency 6
PlanAmountInFreeDefinedCrcy6 Amount in Freely Defined Currency 6
FreeDefinedCurrency7 FreeDefinedCurrency7 Freely Defined Currency 7
AmountInFreeDefinedCurrency7 Amount in Freely Defined Currency 7
PlanAmountInFreeDefinedCrcy7 Amount in Freely Defined Currency 7
FreeDefinedCurrency8 FreeDefinedCurrency8 Freely Defined Currency 8
AmountInFreeDefinedCurrency8 Amount in Freely Defined Currency 8
PlanAmountInFreeDefinedCrcy8 Amount in Freely Defined Currency 8
BaseUnit Unit of Measure
Quantity Value
IsSimulation
_FiscalYear _FiscalYear
_CompanyCodeCurrency _CompanyCodeCurrency
_GlobalCurrency _GlobalCurrency
_SalesOrganization _SalesOrganization
_Customer _Customer
_SalesDistrict _SalesDistrict
_Segment _Segment
_SalesOrder _SalesOrder
_SalesOrderItem _SalesOrderItem
_DistributionChannel _DistributionChannel
_BusinessArea _BusinessArea
_CostCenter _CostCenter
_ControllingArea _ControllingArea
_CustomerSupplierCountry _CustomerSupplierCountry
_CompanyCode _CompanyCode
_CustomerGroup _CustomerGroup
_SemanticTag _SemanticTag
_GLAccountInChartOfAccounts _GLAccountInChartOfAccounts
_ChartOfAccounts _ChartOfAccounts
_LedgerFiscalYear _LedgerFiscalYear
_TransactionCurrency _TransactionCurrency
_Plant _Plant
_BillingDocumentType _BillingDocumentType
_BillToParty _BillToParty
_ShipToParty _ShipToParty
_ControllingDebitCreditCode _ControllingDebitCreditCode
_FiscalYearVariant _FiscalYearVariant
_FiscalPeriodForVariant _FiscalPeriodForVariant
_GLAccountInCompanyCode _GLAccountInCompanyCode
_CurrentProfitCenter _CurrentProfitCenter

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_GrossMarginUnion.
-- 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: PGRSSMARGUNION
-- Parameters: P_Ledger : fins_ledger

CREATE VIEW P_GrossMarginUnion AS
SELECT
  Ledger,
  SourceLedger,
  CompanyCode,
  FiscalYear,
  AccountingDocument,
  LedgerGLLineItem,
  GLAccountHierarchy,
  SemanticTag,
  ValidityStartDate,
  ValidityEndDate,
  cast(cast('00000000000000000000000' as abap.numc(23))as rspm_request_tsn) AS FinancialPlanningReqTransSqnc,
  cast(cast('000000' as abap.numc(6)) as rsdatapid) AS FinancialPlanningDataPacket,
  cast(0 as rsarecord) AS FinancialPlanningEntryItem,
  DocumentDate,
  SalesOrganization,
  CustomerGroup,
  Customer,
  FiscalQuarter,
  FiscalPeriod,
  CompanyCodeCurrency,
  GlobalCurrency,
  cast(SoldProductGroup as fins_matkl_pa) AS MaterialGroup,
  ProfitCenter,
  ControllingArea,
  SalesDistrict,
  Segment,
  DistributionChannel,
  SoldProduct AS SoldMaterial,
  BusinessTransactionType,
  BusinessArea,
  CostCenter,
  CustomerSupplierCountry,
  FiscalYearPeriod,
  AmountInCompanyCodeCurrency,
  AmountInGlobalCurrency,
  AccountingDocumentCategory,
  GLAccount,
  PostingDate,
  CreationDate,
  ChartOfAccounts,
  LedgerFiscalYear,
  FinancialTransactionType,
  TransactionCurrency,
  AmountInTransactionCurrency,
  DebitCreditCode,
  AssignmentReference,
  PostingKey,
  AccountingDocCreatedByUser,
  GLAccountType,
  Plant,
  FinancialAccountType,
  SpecialGLCode,
  ClearingDate,
  ClearingAccountingDocument,
  BillingDocumentType,
  OrganizationDivision,
  CustomerSupplierIndustry,
  BillToParty,
  ShipToParty,
  cast(SourceReferenceDocumentType as fins_src_awtyp) AS SourceReferenceDocumentType,
  cast(SourceReferenceDocument as fins_src_ref_doc) AS SourceReferenceDocument,
  cast(OperatingConcern as fins_erkrs preserving type) AS OperatingConcern,
  TransactionTypeDetermination,
  cast(ControllingDebitCreditCode as fins_debit_credit_indicator_co preserving type) AS ControllingDebitCreditCode,
  AccountingDocumentType,
  ReferenceDocumentType,
  FiscalYearVariant,
  cast(JrnlEntryItemObsoleteReason as fins_obs_reason) AS JrnlEntryItemObsoleteReason,
  RecognizedRevnAmtInCCCrcy,
  RecognizedRevnAmtInGlobCrcy,
  CostAmountInCompanyCodeCrcy,
  CostOfGoodsSoldAmtInGlobCrcy,
  RecognizedMarginAmtInCCCrcy,
  SalesDeductionAmountInGlobCrcy,
  SalesDeductionAmtInCoCodeCrcy,
  BilledRevenueAmtInGlobCrcy,
  BilledRevenueAmtInCoCodeCrcy,
  cast(0 as fis_reco_rev_hsl_p) AS PlnRecognizedRevnAmtInCCCrcy,
  cast(0 as fis_reco_rev_ksl_p) AS PlnRecgdRevenueAmtInGlobCrcy,
  cast(0 as fis_cost_hsl_p) AS PlnCostAmtInCompanyCodeCrcy,
  cast(0 as fis_cogs_ksl_p) AS PlnCostOfGdsSoldAmtInGlobCrcy,
  cast(0 as fis_rec_margin_hsl_p) AS PlnRecognizedMargAmtInCCCrcy,
  cast(0 as fis_rec_margin_hsl_p) AS PlnRecognizedMargAmtInGlobCrcy,
  cast(0 as fis_sales_ded_ksl_p) AS PlnSlsDeductionAmtInGlobCrcy,
  cast(0 as fis_res_masd_hsl_p) AS PlnSlsDeductionAmtInCCCrcy,
  cast(0 as fis_bill_rev_ksl_p) AS PlnBilledRevenueAmtInGlobCrcy,
  cast(0 as fis_bill_rev_hsl_p) AS PlnBilledRevenueAmtInCCCrcy,
  cast(cast( 'ACT01' as abap.char( 5 )) as fcom_category) AS PlanningCategory,
  cast(0 as fis_hsl) AS PlanAmountInCompanyCodeCrcy,
  cast(0 as fis_ksl) AS PlanAmountInGlobalCurrency,
  cast(0 as fis_wsl) AS PlanAmountInTransactionCrcy,
  FreeDefinedCurrency1,
  AmountInFreeDefinedCurrency1,
  cast(0 as fis_plan_osl) AS PlanAmountInFreeDefinedCrcy1,
  FreeDefinedCurrency2,
  AmountInFreeDefinedCurrency2,
  cast(0 as fis_plan_vsl) AS PlanAmountInFreeDefinedCrcy2,
  FreeDefinedCurrency3,
  AmountInFreeDefinedCurrency3,
  cast(0 as fis_plan_bsl) AS PlanAmountInFreeDefinedCrcy3,
  FreeDefinedCurrency4,
  AmountInFreeDefinedCurrency4,
  cast(0 as fis_plan_csl) AS PlanAmountInFreeDefinedCrcy4,
  FreeDefinedCurrency5,
  AmountInFreeDefinedCurrency5,
  cast(0 as fis_plan_dsl) AS PlanAmountInFreeDefinedCrcy5,
  FreeDefinedCurrency6,
  AmountInFreeDefinedCurrency6,
  cast(0 as fis_plan_esl) AS PlanAmountInFreeDefinedCrcy6,
  FreeDefinedCurrency7,
  AmountInFreeDefinedCurrency7,
  cast(0 as fis_plan_fsl) AS PlanAmountInFreeDefinedCrcy7,
  FreeDefinedCurrency8,
  AmountInFreeDefinedCurrency8,
  cast(0 as fis_plan_gsl) AS PlanAmountInFreeDefinedCrcy8,
  BaseUnit,
  Quantity,
  '' AS IsSimulation,
  SalesOrder,
  SalesOrderItem,
  cast(0 as fis_reco_rev_hsl_a) AS ActlRecognizedRevnAmtInCCCrcy,
  cast(0 as fis_reco_rev_ksl_a) AS ActlRecgdRevenueAmtInGlobCrcy,
  cast(0 as fis_cost_hsl_a) AS ActualCostAmtInCCCrcy,
  cast(0 as fis_cogs_ksl_a) AS ActlCostOfGdsSoldAmtInGlobCrcy,
  cast(0 as fis_rec_margin_hsl_a) AS ActlRecognizedMargAmtInCCCrcy,
  cast(0 as fis_rec_margin_hsl_a) AS ActlRecgdMargAmtInGlobCrcy,
  cast(0 as fis_sales_ded_ksl_a) AS ActlSlsDeductionAmtInGlobCrcy,
  cast(0 as fis_res_masd_hsl_a) AS ActlSlsDeductionAmtInCCCrcy,
  cast(0 as fis_bill_rev_ksl_a) AS ActlBilledRevenueAmtInGlobCrcy,
  cast(0 as fis_bill_rev_hsl_a) AS ActlBilledRevenueAmtInCCCrcy,
  cast(0 as fis_reco_rev_hsl_a) AS PrdtdRecognizedRevnAmtInCCCrcy,
  cast(0 as fis_reco_rev_ksl_a) AS PrdtdRecgdRevenueAmtInGlobCrcy,
  cast(0 as fis_cost_hsl_a) AS PrdtdCostAmtInCompanyCodeCrcy,
  cast(0 as fis_cogs_ksl_a) AS PrdtdCostAmtInGlobCrcy,
  cast(0 as fis_rec_margin_hsl_a) AS PrdtdRecognizedMargAmtInCCCrcy,
  cast(0 as fis_rec_margin_hsl_a) AS PrdtdRecgdMargAmtInGlobCrcy,
  cast(0 as fis_sales_ded_ksl_a) AS PrdtdSlsDeductionAmtInGlobCrcy,
  cast(0 as fis_res_masd_hsl_a) AS PrdtdSlsDeductionAmtInCCCrcy,
  cast(0 as fis_bill_rev_ksl_a) AS PrdtdBilledRevnAmtInGlobCrcy,
  cast(0 as fis_bill_rev_hsl_a) AS PrdtdBilledRevenueAmtInCCCrcy,
  cast(0 as fins_trr_recmargin) AS RecognizedMarginAmount
FROM I_GLAccountLineItemSemTag
INNER JOIN I_Ledger AS _LeadingLedger ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SalesOrder AS _SalesOrder ON SalesOrder = _SalesOrder.SalesOrder  -- association [0..1]
LEFT OUTER JOIN I_SalesOrderItem AS _SalesOrderItem ON SalesOrder = _SalesOrderItem.SalesOrder AND SalesOrderItem = _SalesOrderItem.SalesOrderItem  -- association [0..1]
-- UNION ALL with additional select branch(es): I_PlanLineItemSemTag
;