P_SCHEDPRODNPLANTTIMEZONE

CDS View

P_SCHEDPRODNPLANTTIMEZONE is a CDS View in S/4HANA. It contains 1 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_ALTERNATEPRODLINES view inner BASIC

Fields (1)

KeyField CDS FieldsUsed in Views
PlantTimeZone PlantTimeZone 1
@AbapCatalog.sqlViewName: 'PSHPDTMZNE'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
//@EndUserText.label: 'Plant Time Zone'

@VDM.private: true
@VDM.viewType: #BASIC
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_SchedProdnPlantTimeZone
  as select distinct from 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 ' '
      then
      case t001w.land1
        when ' '
          then ' '
        else
        case t001w.regio
          when ' '
            then ' '
          else
          case _ttz5s_d.tzone
            when ' '
              then _ttz5s.tzone
            else _ttz5s_d.tzone
          end
        end
      end         
    else
    case _address.AddressTimeZone
      when ' '
        then 
        case _ttz5_d.tzone
          when ' '
            then _ttz5.tzone
          else _ttz5_d.tzone
        end
      else _address.AddressTimeZone
     end 
  end as PlantTimeZone  
    
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_ORGANIZATIONADDRESS",
"T001W",
"TTZ5",
"TTZ5S"
],
"ASSOCIATED":
[
"I_ORGANIZATIONADDRESS",
"TTZ5",
"TTZ5S"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/