P_CCLdgrShiftedPeriods

DDL: P_CCLDGRSHIFTEDPERIODS SQL: PCCLDSHIFTEDPER Type: view COMPOSITE Package: FINS_ML_UTIL_PERIOD

Period Dates for CoCode Leading Ledger

P_CCLdgrShiftedPeriods is a Composite CDS View that provides data about "Period Dates for CoCode Leading Ledger" in SAP S/4HANA. It reads from 4 data sources (P_CCLdngLdgrPerDates, I_LedgerCompanyCodeCrcyRoles, I_FiscalPeriodForVariant, I_FiscalPeriodForVariant) and exposes 14 fields with key fields CompanyCode, Ledger. Part of development package FINS_ML_UTIL_PERIOD.

Data Sources (4)

SourceAliasJoin Type
P_CCLdngLdgrPerDates ccllpd from
I_LedgerCompanyCodeCrcyRoles ldcmp inner
I_FiscalPeriodForVariant lffp inner
I_FiscalPeriodForVariant vmfp inner

Annotations (6)

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

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY CompanyCode P_CCLdngLdgrPerDates CompanyCode Receiver Company Code
KEY Ledger I_LedgerCompanyCodeCrcyRoles Ledger Ledger
FiscalYearVariant I_LedgerCompanyCodeCrcyRoles FiscalYearVariant FY Variant
CurrentFiscalPeriod I_FiscalPeriodForVariant FiscalPeriod Tax period
CurrentFiscalYear I_FiscalPeriodForVariant FiscalYear G/L Fiscal Year
CurrentFiscalYearPeriod
CurrentFiscalPeriodStartDate I_FiscalPeriodForVariant FiscalPeriodStartDate Start Date
CurrentFiscalPeriodEndDate I_FiscalPeriodForVariant FiscalPeriodEndDate End Date
PreviousFiscalPeriod I_FiscalPeriodForVariant FiscalPeriod Tax period
PreviousFiscalPeriodFiscalYear I_FiscalPeriodForVariant FiscalYear G/L Fiscal Year
PreviousFiscalYearPeriod
PreviousFiscalPeriodStartDate I_FiscalPeriodForVariant FiscalPeriodStartDate Start Date
PreviousFiscalPeriodEndDate I_FiscalPeriodForVariant FiscalPeriodEndDate End Date
PreviousFiscalYearEndDate

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_CCLdgrShiftedPeriods.
-- 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: PCCLDSHIFTEDPER

CREATE VIEW P_CCLdgrShiftedPeriods AS
SELECT
  ccllpd.CompanyCode AS CompanyCode,
  ldcmp.Ledger AS Ledger,
  ldcmp.FiscalYearVariant AS FiscalYearVariant,
  lffp.FiscalPeriod AS CurrentFiscalPeriod,
  lffp.FiscalYear AS CurrentFiscalYear,
  cast(lffp.FiscalYearPeriod as fml_yearper_nconv) AS CurrentFiscalYearPeriod,
  lffp.FiscalPeriodStartDate AS CurrentFiscalPeriodStartDate,
  lffp.FiscalPeriodEndDate AS CurrentFiscalPeriodEndDate,
  vmfp.FiscalPeriod AS PreviousFiscalPeriod,
  vmfp.FiscalYear AS PreviousFiscalPeriodFiscalYear,
  cast(vmfp.FiscalYearPeriod as fml_yearper_nconv) AS PreviousFiscalYearPeriod,
  vmfp.FiscalPeriodStartDate AS PreviousFiscalPeriodStartDate,
  vmfp.FiscalPeriodEndDate AS PreviousFiscalPeriodEndDate,
  dats_add_days(lffp.FiscalYearStartDate , -1, 'INITIAL' ) AS PreviousFiscalYearEndDate
FROM P_CCLdngLdgrPerDates AS ccllpd
INNER JOIN I_LedgerCompanyCodeCrcyRoles AS ldcmp ON /* join condition not captured in parsed metadata */
INNER JOIN I_FiscalPeriodForVariant AS lffp ON /* join condition not captured in parsed metadata */
INNER JOIN I_FiscalPeriodForVariant AS vmfp ON /* join condition not captured in parsed metadata */
;