I_FrcElmntOrgExtRelshpWithDrft

DDL: I_FRCELMNTORGEXTRELSHPWITHDRFT SQL: IFEORGEXTRELDRFT Type: view COMPOSITE

Interface view for the External Relationship with Draft

I_FrcElmntOrgExtRelshpWithDrft is a Composite CDS View that provides data about "Interface view for the External Relationship with Draft" in SAP S/4HANA. It reads from 3 data sources (I_FrcElmntOrgExtRelshpDraft, I_FrcElmntOrgDfsExternalRelshp, I_DraftAdministrativeData) and exposes 34 fields.

Data Sources (3)

SourceAliasJoin Type
I_FrcElmntOrgExtRelshpDraft DraftFrcElmntExternalRelshp union
I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgDfsExternalRelshp from
I_DraftAdministrativeData I_DraftAdministrativeData inner

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName IFEORGEXTRELDRFT view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
EndUserText.label Interface view for the External Relationship with Draft view

Fields (34)

KeyFieldSource TableSource FieldDescription
FrcElmntOrgPlanVersion I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgPlanVersion
FrcElmntOrgType I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgType
ForceElementOrgID I_FrcElmntOrgDfsExternalRelshp ForceElementOrgID
FrcElmntOrgSubType I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgSubType
FrcElmntOrgPlngStatus I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgPlngStatus
FrcElmntOrgValdtyStartDate I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgValdtyStartDate
FrcElmntOrgValdtyEndDate I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgValdtyEndDate
NumberOfForceElementOrg I_FrcElmntOrgDfsExternalRelshp NumberOfForceElementOrg
FrcElmntOrgDraftUUID
FrcElmntOrgInfoType I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgInfoType
FrcElmntOrgRelatedOrgType I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgRelatedOrgType
FrcElmntOrgRelatedOrgID I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgRelatedOrgID
FrcElmntOrgRelshpPriority I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgRelshpPriority
FrcElmntOrgCnctntdRelshpName I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgCnctntdRelshpName
FrcElmntOrgLastChgdByUserName I_FrcElmntOrgDfsExternalRelshp FrcElmntOrgLastChgdByUserName
FrcElmntOrgRelshpDesc
FrcElmntOrgDrftHasActiveEntity
FrcElmntOrgPlanVersion
FrcElmntOrgType I_FrcElmntOrgExtRelshpDraft FrcElmntOrgType
ForceElementOrgID I_FrcElmntOrgExtRelshpDraft ForceElementOrgID
FrcElmntOrgSubType I_FrcElmntOrgExtRelshpDraft FrcElmntOrgSubType
FrcElmntOrgPlngStatus I_FrcElmntOrgExtRelshpDraft FrcElmntOrgPlngStatus
FrcElmntOrgValdtyStartDate I_FrcElmntOrgExtRelshpDraft FrcElmntOrgValdtyStartDate
FrcElmntOrgValdtyEndDate I_FrcElmntOrgExtRelshpDraft FrcElmntOrgValdtyEndDate
NumberOfForceElementOrg I_FrcElmntOrgExtRelshpDraft NumberOfForceElementOrg
FrcElmntOrgDraftUUID I_FrcElmntOrgExtRelshpDraft FrcElmntOrgDraftUUID
FrcElmntOrgInfoType I_FrcElmntOrgExtRelshpDraft FrcElmntOrgInfoType
FrcElmntOrgRelatedOrgType I_FrcElmntOrgExtRelshpDraft FrcElmntOrgRelatedOrgType
FrcElmntOrgRelatedOrgID I_FrcElmntOrgExtRelshpDraft FrcElmntOrgRelatedOrgID
FrcElmntOrgRelshpPriority I_FrcElmntOrgExtRelshpDraft FrcElmntOrgRelshpPriority
FrcElmntOrgCnctntdRelshpName I_FrcElmntOrgExtRelshpDraft FrcElmntOrgCnctntdRelshpName
FrcElmntOrgLastChgdByUserName I_FrcElmntOrgExtRelshpDraft FrcElmntOrgLastChgdByUserName
FrcElmntOrgRelshpDesc I_FrcElmntOrgExtRelshpDraft FrcElmntOrgRelshpDesc
FrcElmntOrgDrftHasActiveEntity I_FrcElmntOrgExtRelshpDraft FrcElmntOrgDrftHasActiveEntity
@AbapCatalog.sqlViewName: 'IFEORGEXTRELDRFT'
@AbapCatalog.compiler.compareFilter: true

@VDM.viewType: #COMPOSITE
@AbapCatalog.preserveKey:true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED
@EndUserText.label: 'Interface view for the External Relationship with Draft'
define view I_FrcElmntOrgExtRelshpWithDrft
  as select from I_FrcElmntOrgDfsExternalRelshp as FrcElmntOrgDfsExternalRelshp
{
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgPlanVersion,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgType,
  FrcElmntOrgDfsExternalRelshp.ForceElementOrgID,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgSubType,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgPlngStatus,
  case FrcElmntOrgDfsExternalRelshp.FrcElmntOrgPlngStatus
    when '1' then 3 when '5' then 1  else 2 end                                      as FrcElmntOrgPlngStatusFoEd,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgValdtyStartDate,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgValdtyEndDate,
//  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgRelatedOrgID,

  FrcElmntOrgDfsExternalRelshp.NumberOfForceElementOrg,
  cast ( hextobin('00000000000000000000000000000000') as sysuuid_x preserving type ) as FrcElmntOrgDraftUUID,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgInfoType,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgConcatenatedID,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgRelatedOrgType,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgRelatedOrgID,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgRelshpPriority,
  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgCnctntdRelshpName,
  //Added field

  FrcElmntOrgDfsExternalRelshp.FrcElmntOrgLastChgdByUserName,
  _FrcElmntOrgRelshpCode._FrcElmntOrgRelshpText[1:FrcElmntOrgLanguage=$session.system_language].FrcElmntOrgRelshpDesc,
  cast( ' ' as boole_d preserving type )                                             as FrcElmntOrgDrftHasActiveEntity,
  //cast ('Active' as abap.char(20)  )                                                  as FrcElmntOrgTechnicalStatusName

  '1'                                                                                as FrcElmntOrgTechnicalStatusName

}

union select from I_FrcElmntOrgExtRelshpDraft as DraftFrcElmntExternalRelshp
  inner join      I_DraftAdministrativeData on I_DraftAdministrativeData.DraftUUID = DraftFrcElmntExternalRelshp.FrcElmntOrgDraftUUID
{

  DraftFrcElmntExternalRelshp.FrcElmntOrgPlanVersion,
  DraftFrcElmntExternalRelshp.FrcElmntOrgType,
  DraftFrcElmntExternalRelshp.ForceElementOrgID,
  DraftFrcElmntExternalRelshp.FrcElmntOrgSubType,
  DraftFrcElmntExternalRelshp.FrcElmntOrgPlngStatus,

  case DraftFrcElmntExternalRelshp.FrcElmntOrgPlngStatus
   when '1' then 3 when '5' then 1  else 2 end as FrcElmntOrgPlngStatusFoEd,
  DraftFrcElmntExternalRelshp.FrcElmntOrgValdtyStartDate,
  DraftFrcElmntExternalRelshp.FrcElmntOrgValdtyEndDate,
  //  DraftFrcElmntExternalRelshp.FrcElmntOrgRelatedOrgID,

  DraftFrcElmntExternalRelshp.NumberOfForceElementOrg,
  DraftFrcElmntExternalRelshp.FrcElmntOrgDraftUUID,
  DraftFrcElmntExternalRelshp.FrcElmntOrgInfoType,
  DraftFrcElmntExternalRelshp.FrcElmntOrgConcatenatedID,
  DraftFrcElmntExternalRelshp.FrcElmntOrgRelatedOrgType,
  DraftFrcElmntExternalRelshp.FrcElmntOrgRelatedOrgID,
  DraftFrcElmntExternalRelshp.FrcElmntOrgRelshpPriority,
  DraftFrcElmntExternalRelshp.FrcElmntOrgCnctntdRelshpName,
  //Added field

  DraftFrcElmntExternalRelshp.FrcElmntOrgLastChgdByUserName,
  DraftFrcElmntExternalRelshp.FrcElmntOrgRelshpDesc,
  DraftFrcElmntExternalRelshp.FrcElmntOrgDrftHasActiveEntity,

  case
  when(I_DraftAdministrativeData.DraftIsProcessedByMe <> 'X' and I_DraftAdministrativeData.DraftIsCreatedByMe <> 'X' and I_DraftAdministrativeData.InProcessByUser <> ' ')
  then '2' //cast('Locked' as abap.char(15)) // Locked by somebody else


  when (I_DraftAdministrativeData.DraftIsProcessedByMe <> 'X' and I_DraftAdministrativeData.DraftIsCreatedByMe = 'X' and I_DraftAdministrativeData.InProcessByUser <> ' ')
  then '2' //cast('Locked' as abap.char(15)) // Locked by somebody else


  when (I_DraftAdministrativeData.DraftIsProcessedByMe = 'X'  and I_DraftAdministrativeData.DraftIsCreatedByMe = 'X' and I_DraftAdministrativeData.InProcessByUser = ' ' )
  then '3' //cast('Draft' as abap.char(15))


  when (I_DraftAdministrativeData.DraftIsProcessedByMe = ' '  and I_DraftAdministrativeData.DraftIsCreatedByMe = 'X' and I_DraftAdministrativeData.InProcessByUser = ' ' )
  then '3' //cast('Draft' as abap.char(15))


  when (I_DraftAdministrativeData.DraftIsProcessedByMe = 'X'  and I_DraftAdministrativeData.DraftIsCreatedByMe <> 'X' and I_DraftAdministrativeData.InProcessByUser <> ' ' )
  then '3'//cast('Draft' as abap.char(15))


  when (I_DraftAdministrativeData.DraftIsProcessedByMe = 'X'  and I_DraftAdministrativeData.DraftIsCreatedByMe = 'X' and I_DraftAdministrativeData.InProcessByUser <> ' ' )
  then '3' //cast('Draft' as abap.char(15))


  when (I_DraftAdministrativeData.DraftIsProcessedByMe <> 'X' and I_DraftAdministrativeData.DraftIsCreatedByMe <> 'X' and I_DraftAdministrativeData.InProcessByUser = ' ' )
  then '4' //cast('Draft by other' as abap.char(15))


   else '0' //cast('      ' as abap.char(15))

  end                                          as FrcElmntOrgTechnicalStatusName
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_DRAFTADMINISTRATIVEDATA",
"I_FRCELMNTORGDFSEXTERNALRELSHP",
"I_FRCELMNTORGEXTRELSHPDRAFT",
"I_FRCELMNTORGRELSHPCODE",
"I_FRCELMNTORGRELSHPTEXT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/