aps_com_cs_csmpt
Custom Communication Scenarios
aps_com_cs_csmpt is a CDS View that provides data about "Custom Communication Scenarios" in SAP S/4HANA. It reads from 9 data sources and exposes 24 fields with key field CommScenID. It has 4 associations to related views. Part of development package SR_APS_COM_CSCN.
Data Sources (9)
| Source | Alias | Join Type |
|---|---|---|
| ATOV_U_ITEMS_EXPORTED_AT | _Exported | left_outer |
| aps_user_ddl | _User | left_outer |
| APS_COM_CSCN_API_ROOT | application | from |
| aps_com_c_cscn | aps_com_c_cscn | inner |
| aps_com_cs_ca_c | aps_com_cs_ca_c | left_outer |
| aps_com_d_cscn | aps_com_d_cscn | left_outer |
| aps_com_w_wl_prt | aps_com_w_wl_prt | left_outer |
| ato_setup | setup | left_outer |
| usr05 | user05 | left_outer |
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | APS_COM_COMM_CSCNIB | _InboundServiceAssignment | _InboundServiceAssignment.CommScenID = $projection.CommScenID |
| [0..*] | APS_COM_COMM_CSCNOB | _OutboundServiceAssignment | _OutboundServiceAssignment.CommScenID = $projection.CommScenID |
| [0..*] | aps_com_cs_ca | _AssignedInArrangements | _AssignedInArrangements.CommunicationScenario = application.communication_scenario_id |
| [0..*] | APS_COM_CS_AUTH | _AuthorizationAssignments | _AuthorizationAssignments.ScenarioId = $projection.CommScenID |
Annotations (4)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | APS_COM_CSMPT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| EndUserText.label | Custom Communication Scenarios | view |
Fields (24)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CommScenID | APS_COM_CSCN_API_ROOT | communication_scenario_id | |
| Description | APS_COM_CSCN_API_ROOT | description | ||
| LastChangeTime | APS_COM_CSCN_API_ROOT | change_timestamp | ||
| VTRNumber | aps_com_d_cscn | vtr_number | ||
| VTRStatus | aps_com_d_cscn | vtr_status | ||
| VTRSymptom | aps_com_d_cscn | vtr_symptom | ||
| statusendasStatus | ||||
| vtr_statusthen4else1endasActualStatus | ||||
| AssignCount | aps_com_cs_ca_c | AssignedArrangementCount | ||
| ObOAuth2Active | APS_COM_CSCN_API_ROOT | ob_oauth2_auth | ||
| ObOAuth2ClientProfile | APS_COM_CSCN_API_ROOT | ob_oauth2_client_profile | ||
| ObOAuth2ClientProfileDesc | aps_com_w_wl_prt | description | ||
| ObX509Auth | APS_COM_CSCN_API_ROOT | ob_x509_auth | ||
| ObBasicAuth | APS_COM_CSCN_API_ROOT | ob_basic_auth | ||
| ObOAuth1Active | APS_COM_CSCN_API_ROOT | ob_oauth1_auth | ||
| ObNoneAuth | APS_COM_CSCN_API_ROOT | ob_none_auth | ||
| AbapLanguageVersion | APS_COM_CSCN_API_ROOT | abap_language_version | ||
| char11endasObOAuth2Granttype | ||||
| Exported | ATOV_U_ITEMS_EXPORTED_AT | exported_at | ||
| exported_atthenYelseCendasExportStatus | ||||
| _InboundServiceAssignment | _InboundServiceAssignment | |||
| _OutboundServiceAssignment | _OutboundServiceAssignment | |||
| _AssignedInArrangements | _AssignedInArrangements | |||
| _AuthorizationAssignments | _AuthorizationAssignments |
@AbapCatalog.sqlViewName: 'APS_COM_CSMPT'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
//@Search.searchable: true
@EndUserText.label: 'Custom Communication Scenarios'
//@ObjectModel.writeEnabled: true
//@ObjectModel.createEnabled:true
//@ObjectModel.deleteEnabled:true
//@ObjectModel.updateEnabled:true
define view aps_com_cs_csmpt
as select from APS_COM_CSCN_API_ROOT as application
// Count arrangements
left outer join aps_com_cs_ca_c on aps_com_cs_ca_c.CommunicationScenario = application.communication_scenario_id
//Join to the status of the scenario
left outer join aps_com_d_cscn on aps_com_d_cscn.communication_scenario_id = application.communication_scenario_id
left outer join aps_com_w_wl_prt on aps_com_w_wl_prt.profile = application.ob_oauth2_client_profile
and aps_com_w_wl_prt.langu = $session.system_language
left outer join aps_user_ddl as _User on _User.UserID = application.change_user
left outer join usr05 as user05 on user05.bname = $session.user
and user05.mandt = $session.client
and user05.parid = 'ATO_TEST_SERVICE'
left outer join ATOV_U_ITEMS_EXPORTED_AT as _Exported on _Exported.item_id = application.communication_scenario_id
and _Exported.item_type = 'COM_SCN'
inner join aps_com_c_cscn on application.communication_scenario_id = aps_com_c_cscn.communication_scenario_id
left outer join ato_setup as setup on setup.client = $session.client
// Association to assigned catalogs
association [0..*] to APS_COM_COMM_CSCNIB as _InboundServiceAssignment on _InboundServiceAssignment.CommScenID = $projection.CommScenID
association [0..*] to APS_COM_COMM_CSCNOB as _OutboundServiceAssignment on _OutboundServiceAssignment.CommScenID = $projection.CommScenID
association [0..*] to aps_com_cs_ca as _AssignedInArrangements on _AssignedInArrangements.CommunicationScenario = application.communication_scenario_id
association [0..*] to APS_COM_CS_AUTH as _AuthorizationAssignments on _AuthorizationAssignments.ScenarioId = $projection.CommScenID
{
//@Search:{ defaultSearchElement: true, ranking: #HIGH, fuzzinessThreshold: 0.8 }
key application.communication_scenario_id as CommScenID,
//@ObjectModel.readOnly: true
application.description as Description,
//@ObjectModel.readOnly: true
@Consumption.filter.hidden : true
application.change_timestamp as LastChangeTime,
//@ObjectModel.readOnly: true
//_User.UserDescription as LastChangedBy,
case
when setup.ext_dev_system = 'X' then _User.UserDescription
when user05.parva = 'X' then _User.UserDescription
else 'SYSTEM'
end as LastChangedBy,
//@ObjectModel.readOnly: true
@Consumption.filter.hidden : true
aps_com_d_cscn.vtr_number as VTRNumber,
//@ObjectModel.readOnly: true
@Consumption.filter.hidden : true
aps_com_d_cscn.vtr_status as VTRStatus,
//@ObjectModel.readOnly: true
@Consumption.filter.hidden : true
aps_com_d_cscn.vtr_symptom as VTRSymptom,
//@ObjectModel.readOnly: true
@Consumption.filter.hidden : true
case
when aps_com_d_cscn.status is null then 'X'
else aps_com_d_cscn.status
end as Status,
case
when (aps_com_d_cscn.status is null or aps_com_d_cscn.status = 'P') and (aps_com_d_cscn.vtr_number='' or aps_com_d_cscn.vtr_number is null) then 2 // Published
//when aps_com_d_cscn.status = 'U' and aps_com_d_cscn.vtr_number = '' then 1
when aps_com_d_cscn.destination_status = 'U' or aps_com_d_cscn.destination_status = '' then 1 // Unpublished
when aps_com_d_cscn.vtr_number != '' and aps_com_d_cscn.vtr_status = '' then 3 // Publishing
when aps_com_d_cscn.vtr_status != '' then 4 // Rejected
else 1
end as ActualStatus,
//@ObjectModel.readOnly: true
@Consumption.filter.hidden : true
aps_com_cs_ca_c.AssignedArrangementCount as AssignCount,
application.ob_oauth2_auth as ObOAuth2Active,
application.ob_oauth2_client_profile as ObOAuth2ClientProfile,
aps_com_w_wl_prt.description as ObOAuth2ClientProfileDesc,
application.ob_x509_auth as ObX509Auth,
application.ob_basic_auth as ObBasicAuth,
application.ob_oauth1_auth as ObOAuth1Active,
application.ob_none_auth as ObNoneAuth,
application.abap_language_version as AbapLanguageVersion,
case
when application.ob_oauth2_granttype = 0 then ''
else cast(application.ob_oauth2_granttype as abap.char(11))
end as ObOAuth2Granttype,
_Exported.exported_at as Exported,
case
when _Exported.exported_at is null then 'N'
when application.change_timestamp < _Exported.exported_at then 'Y'
else 'C'
end as ExportStatus,
//application.ob_oauth2_granttype as ObOAuth2Granttype,
_InboundServiceAssignment,
_OutboundServiceAssignment,
_AssignedInArrangements,
_AuthorizationAssignments
}
where
application.communication_scenario_id not like 'SAP_%'
and application.communication_scenario_type = #APS_COM_CSCN_TYPE.'1'
and // Customer Managed Scenarios
(
aps_com_c_cscn.scope_state = #APS_BC_SCOPE_STATE.'3'
or application.scope_dependent = ''
) // In Scope or NOT scope dependent
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA