I_CUSTSALESPARTNERFUNC

CDS View

Customer Sales Area Partner Function

I_CUSTSALESPARTNERFUNC is a CDS View in S/4HANA. Customer Sales Area Partner Function. It contains 12 fields. 7 CDS views read from this table.

CDS Views using this table (7)

ViewTypeJoinVDMDescription
/SCMTMS/CV_BPOrgRelshp view from BOPF: /SCMTMS/BuPa Org Relationship
A_CustSalesPartnerFunc view from BASIC Sales Partner Functions
C_SupplierDfltReturnToAddr view inner CONSUMPTION Supplier Default Return to Address
I_BPAddlCustPartFuncTP view from TRANSACTIONAL BO view for Additional Partner Functions
I_BPCustPartnerFunctionGov view_entity union_all COMPOSITE BP Customer Partner Function Governance
P_ARCustSalesPartnerFunc view from CONSUMPTION Customer Sales Area Partner Function
P_SuplrReturnToPartnerFunction view union COMPOSITE

Fields (12)

KeyField CDS FieldsUsed in Views
KEY Customer Customer,CustomerForEdit 3
KEY DistributionChannel DistributionChannel,DistributionChannelForEdit 4
KEY Division Division,DivisionForEdit 4
KEY PartnerCounter PartnerCounter,PartnerCounterForEdit 3
KEY PartnerFunction PartnerFunction,PartnerFunctionForEdit 3
KEY SalesOrganization SalesOrganization,SalesOrganizationForEdit 4
BPCustomerNumber BPCustomerNumber 4
ContactPerson ContactPerson 1
CustomerPartnerDescription CustomerPartnerDescription 2
DefaultPartner DefaultPartner 3
PartnerFunctionType PartnerFunctionType 1
PersonnelNumber PersonnelNumber 1
@AbapCatalog.sqlViewName: 'ICUSTPARTNERFUNC'
@VDM.viewType: #BASIC
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@Analytics: {
  dataCategory: #DIMENSION,
  dataExtraction: {
    enabled: true,
    delta.changeDataCapture: {
      automatic: true
    }
  }
}
@ObjectModel.representativeKey:'PartnerFunction'
@AccessControl.privilegedAssociations:  [ '_CustSalesPartnerCounter' ]
@Metadata.allowExtensions:true
@AccessControl.personalData.blocking: #REQUIRED
@AccessControl.personalData.blockingIndicator: '_Customer.IsBusinessPurposeCompleted'
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.supportedCapabilities: [#SQL_DATA_SOURCE,
                                     #CDS_MODELING_DATA_SOURCE,
                                     #CDS_MODELING_ASSOCIATION_TARGET,
                                     #EXTRACTION_DATA_SOURCE]
@ObjectModel.modelingPattern: #NONE                                     
@ObjectModel.usageType.serviceQuality: #A
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MASTER
@EndUserText.label: 'Customer Sales Area Partner Function'
@Metadata.ignorePropagatedAnnotations: true

//@VDM.lifecycle.status: #DEPRECATED

//@VDM.lifecycle.successor: 'I_CustSalesPartnerFunc_2' 


define view I_CustSalesPartnerFunc as select from knvp
inner join tpar on knvp.parvw = tpar.parvw
association[1..1] to I_CustomerSalesArea as _CustomerSalesArea on $projection.Customer =  _CustomerSalesArea.Customer 
                                                               and $projection.SalesOrganization =  _CustomerSalesArea.SalesOrganization 
                                                               and $projection.DistributionChannel =  _CustomerSalesArea.DistributionChannel
                                                               and $projection.Division =  _CustomerSalesArea.Division 

association[1..1] to I_Customer as _Customer on $projection.Customer =  _Customer.Customer
association [0..1] to I_SalesOrganization    as _SalesOrganization   on  $projection.SalesOrganization = _SalesOrganization.SalesOrganization  
association [0..1] to I_DistributionChannel  as _DistributionChannel on  $projection.DistributionChannel = _DistributionChannel.DistributionChannel
association [0..1] to I_Division             as _Division            on  $projection.Division = _Division.Division
//association [0..1] to I_PartnerFunction      as _PartnerFunction     on $projection.PartnerFunction = _PartnerFunction.PartnerFunction 

association [0..1] to I_CustSalesPartnerCounter     as _CustSalesPartnerCounter     on $projection.PartnerCounter = _CustSalesPartnerCounter.PartnerCounter  
{
  @ObjectModel.foreignKey.association: '_Customer'
  key knvp.kunnr                                                      as Customer,
  @ObjectModel.foreignKey.association: '_SalesOrganization'
  key knvp.vkorg                                                      as SalesOrganization,
  @ObjectModel.foreignKey.association: '_DistributionChannel'
  key knvp.vtweg                                                      as DistributionChannel,
  @ObjectModel.foreignKey.association: '_Division'
  key knvp.spart                                                      as Division,
  @ObjectModel.foreignKey.association: '_CustSalesPartnerCounter'
  key knvp.parza                                                      as PartnerCounter,
  //@ObjectModel.foreignKey.association: '_PartnerFunction'

  key knvp.parvw                                                      as PartnerFunction, //partner role

       tpar.nrart                                                      as PartnerFunctionType,
      case
        when tpar.nrart = 'KU'
          then knvp.kunn2
        when tpar.nrart = 'LI'
          then knvp.lifnr
        when tpar.nrart = 'AP'
          then knvp.parnr
        when tpar.nrart = 'PE'
          then knvp.pernr
        else ''
      end as BPCustomerNumber,
      //knvp.kunn2                                                      as BPCustomerNumber,

      knvp.knref                                                      as CustomerPartnerDescription,
      knvp.defpa                                                      as DefaultPartner,
      knvp.lifnr                                                      as Supplier,
      knvp.pernr                                                      as PersonnelNumber,
      knvp.parnr                                                      as ContactPerson,
      knvp.adrnr                                                      as AddressID,

      //_CustomerSalesArea._Customer.AuthorizationGroup, *Field removed to reduce complexity, use from association instead*

      _CustomerSalesArea,
      _Customer,
      _SalesOrganization,
      _DistributionChannel,
      _Division,
    //  _PartnerFunction,

     _CustSalesPartnerCounter 
    
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"KNVP",
"TPAR"
],
"ASSOCIATED":
[
"I_CUSTOMER",
"I_CUSTOMERSALESAREA",
"I_CUSTSALESPARTNERCOUNTER",
"I_DISTRIBUTIONCHANNEL",
"I_DIVISION",
"I_SALESORGANIZATION"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/