P_TradingContractCounterparty
P_TradingContractCounterparty is a Basic CDS View in SAP S/4HANA. It reads from 2 data sources (kna1, lfa1) and exposes 8 fields with key field Counterparty.
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCOUNTERPARTY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ClientHandling.type | #INHERITED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #BASIC | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #A | view | |
| ObjectModel.usageType.sizeCategory | #XL | view |
Fields (8)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | Counterparty | kunnr | ||
| CustomerName | ||||
| ACMCounterpartyFirstName | name1 | |||
| ACMCounterpartyLastName | name2 | |||
| CustomerName | ||||
| ACMCounterpartyFirstName | name1 | |||
| ACMCounterpartyLastName | name2 | |||
| IsBusinessPurposeCompleted | cvp_xblck |
@AbapCatalog.sqlViewName: 'PCOUNTERPARTY'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@ClientHandling.type: #INHERITED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #BASIC
@VDM.private: true
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
@ObjectModel.usageType.serviceQuality: #A // Changed from #C
@ObjectModel.usageType.sizeCategory: #XL
//define view P_TradingContractCounterparty as select from I_Customer {
// key Customer as Counterparty,
// CustomerName,
// CustomerFullName as CounterpartyFullName
//} where DeletionIndicator is initial
//
//union
//
//select from I_Supplier {
// key Supplier as Counterparty,
// SupplierName as CustomerName,
// SupplierFullName as CounterpartyFullName
//} where DeletionIndicator is initial
define view P_TradingContractCounterparty
as select from kna1
{
@ObjectModel.text.element: ['CustomerName']
key kunnr as Counterparty,
@Semantics.text:true
cast(substring(rtrim(replace(concat(name1, concat(' &@', name2)), '&@', ''),' '),1,80) as md_customer_name) as CustomerName,
ltrim(cast(concat( concat(concat( concat(concat_with_space( anred, name1, 1 ), '/' ), stras ), '/'),
concat_with_space(concat_with_space(ort01,regio, 1 ), pstlz,1 ) ) as md_customer_full_name) , ' ' ) as CounterpartyFullName, //KF: different with S4
name1 as ACMCounterpartyFirstName, //+Free Text Search
name2 as ACMCounterpartyLastName, //+Free Text Search
cvp_xblck as IsBusinessPurposeCompleted
}
where
loevm is initial
union
select from lfa1
{
key lifnr as Counterparty,
@Semantics.text: true
cast(substring(rtrim(replace(concat(name1, concat(' &@', name2)), '&@', ''),' '),1,80) as md_supplier_name) as CustomerName,
ltrim(cast(concat( concat(concat( concat(concat_with_space( anred, name1, 1 ), '/' ),stras ), '/'),
concat_with_space(concat_with_space(ort01,regio, 1 ), pstlz,1 ) ) as md_supplier_full_name) , ' ' ) as CounterpartyFullName,
name1 as ACMCounterpartyFirstName, //+Free Text Search
name2 as ACMCounterpartyLastName, //+Free Text Search
cvp_xblck as IsBusinessPurposeCompleted
}
where
loevm is initial
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"KNA1",
"LFA1"
],
"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