I_PreAgrmtTradingContract
Trading Contract Header
I_PreAgrmtTradingContract is a Basic CDS View that provides data about "Trading Contract Header" in SAP S/4HANA. It reads from 2 data sources (wbhd, wbhk) and exposes 10 fields with key field TradingContract. It has 4 associations to related views.
Associations (4)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_PreAgrmtTradingContractItem | _TradingContractItem | $projection.TradingContract = _TradingContractItem.TradingContract |
| [0..1] | I_PreAgrmtTrdgContrTypeDesc | _TradingContractTypeDesc | $projection.TradingContractType = _TradingContractTypeDesc.TradingContractType |
| [0..1] | I_CompanyCode | _CompanyCode | $projection.CompanyCode = _CompanyCode.CompanyCode |
| [0..1] | E_TradingContract | _Extension | $projection.TradingContract = _Extension.TradingContract |
Annotations (13)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | IPPMGCONTR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| AccessControl.personalData.blocking | #REQUIRED | view | |
| VDM.viewType | #BASIC | view | |
| ObjectModel.representativeKey | TradingContract | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| EndUserText.label | Trading Contract Header | view |
Fields (10)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | TradingContract | wbhk | tkonn | |
| TradingContractType | wbhk | tctyp | ||
| elifnendasCounterparty | ||||
| CompanyCode | wbhk | company_code | ||
| TrdgContrApplicationStatus | wbhk | btbsta | ||
| TradingContractCurrency | wbhk | tkwaers | ||
| knumv_mmendasPrepaymentRefDocCondition | ||||
| _TradingContractItem | _TradingContractItem | |||
| _TradingContractTypeDesc | _TradingContractTypeDesc | |||
| _CompanyCode | _CompanyCode |
@AbapCatalog.sqlViewName : 'IPPMGCONTR'
@AbapCatalog.compiler.compareFilter : true
@AbapCatalog.preserveKey : true
@ClientHandling.algorithm : #SESSION_VARIABLE
@AccessControl.authorizationCheck : #CHECK
@Metadata.ignorePropagatedAnnotations : true
@AccessControl.personalData.blocking : #REQUIRED
@VDM.viewType : #BASIC
@ObjectModel.representativeKey : 'TradingContract'
@ObjectModel.usageType.serviceQuality : #A
@ObjectModel.usageType.sizeCategory : #L
@ObjectModel.usageType.dataClass : #TRANSACTIONAL
@EndUserText.label : 'Trading Contract Header'
define view I_PreAgrmtTradingContract
as select from wbhk inner join wbhd
on wbhk.tkonn = wbhd.tkonn and wbhd.tposn is initial and wbhd.tposn_sub is initial
association [0..*] to I_PreAgrmtTradingContractItem as _TradingContractItem on $projection.TradingContract = _TradingContractItem.TradingContract
association [0..1] to I_PreAgrmtTrdgContrTypeDesc as _TradingContractTypeDesc on $projection.TradingContractType = _TradingContractTypeDesc.TradingContractType
association [0..1] to I_CompanyCode as _CompanyCode on $projection.CompanyCode = _CompanyCode.CompanyCode
// Exntension view
association [0..1] to E_TradingContract as _Extension on $projection.TradingContract = _Extension.TradingContract
{
key wbhk.tkonn as TradingContract,
@ObjectModel.foreignKey.association: '_TradingContractTypeDesc'
wbhk.tctyp as TradingContractType,
case
when wbhk.kunnr is not initial then wbhk.kunnr
else wbhd.elifn end as Counterparty,
@ObjectModel.foreignKey.association: '_CompanyCode'
wbhk.company_code as CompanyCode,
wbhk.btbsta as TrdgContrApplicationStatus,
wbhk.tkwaers as TradingContractCurrency,
case when wbhk.knumv_sd is not initial then wbhk.knumv_sd
else wbhd.knumv_mm end as PrepaymentRefDocCondition,
// Associations
_TradingContractItem,
_TradingContractTypeDesc,
_CompanyCode
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"WBHD",
"WBHK"
],
"ASSOCIATED":
[
"E_TRADINGCONTRACT",
"I_COMPANYCODE",
"I_PREAGRMTTRADINGCONTRACTITEM",
"I_PREAGRMTTRDGCONTRTYPEDESC"
],
"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