ARS_OBJECTS_IN_SAME_SW_COMP is a CDS View that provides data about "Objects in Same Software Component" in SAP S/4HANA. It reads from 2 data sources (ARS_OBJECT_SOFTWARE_COMPONENT, tdevc) and exposes 3 fields. Part of development package S_ARS_PUBLIC.
//*************************************************
// The view returns objects which are in the same software component as the given object.
//
// In objects of ABAP language version "SAP Cloud Platform", references to other objects are allowed according to the following rules:
// (a) referenced object is released (to be retrieved using CDS view ARS_API_RELEASED_FOR_C1_SCP)
// (b) referenced object in the same software component as the given object (to be retrieved using this CDS view)
//
// Parameter Definition:
// - P_OBJECT_TYPE: Object directory type of the object to be checked (e.g. 'DDLS' as given in field OBJECT of table TADIR)
// - P_OBJECT_NAME: Object directory name of the object to be checked (as given in field OBJ_NAME of table TADIR)
//
// Element Definition:
// - PROGRAM_ID: Program ID of object in same software component ('R3TR' as given in field PGMID of table TADIR)
// - P_OBJECT_TYPE: Object directory type of object in same software component (e.g. 'TABLE' as given in field OBJECT of table TADIR)
// - P_OBJECT_NAME: Object directory name of object in same software component (as given in field OBJ_NAME of table TADIR)
//*************************************************
@AbapCatalog.sqlViewName: 'ARS_OBJ_SAME_SWC'
@AbapCatalog.compiler.compareFilter: true@AccessControl.authorizationCheck: #NOT_ALLOWED@EndUserText.label: 'Objects in Same Software Component'
defineview ARS_OBJECTS_IN_SAME_SW_COMP
withparameters
p_object_type: abap.char(4),
p_object_name: abap.char(40)
asselectdistinctfrom tadir
innerjoin tdevc
on tdevc.devclass = tadir.devclass
innerjoin ARS_OBJECT_SOFTWARE_COMPONENT as object_software_component
on object_software_component.program_id = 'R3TR' and
object_software_component.object_type = $parameters.p_object_type and
object_software_component.object_name = $parameters.p_object_name and
object_software_component.software_component = tdevc.dlvunit
{
tadir.pgmid as program_id,
tadir.object as object_type,
tadir.obj_name as object_name,
tdevc.dlvunit as software_component
}
where
tadir.pgmid = 'R3TR'