@AbapCatalog.sqlViewName: 'PSHPDTMZNE'
@AbapCatalog.compiler.compareFilter: true@AccessControl.authorizationCheck: #CHECK//@EndUserText.label: 'Plant Time Zone'
@VDM.private: true@VDM.viewType: #BASIC@ClientHandling.algorithm: #SESSION_VARIABLEdefineview P_SchedProdnPlantTimeZone
asselectdistinctfrom t001w
association [0..1] to I_OrganizationAddress as _address on _address.AddressID = t001w.adrnr
and _address.AddressRepresentationCode is initial
and _address.AddressPersonID is initial
////get default(X) time zone
association [0..1] to ttz5s as _ttz5s_d on _ttz5s_d.land1 = t001w.land1
and _ttz5s_d.bland = t001w.regio
and _ttz5s_d.tzonedft = 'X'
association [0..1] to ttz5s as _ttz5s on _ttz5s.land1 = t001w.land1
and _ttz5s.bland = t001w.regio
// and _ttz5s.tzonedft = 'X'
////get default(X) time zone
association [0..1] to ttz5 as _ttz5_d on _ttz5_d.land1 = t001w.land1
and _ttz5_d.tzonedft = 'X'
association [0..1] to ttz5 as _ttz5 on _ttz5.land1 = t001w.land1
{
key t001w.werks,
// _address.AddressTimeZone as PlantTimeZone
case t001w.adrnr
when ' '
thencase t001w.land1
when ' '
then ' '
elsecase t001w.regio
when ' '
then ' '
elsecase _ttz5s_d.tzone
when ' '
then _ttz5s.tzone
else _ttz5s_d.tzone
endendendelsecase _address.AddressTimeZone
when ' '
thencase _ttz5_d.tzone
when ' '
then _ttz5.tzone
else _ttz5_d.tzone
endelse _address.AddressTimeZone
endendas PlantTimeZone
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ORGANIZATIONADDRESS",
"T001W",
"TTZ5",
"TTZ5S"
],
"ASSOCIATED":
[
"I_ORGANIZATIONADDRESS",
"TTZ5",
"TTZ5S"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/