C_SlsDocItmNonStdPartner is a Consumption CDS View that provides data about "Sls Doc Item Non Std Complete Partners" in SAP S/4HANA. It reads from 1 data source (I_SalesDocItemCompletePartner) and exposes 18 fields with key fields SalesDocument, SalesDocumentItem, PartnerFunction. It has 2 associations to related views.
@ClientHandling.algorithm: #SESSION_VARIABLE@AbapCatalog: {
sqlViewName: 'CSLSDOCITMNSPT',
preserveKey: true,
compiler.compareFilter: 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
}
}
@Metadata.ignorePropagatedAnnotations:true@EndUserText.label: 'Sls Doc Item Non Std Complete Partners'
defineview C_SlsDocItmNonStdPartner
asselectfrom I_SalesDocItemCompletePartner as ItemPartner
association [1] to I_PersonWorkAgreement_1 as _WorkAgreement on $projection.Personnel = _WorkAgreement.PersonWorkAgreement
association [1] to I_ContactPerson as _ContactPerson on $projection.ContactPerson = _ContactPerson.ContactPerson
{
@ObjectModel.foreignKey.association: '_SalesDocument'
key ItemPartner.SalesDocument,
@ObjectModel.foreignKey.association: '_SalesDocumentItem'
key ItemPartner.SalesDocumentItem,
@ObjectModel.foreignKey.association: '_PartnerFunction'
keycast(ItemPartner.PartnerFunction as parvw_unv preserving type ) as PartnerFunction,
_PartnerFunction._Text[1:Language = $session.system_language ].PartnerFunctionName as PartnerFunctionName,
_PartnerFunction.SDDocumentPartnerType,
ItemPartner.Customer,
ItemPartner.Supplier,
ItemPartner.ContactPerson,
ItemPartner.Personnel,
ItemPartner.AddressID,
ItemPartner.AddressPersonID,
// case// when Customer != ''
// then Customer
// when Supplier != ''
// then Supplier
// when Personnel != '00000000'
// thencast(Personnel as kunnr) // cast to get the same data element length and also APLHA conversion done
// when ContactPerson != '0000000000'
// thencast(ContactPerson as kunnr) // cast to get the same data element length and also APLHA conversion done
// else// ''
// endas BusinessPartner,
ItemPartner.Partner as BusinessPartner,
@Semantics.name.fullName: true@Semantics.text: true
ItemPartner.FullName as BusinessPartnerFullName,
// case// when ContactPerson != '0000000000'
// then coalesce(_DfltAddrRprstn.AddresseeFullName, cast(substring(replace(concat(_ContactPerson.FirstName, concat(' &@', _ContactPerson.LastName)), '&@', ''),1,80) as ad_namtext ) )
// when Personnel != '00000000'
// then// casewhen _WorkAgreement.PersonFullName is initial
// thencast( _WorkAgreement._WorkforcePerson.LastName as ad_namtext )
// else// _WorkAgreement.PersonFullName
// end// else// _DfltAddrRprstn.AddresseeFullName
// endas BusinessPartnerFullName,
// case AddressID
// when ''
// then// case// when ContactPerson != '0000000000'
// thencast(substring(replace(concat(_ContactPerson.FirstName,
// concat(' &@', _ContactPerson.LastName)), '&@', '') ,1,80) as ad_namtext )
// when Personnel != '00000000'
// then coalesce(_WorkAgreement.PersonFullName,
// _WorkAgreement._WorkforcePerson.LastName)
// else ''
// end// else// case// when ItemPartner.AddressObjectType = '1'
// thencast(concat_with_space(_OrganizationAddress.AddresseeName1,
// _OrganizationAddress.AddresseeName2, 1) as ad_namtext )
// when ItemPartner.AddressObjectType = '2'
// then _PersonAddress.PersonFullName
// when ItemPartner.AddressObjectType = '3'
// then _PersonWorkplaceAddress.PersonFullName
// else ''
// end// endas FullName,
// @Semantics.telephone.type: #WORK// case AddressID
// when ''
// then _WorkAgreement._WorkforcePerson._WorkplaceAddress.NormalizedPhoneNumber
// else _DfltAddrRprstn._CurrentDfltLandlinePhoneNmbr.InternationalPhoneNumber
// endas InternationalPhoneNumber,
//
//
//
// @Semantics.telephone.type: #CELL// case AddressID
// when ''
// then _WorkAgreement._WorkforcePerson._WorkplaceAddress.MblNormalizedPhoneNumber
// else _DfltAddrRprstn._CurrentDfltMobilePhoneNumber.InternationalPhoneNumber
// endas InternationalMobilePhoneNumber,
//
// @Semantics.eMail.address: true// @Semantics.eMail.type: #WORK// case AddressID
// when ''
// then _WorkAgreement._WorkforcePerson._WorkplaceAddress.DefaultEmailAddress
// else _DfltAddrRprstn._CurrentDfltEmailAddress.EmailAddress
// endas EmailAddress,
//
// @Semantics.address.country: true// case AddressID
// when ''
// then _WorkAgreement._WorkforcePerson._WorkplaceAddress.DestinationLocationCountry
// else _DfltAddrRprstn.Country
// endas Country,
// PartnerIsSpecificForSDDocItem,
ItemPartner._DfltAddrRprstn,
ItemPartner._SalesDocument,
ItemPartner._SalesDocumentItem,
ItemPartner._PartnerFunction,
//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
PartnerFunction != 'AG'
and PartnerFunction != 'WE'
and PartnerFunction != 'RE'
and PartnerFunction != 'RG'
and PartnerFunction != 'VE'
and PartnerFunction != 'ZM'