C_SlsAcctgGrssMargPerMatlOvw
Gross Margin per Material card
C_SlsAcctgGrssMargPerMatlOvw is a Consumption CDS View that provides data about "Gross Margin per Material card" in SAP S/4HANA. It reads from 1 data source (I_SlsAcctgGrssMargPerMatlOvw) and exposes 85 fields with key fields SourceLedger, CompanyCode, FiscalYear, AccountingDocument, LedgerGLLineItem.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_SlsAcctgGrssMargPerMatlOvw | I_SlsAcctgGrssMargPerMatlOvw | from |
Parameters (15)
| Name | Type | Default |
|---|---|---|
| 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 (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CSAGMPMOVW | view | |
| EndUserText.label | Gross Margin per Material card | 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 |
Fields (85)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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 | |
| DisplayCurrency | ||||
| FiscalPeriod | FiscalPeriod | Tax period | ||
| PlanningCategory | PlanningCategory | Plan Category | ||
| BaseUnit | BaseUnit | Unit of Measure | ||
| BaseUnitName | BaseUnitName | |||
| LedgerName | LedgerName | Ledger Name | ||
| CompanyCodeName | CompanyCodeName | Company Name | ||
| CompanyCodeCurrency | CompanyCodeCurrency | Local Currency | ||
| Country | Country | Venue: Ctry/Reg | ||
| CountryName | CountryName | Country | ||
| SalesOrganization | SalesOrganization | Sales Organization | ||
| SalesOrganizationName | SalesOrganizationName | Sales Organization Description | ||
| Division | Division | Internal Division ID | ||
| DivisionName | DivisionName | Division Description | ||
| DistributionChannel | DistributionChannel | RefDistCh-Cust/Mat. | ||
| DistributionChannelName | DistributionChannelName | |||
| Customer | Customer | Sold-to Party | ||
| CustomerName | CustomerName | Name of Customer | ||
| Material | Vehicle Model | |||
| MaterialName | MaterialName | Material Description | ||
| MaterialGroup | MaterialGroup | Product Group | ||
| MaterialGroupName | MaterialGroupName | prod Grp Desc. | ||
| CustomerGroup | CustomerGroup | Customer 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 | ||||
| PlanGrossMarginPercent | ||||
| ActualGrossMarginPercent | ||||
| PreviousYearGrossMarginPercent | ||||
| GrossMarginDifferenceRatio | ||||
| AverageGrossMarginPercent | ||||
| 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_SlsAcctgGrssMargPerMatlOvw.
-- 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: CSAGMPMOVW
-- 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_SlsAcctgGrssMargPerMatlOvw 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,
cast(:P_DisplayCurrency as vdm_v_display_currency) AS DisplayCurrency,
FiscalPeriod,
PlanningCategory,
BaseUnit,
BaseUnitName,
LedgerName,
CompanyCodeName,
CompanyCodeCurrency,
Country,
CountryName,
SalesOrganization,
SalesOrganizationName,
Division,
DivisionName,
DistributionChannel,
DistributionChannelName,
Customer,
CustomerName,
cast( Material as fco_sls_acctg_ovw_matnrname50 ) AS Material,
MaterialName,
MaterialGroup,
MaterialGroupName,
CustomerGroup,
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.0 as fco_sls_acctg_ovw_plan_ru) AS PlanGrossMarginPercent,
cast(0.0 as fco_sls_acctg_ovw_actual_ru) AS ActualGrossMarginPercent,
cast(0.0 as fco_sls_acctg_ovw_prevyear_ru) AS PreviousYearGrossMarginPercent,
cast(0.0 as fco_sls_acctg_ovw_diff_ru) AS GrossMarginDifferenceRatio,
cast(0.0 as fco_sls_acctg_ovw_diff_ru) AS AverageGrossMarginPercent,
FinancialAccountType,
FunctionalArea,
BusinessArea,
Segment,
ControllingArea,
CostCenter,
Plant,
ValuationArea,
OrganizationDivision,
ServiceDocumentType,
AssetClass,
PostingDate,
Supplier,
SalesDocument,
OrderID,
AccountingDocumentType,
ServiceDocument
FROM I_SlsAcctgGrssMargPerMatlOvw
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA