I_CompanyCodePeriod

DDL: I_COMPANYCODEPERIOD Type: view_entity BASIC

Company Code Period

I_CompanyCodePeriod (Basic)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Database & Data Management

I_CompanyCodePeriod is a Basic CDS View that provides data about "Company Code Period" in SAP S/4HANA. It reads from 1 data source (marv) and exposes 7 fields with key field CompanyCode.

SAP Help Documentation

CategoryCDS Views for Product Master
Purpose
This CDS view provides information about the posting period for a material. To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Structure
Important Fields Important fields in this view include the following: Field Name Description CompanyCode Company Code FiscalMonthCurrentPeriod Current period (posting period) ProductCurrentFiscalYear Fiscal Year of the Current Period FiscalMonthPreviousPeriod Month of previous period ProdPreviousPeriodFiscalYear Fiscal Year of the Previous Period FiscalMonthLastYear Last month of previous year ProductLastFiscalYear Fiscal Year of the Last Period of the Previous Year

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessDatabase & Data Management
Application ComponentLO-MD-MM
CapabilitiesData Source in SQL Select, Association Target for Defining CDS Entities, Data Source for Defining CDS Entities
PackageDatabase & Data Management for SAP S/4HANA Cloud Private Edition
Description <p>This CDS view provides information about the posting period for a material. </p> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (1)

SourceAliasJoin Type
marv marv from

Annotations (9)

NameValueLevelField
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Company Code Period view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #A view
ObjectModel.usageType.sizeCategory #M view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.modelingPattern #NONE view
VDM.viewType #BASIC view
AbapCatalog.entityBuffer.definitionAllowed true view

Fields (7)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode bukrs Company Code
FiscalMonthCurrentPeriod lfmon Current period (posting period)
ProductCurrentFiscalYear Fiscal Year of the Current Period
FiscalMonthPreviousPeriod vmmon Month of previous period
ProdPreviousPeriodFiscalYear Fiscal Year of the Previous Period
FiscalMonthLastYear vjmon Last month of previous year
ProductLastFiscalYear Fiscal Year of the Last Period of the Previous Year

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 I_CompanyCodePeriod.
-- 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.

CREATE VIEW I_CompanyCodePeriod AS
SELECT
  bukrs AS CompanyCode,
  lfmon AS FiscalMonthCurrentPeriod,
  cast ( lfgja as cmd_prd_lfgja preserving type ) AS ProductCurrentFiscalYear,
  vmmon AS FiscalMonthPreviousPeriod,
  cast ( vmgja as cmd_prd_vmgja preserving type ) AS ProdPreviousPeriodFiscalYear,
  vjmon AS FiscalMonthLastYear,
  cast (vjgja as cmd_prd_vjgja preserving type ) AS ProductLastFiscalYear
FROM marv
;