P_WorkflowToObject

DDL: P_WORKFLOWTOOBJECT SQL: PWFTOOBJECT Type: view BASIC

P_WorkflowToObject is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (swwwihead, sww_wi2obj) and exposes 3 fields with key field WorkItem.

Data Sources (2)

SourceAliasJoin Type
swwwihead _head inner
sww_wi2obj _wi2obj from

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PWFTOOBJECT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.representativeKey WorkItem view
VDM.private true view
VDM.viewType #BASIC view

Fields (3)

KeyFieldSource TableSource FieldDescription
KEY WorkItem sww_wi2obj wi_id
ObjectKey sww_wi2obj instid
ReleaseDateTime sww_wi2obj crea_tmp
@AbapCatalog.sqlViewName: 'PWFTOOBJECT'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.representativeKey: 'WorkItem'
@VDM.private: true
@VDM.viewType: #BASIC
define view P_WorkflowToObject
  as select from sww_wi2obj as _wi2obj
    inner join   swwwihead  as _head on _wi2obj.top_wi_id = _head.top_wi_id
{

  key _wi2obj.wi_id    as WorkItem,

      //  key _WorkflowLatestTask.WorkItem,

      //      substring(instid,1,10) as AccountingDocument,

      //      substring(instid,11,4) as CompanyCode,

      //      substring(instid,15,4) as FiscalYear,

      _wi2obj.instid   as ObjectKey,
      _wi2obj.crea_tmp as ReleaseDateTime

}
where
  // add by I337033 2020-09-20

  // include currency adjustment workflow

       _wi2obj.wi_id    =  _wi2obj.top_wi_id
  // add by I337033 2020-09-20

  // include currency adjustment workflow

  and  _head.wi_rh_task <> 'TS00008267'
  and(
       _head.wfd_id     =  'WS02800046'
    or _head.wfd_id     =  'WS78500019'
    or ( _head.wfd_id   = '' and _head.wi_rh_task = 'TS02800036' ) // note 3399634 - documents approved in older releases are not displayed

  )
  and  _head.step_id    =  'Post'
  and  _head.wi_type    =  'B' -- Work Item for Background Step
  and  _head.wi_stat    =  'COMPLETED'
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"SWWWIHEAD",
"SWW_WI2OBJ"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/