C_SGLGREGORIANCALDATEFUNCTION
Execute Single Function
C_SGLGREGORIANCALDATEFUNCTION is a CDS View in S/4HANA. Execute Single Function. 3 CDS views read from this table.
CDS Views using this table (3)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| C_DuplicateSalesDocument | view | inner | CONSUMPTION | Duplicate Sales Documents |
| P_DuplicateSalesDocumentGrpg | view | inner | CONSUMPTION | Grouping Criteria for Duplicate Sales Documents |
| P_PREVIOUS365DAYS | view | from | CONSUMPTION | P_PREVIOUS365DAYS |
@AbapCatalog.sqlViewName: 'CSGLGCALDF'
@AbapCatalog.compiler.compareFilter: true
@EndUserText.label: 'Execute Single Function'
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #S
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #CONSUMPTION
define view C_SglGregorianCalDateFunction with parameters
P_DateFunction : datefunctionid,
@Consumption.hidden : true
@Environment.systemField : #SYSTEM_LANGUAGE
P_Language : sylangu
//as select from C_GregorianCalDateFunction (P_Language : $parameters.P_Language)
//{
// key DateFunction ,
// DateFunctionName,
// DateFunctionDescription,
// DateFunctionGranularity,
// DateFunctionType,
// DateFunctionStartDate,
// DateFunctionEndDate,
//
// /* Associations */
// _DateFunctionStartDate,
// _DateFunctionEndDate
//}
//where DateFunction = $parameters.P_DateFunction
as select from I_DateFunctionValue as DateFucntionValue
association [1] to I_DateFunctionValue as SystemDateFunctionValue on SystemDateFunctionValue.DateFunctionValidityDate = $session.system_date
and SystemDateFunctionValue.DateFunction = $parameters.P_DateFunction
{
key DateFunction,
_Datefunction._DateFunctionText[1: Language = $session.system_language].DateFunctionName,
_Datefunction._DateFunctionText[1: Language = $session.system_language].DateFunctionDescription,
_Datefunction.DateFunctionGranularity,
_Datefunction.DateFunctionType,
SystemDateFunctionValue.DateFunctionStartDate,
SystemDateFunctionValue.DateFunctionEndDate,
dats_tims_to_tstmp(DateFucntionValue.DateFunctionStartDate, cast( '000000' as abap.tims),
abap_user_timezone($session.user, $session.client, 'FAIL'),
$session.client, 'FAIL' ) as DateFunctionStartDateTime,
dats_tims_to_tstmp(DateFucntionValue.DateFunctionEndDate, cast( '235959' as abap.tims),
abap_user_timezone($session.user, $session.client, 'FAIL'),
$session.client, 'FAIL' ) as DateFunctionEndDateTime
}
where
DateFunction = $parameters.P_DateFunction and
DateFunctionValidityDate = tstmp_to_dats(tstmp_current_utctimestamp(),
abap_user_timezone($session.user, $session.client, 'FAIL'),
$session.client, 'FAIL' )