I_ServiceOrderPeriodCode

DDL: I_SERVICEORDERPERIODCODE Type: view BASIC

Service Order Period Code

I_ServiceOrderPeriodCode is a Basic CDS View that provides data about "Service Order Period Code" in SAP S/4HANA. It reads from 1 data source (dd07l) and exposes 2 fields with key field ServiceOrderPeriodCode. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
dd07l dd07l from

Associations (2)

CardinalityTargetAliasCondition
[1..*] I_ServiceOrderPeriodCodeText _ServiceOrderPeriodCodeText $projection.ServiceOrderPeriodCode = _ServiceOrderPeriodCodeText.ServiceOrderPeriodCode
[1..1] P_CALENDARENDWEEK _CalendarDate _CalendarDate.CalendarDate = $session.system_date

Annotations (11)

NameValueLevelField
EndUserText.label Service Order Period Code view
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName ISRVCORDPRD view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #BASIC view
ObjectModel.usageType.dataClass #CUSTOMIZING view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.sizeCategory #S view
Metadata.ignorePropagatedAnnotations true view

Fields (2)

KeyFieldSource TableSource FieldDescription
KEY ServiceOrderPeriodCode valpos
_ServiceOrderPeriodCodeText _ServiceOrderPeriodCodeText
@EndUserText.label: 'Service Order Period Code'
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog:{
sqlViewName: 'ISRVCORDPRD',
compiler.compareFilter: true,
preserveKey: true
}
@AccessControl.authorizationCheck: #NOT_REQUIRED


@VDM.viewType: #BASIC
// for the value help free text search bar

//@Search.searchable: true

@ObjectModel.usageType.dataClass: #CUSTOMIZING
@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.sizeCategory: #S
//@ObjectModel.representativeKey: 'Issue'

@Metadata.ignorePropagatedAnnotations: true

define view I_ServiceOrderPeriodCode
  as select from dd07l
  //  association [1..*] to I_ServiceOrderPeriodCodeText as _ServiceOrderPeriodCodeText on $projection.ConsecutiveWeekNumber = _ServiceOrderPeriodCodeText.ServiceOrderPeriodCode

  association [1..*] to I_ServiceOrderPeriodCodeText as _ServiceOrderPeriodCodeText on $projection.ServiceOrderPeriodCode = _ServiceOrderPeriodCodeText.ServiceOrderPeriodCode
  association [1..1] to P_CALENDARENDWEEK               as _CalendarDate               on _CalendarDate.CalendarDate = $session.system_date
  //  association [1..1] to P_CALENDARWEEK               as _CalendarDate               on _CalendarDate.CalendarDate =  '20200101'


{
      @UI.hidden: true
      //  key valpos as ConsecutiveWeekNumber,

  key valpos as ServiceOrderPeriodCode,
//      valpos as ServiceOrderPeriodCode,

      // for the value help free text search bar

      //      @Search: {

      //        defaultSearchElement: true,

      //        fuzzinessThreshold: 0.8,

      //        ranking: #HIGH

      //      }

      @EndUserText.label: 'Week Number'
      @ObjectModel.text.association: '_ServiceOrderPeriodCodeText'
      case
      when valpos between '0054' and '0062'
      then cast(concat( '000', cast(cast(valpos as int4) - 53 as abap.char(12))) as abap.numc(4))
      when  valpos > '0053'
      then cast(concat( '00', cast(cast(valpos as int4) - 53 as abap.char(12))) as abap.numc(4))
      when  valpos = '0053'
      then valpos
      else valpos
      end    as ConsecutiveWeekNumber,
      //      end    as ServiceOrderPeriodCode,

      //      _CalendarDate.CalendarDate,

      //      _ServiceOrderPeriodCodeText.ServiceOrderPeriodCodeText,

      //      _ServiceOrderPeriodCodeText.Language,


      //      case when valpos > '0053'

      //      then cast(concat( '00', cast(cast(valpos as int4) - 53 as abap.char(12))) as abap.numc(4))

      //      else valpos

      //      end    as ServiceOrderPeriodCode,


      _ServiceOrderPeriodCodeText
}
where
      domname  =       'CRMS4_SRVC_ORD_PERIOD'
  and as4local =       'A'
  and valpos   between _CalendarDate.CalendarWeek and _CalendarDate.EndDateWeek
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_CALENDARENDWEEK",
"DD07L"
],
"ASSOCIATED":
[
"I_SERVICEORDERPERIODCODETEXT",
"P_CALENDARENDWEEK"
],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/