C_SlsAcctgGrssMargMonthlyOvw

DDL: C_SLSACCTGGRSSMARGMONTHLYOVW SQL: CSAGMMOVW Type: view CONSUMPTION Package: ODATA_SALES_ACCTG_OVERVIEW

Sales Accounting Monthly Gross Margin

C_SlsAcctgGrssMargMonthlyOvw is a Consumption CDS View that provides data about "Sales Accounting Monthly Gross Margin" in SAP S/4HANA. It reads from 1 data source (I_SlsAcctgGrssMargPerMatlOvw) and exposes 73 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem. It is exposed through 1 OData service (ASQL_F3228). Part of development package ODATA_SALES_ACCTG_OVERVIEW.

Data Sources (1)

SourceAliasJoin Type
I_SlsAcctgGrssMargPerMatlOvw I_SlsAcctgGrssMargPerMatlOvw from

Parameters (15)

NameTypeDefault
P_KeyDate datum
P_CompanyCode fis_bukrs
P_FiscalYearPeriod fis_jahrper_conv
P_DisplayCurrency vdm_v_display_currency
P_PlanningCategory fac_revvar_pln_category
P_FiscalYearComprnVariant fco_sls_acctg_ovw_year_var
P_FiscalPeriodComprnVariant fco_sls_acctg_ovw_period_var
P_FiscalYear fis_gjahr
P_FiscalPeriod fins_fiscalperiod
P_Interval1Year fis_gjahr
P_Interval2Year fis_gjahr
P_Interval1FromFiscalPeriod fis_period_from
P_Interval2FromFiscalPeriod fis_period_from
P_Interval1Type fac_revvar_interval_type
P_Interval2Type fac_revvar_interval_type

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName CSAGMMOVW view
AbapCatalog.preserveKey true view
EndUserText.label Sales Accounting Monthly Gross Margin view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.dataClass #MIXED view
VDM.viewType #CONSUMPTION view
Metadata.allowExtensions true view

OData Services (1)

ServiceBindingVersionContractRelease
ASQL_F3228 ASQL_F3228 C2 NOT_RELEASED

Fields (73)

KeyFieldSource TableSource FieldDescription
resultElementFiscalYear
resultElementFiscalPeriod
resultElementInterval1Year
resultElementInterval2Year
resultElementInterval1FromFiscalPeriod
resultElementInterval2FromFiscalPeriod
resultElementInterval1Type
resultElementInterval2Type
P_Interval1ToFiscalPeriodP_FiscalPeriod
P_Interval2ToFiscalPeriodP_FiscalPeriod
P_Interval2TypeP_Interval2TypekeyLedger
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 FinancialPlanningReqTransSqnc FinancialPlanningReqTransSqnc Request TSN
KEY FinancialPlanningDataPacket FinancialPlanningDataPacket Data packet number
KEY FinancialPlanningEntryItem FinancialPlanningEntryItem
KEY GLAccountHierarchy GLAccountHierarchy
KEY SemanticTag SemanticTag Semantic Tag
FiscalPeriod FiscalPeriod Tax period
DisplayCurrency
PlanningCategory PlanningCategory Plan Category
SalesOrganization SalesOrganization Sales Organization
Division Division Internal Division ID
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
Customer Customer Sold-to Party
CustomerGroup CustomerGroup Customer Group
MaterialGroup MaterialGroup Product Group
GLAccount GLAccount General Ledger
ProfitCenter ProfitCenter Profit Center
CustomerSupplierCountry Customer or Supplier Country/Region
CustomerSupplierIndustry CustomerSupplierIndustry Industry
RatioUnit RatioUnit Unit of Measure
GlobalCurrency GlobalCurrency GM Billing Element: Global Currency
trueasIntvl1GrossProfitAmtInGlobCrcy
trueasIntvl1RecgdRevnAmtInGlobCrcy
trueasIntvl2GrossProfitAmtInGlobCrcy
trueasIntvl2RecgdRevnAmtInGlobCrcy
ActualGrossMarginPercent
PlanGrossMarginPercent
PreviousYearGrossMarginPercent
ActualYTDGrossMarginPercent
PlanYTDGrossMarginPercent
PreviousYTDGrossMarginPercent
GrossMarginDifferenceRatio
FinancialAccountType FinancialAccountType Fin. Account Type
FunctionalArea FunctionalArea Sendr Fctl Area
BusinessArea BusinessArea Business Area
Segment Segment Segment number
ControllingArea ControllingArea Controlling Area
CostCenter CostCenter Cost Center
Plant Plant Valuation Area
ValuationArea ValuationArea Valuation Area
OrganizationDivision OrganizationDivision Org. Division
ServiceDocumentType ServiceDocumentType Transaction Type
AssetClass AssetClass Asset Class
PostingDate PostingDate Posting Date for GR
Supplier Supplier Supplier
SalesDocument SalesDocument SD Document
OrderID OrderID Order ID
AccountingDocumentType AccountingDocumentType Journal Entry Type
ServiceDocument ServiceDocument Transaction ID
_GLAccountInCompanyCode _GLAccountInCompanyCode
_Customer _Customer
_AccountingDocumentType _AccountingDocumentType
_Supplier _Supplier
_CurrentProfitCenter _CurrentProfitCenter
_CurrentCostCenter _CurrentCostCenter
_SalesDocument _SalesDocument
_Order _Order
_ServiceDocument _ServiceDocument

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 C_SlsAcctgGrssMargMonthlyOvw.
-- 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: CSAGMMOVW
-- Parameters: P_KeyDate : datum, P_CompanyCode : fis_bukrs, P_FiscalYearPeriod : fis_jahrper_conv, P_DisplayCurrency : vdm_v_display_currency, P_PlanningCategory : fac_revvar_pln_category, P_FiscalYearComprnVariant : fco_sls_acctg_ovw_year_var, P_FiscalPeriodComprnVariant : fco_sls_acctg_ovw_period_var, P_FiscalYear : fis_gjahr, P_FiscalPeriod : fins_fiscalperiod, P_Interval1Year : fis_gjahr, P_Interval2Year : fis_gjahr, P_Interval1FromFiscalPeriod : fis_period_from, P_Interval2FromFiscalPeriod : fis_period_from, P_Interval1Type : fac_revvar_interval_type, P_Interval2Type : fac_revvar_interval_type

CREATE VIEW C_SlsAcctgGrssMargMonthlyOvw AS
SELECT
  resultElement: 'FiscalYear' AS resultElementFiscalYear,
  resultElement: 'FiscalPeriod' AS resultElementFiscalPeriod,
  resultElement: 'Interval1Year' AS resultElementInterval1Year,
  resultElement: 'Interval2Year' AS resultElementInterval2Year,
  resultElement: 'Interval1FromFiscalPeriod' AS resultElementInterval1FromFiscalPeriod,
  resultElement: 'Interval2FromFiscalPeriod' AS resultElementInterval2FromFiscalPeriod,
  resultElement: 'Interval1Type' AS resultElementInterval1Type,
  resultElement: 'Interval2Type' AS resultElementInterval2Type,
  P_Interval1ToFiscalPeriod : :P_FiscalPeriod AS P_Interval1ToFiscalPeriodP_FiscalPeriod,
  P_Interval2ToFiscalPeriod : :P_FiscalPeriod AS P_Interval2ToFiscalPeriodP_FiscalPeriod,
  SourceLedger,
  CompanyCode,
  FiscalYear,
  AccountingDocument,
  LedgerGLLineItem,
  FinancialPlanningReqTransSqnc,
  FinancialPlanningDataPacket,
  FinancialPlanningEntryItem,
  GLAccountHierarchy,
  SemanticTag,
  FiscalPeriod,
  cast(:P_DisplayCurrency as vdm_v_display_currency) AS DisplayCurrency,
  PlanningCategory,
  SalesOrganization,
  Division,
  DistributionChannel,
  Customer,
  CustomerGroup,
  MaterialGroup,
  GLAccount,
  ProfitCenter,
  cast(CustomerSupplierCountry as fco_sls_acctg_ovw_country_name preserving type ) AS CustomerSupplierCountry,
  CustomerSupplierIndustry,
  RatioUnit,
  GlobalCurrency,
  currency_conversion( amount => Intvl1GrossProfitAmtInGlobCrcy, source_currency => GlobalCurrency, target_currency => :P_DisplayCurrency, exchange_rate_date => :P_KeyDate, exchange_rate_type => 'M', round => #CDSBoolean.true, decimal_shift => #CDSBoolean.true, decimal_shift_back => #CDSBoolean.true ) as Intvl1GrossProfitAmtInGlobCrcy AS trueasIntvl1GrossProfitAmtInGlobCrcy,
  currency_conversion( amount => Intvl1RecgdRevnAmtInGlobCrcy, source_currency => GlobalCurrency, target_currency => :P_DisplayCurrency, exchange_rate_date => :P_KeyDate, exchange_rate_type => 'M', round => #CDSBoolean.true, decimal_shift => #CDSBoolean.true, decimal_shift_back => #CDSBoolean.true ) as Intvl1RecgdRevnAmtInGlobCrcy AS trueasIntvl1RecgdRevnAmtInGlobCrcy,
  currency_conversion( amount => Intvl2GrossProfitAmtInGlobCrcy, source_currency => GlobalCurrency, target_currency => :P_DisplayCurrency, exchange_rate_date => :P_KeyDate, exchange_rate_type => 'M', round => #CDSBoolean.true, decimal_shift => #CDSBoolean.true, decimal_shift_back => #CDSBoolean.true ) as Intvl2GrossProfitAmtInGlobCrcy AS trueasIntvl2GrossProfitAmtInGlobCrcy,
  currency_conversion( amount => Intvl2RecgdRevnAmtInGlobCrcy, source_currency => GlobalCurrency, target_currency => :P_DisplayCurrency, exchange_rate_date => :P_KeyDate, exchange_rate_type => 'M', round => #CDSBoolean.true, decimal_shift => #CDSBoolean.true, decimal_shift_back => #CDSBoolean.true ) as Intvl2RecgdRevnAmtInGlobCrcy AS trueasIntvl2RecgdRevnAmtInGlobCrcy,
  cast(0 as fco_sls_acctg_ovw_actual_ru) AS ActualGrossMarginPercent,
  cast(0 as fco_sls_acctg_ovw_plan_ru) AS PlanGrossMarginPercent,
  cast(0 as fco_sls_acctg_ovw_prevyear_ru) AS PreviousYearGrossMarginPercent,
  cast(0 as abap.fltp) AS ActualYTDGrossMarginPercent,
  cast(0 as abap.fltp) AS PlanYTDGrossMarginPercent,
  cast(0 as abap.fltp) AS PreviousYTDGrossMarginPercent,
  cast(0 as fco_sls_acctg_ovw_difference) AS GrossMarginDifferenceRatio,
  FinancialAccountType,
  FunctionalArea,
  BusinessArea,
  Segment,
  ControllingArea,
  CostCenter,
  Plant,
  ValuationArea,
  OrganizationDivision,
  ServiceDocumentType,
  AssetClass,
  PostingDate,
  Supplier,
  SalesDocument,
  OrderID,
  AccountingDocumentType,
  ServiceDocument
FROM I_SlsAcctgGrssMargPerMatlOvw
;