SMTGTemplateCounter
Counter for the available Templates
SMTGTemplateCounter is a CDS View that provides data about "Counter for the available Templates" in SAP S/4HANA. It reads from 2 data sources (smtg_tmpl_hdr, ARS_APIS_RELEASED_FOR_C1) and exposes 2 fields with key field KeyField.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| smtg_tmpl_hdr | Header | from |
| ARS_APIS_RELEASED_FOR_C1 | released | left_outer |
Annotations (3)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | SMTG_V_TMPL_NUM | view | |
| EndUserText.label | Counter for the available Templates | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (2)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | KeyField | |||
| NumberOfCustom |
@AbapCatalog.sqlViewName: 'SMTG_V_TMPL_NUM'
@EndUserText.label: 'Counter for the available Templates'
@AccessControl.authorizationCheck:#NOT_REQUIRED
define view SMTGTemplateCounter as select from smtg_tmpl_hdr as Header
left outer join ARS_APIS_RELEASED_FOR_C1 as released on Header.id = released.tadir_obj_name {
key 'COUNTER' as KeyField,
sum(
case Header.is_predelivered when 'X' then
( case Header.smtg_version when 0 then
1 else
( case released.tadir_obj_name when Header.id then
1 else
0 end )
end )
else 0 end ) as NumberOfPredelivered,
sum( case Header.is_predelivered when ' ' then 1 else 0 end ) as NumberOfCustom
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"ARS_APIS_RELEASED_FOR_C1",
"SMTG_TMPL_HDR"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
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