@AccessControl.authorizationCheck: #MANDATORY
@VDM.viewType: #BASIC
@VDM.private: true
@ObjectModel.usageType.dataClass: #MASTER
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #M
@Metadata.ignorePropagatedAnnotations: true
define view entity P_ACMTrdgContrCounterPty
as select from kna1
{
@ObjectModel.text.element: ['CustomerName']
key cast(kna1.kunnr as kunnr preserving type) 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 cast(lfa1.lifnr as lifnr preserving type) as Counterparty,
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":""
}
}*/