@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog: {
sqlViewName: 'CSLSDOCNSTDPT',
compiler.compareFilter: true ,
preserveKey: true
}
@AccessControl: {
authorizationCheck: #CHECK,
personalData.blocking: #('TRANSACTIONAL_DATA'),
privilegedAssociations: [ '_DfltAddrRprstn' ]
}
@VDM: {
viewType: #CONSUMPTION,
lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@ObjectModel: {
representativeKey: 'PartnerFunction',
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #C,
sizeCategory: #XL
}
}
@EndUserText.label : 'SD Document Non Std Complete Partners'
@Metadata.ignorePropagatedAnnotations:true
define view C_SlsDocNonStdPartner
as select from I_SDDocumentCompletePartners
// association [1] to I_WorkforcePerson as _WorkforcePerson on $projection.Customer = _WorkforcePerson.Person
// association [1] to I_PersonWorkAgreement_1 as _WorkAgreement on $projection.Personnel = _WorkAgreement.PersonWorkAgreement
association [1] to I_SalesDocument as _SalesDocument on $projection.SDDocument = _SalesDocument.SalesDocument
association [1] to I_SalesDocumentItem as _SalesDocumentItem on $projection.SDDocument = _SalesDocumentItem.SalesDocument
and $projection.SDDocumentItem = _SalesDocumentItem.SalesDocumentItem
association [1] to I_SalesDocumentPartner as _AdditionalPartners on $projection.SDDocument = _AdditionalPartners.SalesDocument
and $projection.PartnerFunction = _AdditionalPartners.PartnerFunction
{
@ObjectModel.foreignKey.association : '_SalesDocument'
key SDDocument,
@ObjectModel.foreignKey.association : '_SalesDocumentItem'
key SDDocumentItem,
@ObjectModel.foreignKey.association : '_PartnerFunction'
key cast (PartnerFunction as parvw_unv preserving type ) as PartnerFunction,
_PartnerFunction._Text[1:Language = $session.system_language ].PartnerFunctionName,
_PartnerFunction.SDDocumentPartnerType,
Customer,
Supplier,
@ObjectModel.text.element: [ 'BusinessPartnerFullName' ]
// case
// when Customer != ''
// then Customer
// when Supplier != ''
// then Supplier
// when Personnel != '00000000'
// then cast (Personnel as kunnr) // cast to get the same data element length and also APLHA conversion done
// when ContactPerson != '0000000000'
// then cast (ContactPerson as kunnr) // cast to get the same data element length and also APLHA conversion done
// else
// ''
// end as BusinessPartner,
_AdditionalPartners.Partner as BusinessPartner,
@Semantics.name.fullName: true
@Semantics.text: true
// case
// when ContactPerson != '0000000000'
// then coalesce(_DfltAddrRprstn.AddresseeFullName, cast (substring(replace(concat(_ContactPerson.FirstName, concat(' &@', _ContactPerson.LastName)), '&@', ''),1,80) as adfullname ) )
// when Personnel != '00000000'
// then
// case when _WorkAgreement.PersonFullName is initial
// then cast ( _WorkAgreement._WorkforcePerson.LastName as adfullname )
// else
// _WorkAgreement.PersonFullName
// end
// else
// _DfltAddrRprstn.AddresseeFullName
// end as BusinessPartnerFullName,
_AdditionalPartners.FullName as BusinessPartnerFullName,
Personnel,
AddressID,
AddressPersonID,
@ObjectModel.foreignKey.association : '_ContactPerson'
ContactPerson,
PartnerIsOneTimeAccount,
VATRegistration,
_PartnerFunction,
_DfltAddrRprstn,
_ContactPerson,
// _WorkforcePerson,
// _WorkAgreement,
_SalesDocument,
_SalesDocumentItem,
_AdditionalPartners,
//added for 2202 release : Fetch address info
@Semantics.text:true
@Consumption.filter .hidden: true
@ObjectModel.virtualElement: true
@ObjectModel.virtualElementCalculatedBy : 'ABAP:CL_MCC_SLS_DOC_VE'
cast ( ' ' as ad_line_s ) as FormattedPostalAddressDesc
}
where
SDDocumentItem = '000000'
and PartnerFunction != 'AG'
and PartnerFunction != 'WE'
and PartnerFunction != 'RE'
and PartnerFunction != 'RG'
and PartnerFunction != 'VE'
and PartnerFunction != 'ZM'
/*+[internal] {
"BASEINFO":
{
"FROM ":
[
"I_PARTNERFUNCTION",
"I_PARTNERFUNCTIONTEXT",
"I_SALESDOCUMENTPARTNER",
"I_SDDOCUMENTCOMPLETEPARTNERS"
],
"ASSOCIATED":
[
"I_ADDRESS_2",
"I_CONTACTPERSON",
"I_PARTNERFUNCTION",
"I_SALESDOCUMENT",
"I_SALESDOCUMENTITEM",
"I_SALESDOCUMENTPARTNER"
],
"BASE":
[
"I_SDDOCUMENTCOMPLETEPARTNERS"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Depth:
1
2
3
4
5
All
Reload
C_SlsDocNonStdPartner view