P_PDOBJECTRELATION

DDL: P_PDOBJECTRELATION SQL: PDOBJECTRELATION Type: view BASIC

P_PDOBJECTRELATION is a Basic CDS View in SAP S/4HANA. It reads from 1 data source (P_PDRELATION) and exposes 10 fields with key fields PlanVersion, ObjectType, ObjectID.

Data Sources (1)

SourceAliasJoin Type
P_PDRELATION relation from

Parameters (4)

NameTypeDefault
P_ObjectType abap.char( 2 )
P_RelationShipDirection abap.char( 1 )
P_RelationShip abap.char( 3 )
P_RelatedObjectType abap.char( 2 )

Annotations (3)

NameValueLevelField
VDM.private true view
VDM.viewType #BASIC view
AbapCatalog.sqlViewName PDOBJECTRELATION view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY PlanVersion P_PDRELATION PlanVersion
KEY ObjectType P_PDRELATION ObjectType
KEY ObjectID P_PDRELATION ObjectID
RelationStatus P_PDRELATION RelationStatus
StartDate P_PDRELATION StartDate
EndDate P_PDRELATION EndDate
RelationStartDate P_PDRELATION StartDate
RelationEndDate P_PDRELATION EndDate
RelatedObjectType P_PDRELATION RelatedObjectType
RelatedObjectID P_PDRELATION RelatedObjectID
@VDM.private: true
@VDM.viewType: #BASIC
@AbapCatalog.sqlViewName: 'PDOBJECTRELATION'

define view P_PDOBJECTRELATION
  with parameters
    P_ObjectType            : abap.char( 2 ),
    P_RelationShipDirection : abap.char( 1 ),
    P_RelationShip          : abap.char( 3 ),
    P_RelatedObjectType     : abap.char( 2 )

  as select from P_PDRELATION as relation
  //    inner join   t77s0        as systemtable on  grpid = 'PLOGI'

  //                                             and semid = 'PLOGI'

  //                                             and gsval = relation.PlanVersion

  //                 inner join P_PDOBJECT as object  on

  //                 relation.PlanVersion       =  object.PlanVersion  and

  //                 relation.ObjectType        =  object.ObjectType   and

  //                 relation.ObjectID          =  object.ObjectID     and

  //                 relation.RelationStatus    =  object.ObjectStatus


{


  key relation.PlanVersion       as PlanVersion,
  key relation.ObjectType        as ObjectType,
  key relation.ObjectID          as ObjectID,

      relation.RelationStatus,

      relation.StartDate         as StartDate,
      relation.EndDate           as EndDate,
      relation.StartDate         as RelationStartDate,
      relation.EndDate           as RelationEndDate,
      relation.RelatedObjectType,
      relation.RelatedObjectID   as RelatedObjectID



}
where
      relation.ObjectType            = $parameters.P_ObjectType
  and relation.RelationShipDirection = $parameters.P_RelationShipDirection
  and relation.ReleationShip         = $parameters.P_RelationShip
  and relation.RelatedObjectType     = $parameters.P_RelatedObjectType