I_BPCustomerSalesAddressInfo

DDL: I_BPCUSTOMERSALESADDRESSINFO SQL: IBPCUSTSLSADDR Type: view BASIC

BP and Cust sls Addr Depdnt Info

I_BPCustomerSalesAddressInfo is a Basic CDS View that provides data about "BP and Cust sls Addr Depdnt Info" in SAP S/4HANA. It reads from 2 data sources (I_BusPartAddress, I_Businesspartnersalesarea) and exposes 49 fields with key fields BusinessPartner, AddressID, Customer, SalesOrganization, DistributionChannel. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_BusPartAddress BusinessPartnerAddress from
I_Businesspartnersalesarea Businesspartnersalesarea inner

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_BusinessPartner _BusinessPartner _BusinessPartner.BusinessPartner = $projection.BusinessPartner
[1..1] I_Customer _Customer $projection.Customer = _Customer.Customer

Annotations (12)

NameValueLevelField
AbapCatalog.sqlViewName IBPCUSTSLSADDR view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label BP and Cust sls Addr Depdnt Info view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XXL view
ObjectModel.usageType.dataClass #MASTER view
VDM.viewType #BASIC view

Fields (49)

KeyFieldSource TableSource FieldDescription
KEY BusinessPartner I_BusPartAddress BusinessPartner
KEY AddressID I_BusPartAddress AddressID
KEY Customer I_Businesspartnersalesarea Customer
KEY SalesOrganization I_Businesspartnersalesarea SalesOrganization
KEY DistributionChannel I_Businesspartnersalesarea DistributionChannel
KEY Division I_Businesspartnersalesarea Division
IncotermsVersionendasIncotermsVersion
SalesOfficeendasSalesOffice
SalesGroupendasSalesGroup
SupplyingPlantendasSupplyingPlant
CustomerGroup CustomerGroup
AccountByCustomer AccountByCustomer
CustomerABCClassification CustomerABCClassification
Currency Currency
CustomerPriceGroup CustomerPriceGroup
DeliveryPriority DeliveryPriority
OrderCombinationIsAllowed OrderCombinationIsAllowed
CompleteDeliveryIsDefined CompleteDeliveryIsDefined
PartialDeliveryIsAllowed PartialDeliveryIsAllowed
CustomerPaymentTerms CustomerPaymentTerms
CustomerAccountAssignmentGroup CustomerAccountAssignmentGroup
SalesDistrict SalesDistrict
OrderIsBlockedForCustomer OrderIsBlockedForCustomer
PriceListType PriceListType
AuthorizationGroup _Customer AuthorizationGroup
InvoiceListSchedule InvoiceListSchedule
ExchangeRateType ExchangeRateType
ItemOrderProbabilityInPercent ItemOrderProbabilityInPercent
AdditionalCustomerGroup1 AdditionalCustomerGroup1
AdditionalCustomerGroup2 AdditionalCustomerGroup2
AdditionalCustomerGroup3 AdditionalCustomerGroup3
AdditionalCustomerGroup4 AdditionalCustomerGroup4
AdditionalCustomerGroup5 AdditionalCustomerGroup5
UnderdelivTolrtdLmtRatioInPct UnderdelivTolrtdLmtRatioInPct
OverdelivTolrtdLmtRatioInPct OverdelivTolrtdLmtRatioInPct
MaxNmbrOfPartialDelivery MaxNmbrOfPartialDelivery
SuplrIsRlvtForSettlmtMgmt SuplrIsRlvtForSettlmtMgmt
ProductUnitGroup ProductUnitGroup
SlsDocIsRlvtForProofOfDeliv SlsDocIsRlvtForProofOfDeliv
SlsUnlmtdOvrdelivIsAllwd SlsUnlmtdOvrdelivIsAllwd
CreditControlArea CreditControlArea
CustomerIsRebateRelevant CustomerIsRebateRelevant
InspSbstHasNoTimeOrQuantity InspSbstHasNoTimeOrQuantity
ManualInvoiceMaintIsRelevant ManualInvoiceMaintIsRelevant
SalesItemProposal SalesItemProposal
CustProdProposalProcedure CustProdProposalProcedure
_BusinessPartner _BusinessPartner
_BPProtectedAddress _BPProtectedAddress
_Customer _Customer
@AbapCatalog.sqlViewName: 'IBPCUSTSLSADDR'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@AccessControl.personalData.blocking: #REQUIRED
@EndUserText.label: 'BP and Cust sls Addr Depdnt Info'
@ClientHandling.algorithm : #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MASTER
@VDM.viewType: #BASIC

define view I_BPCustomerSalesAddressInfo
  as select from           I_BusPartAddress            as BusinessPartnerAddress
    inner join             I_Businesspartnersalesarea  as Businesspartnersalesarea  on BusinessPartnerAddress.BusinessPartner = Businesspartnersalesarea.BusinessPartner
    left outer to one join I_CustSlsAreaAddrDepdntInfo as CustSlsAreaAddrDepdntInfo on  Businesspartnersalesarea.Customer            = CustSlsAreaAddrDepdntInfo.Customer
                                                                                    and BusinessPartnerAddress.AddressID             = CustSlsAreaAddrDepdntInfo.AddressID
                                                                                    and Businesspartnersalesarea.SalesOrganization   = CustSlsAreaAddrDepdntInfo.SalesOrganization
                                                                                    and Businesspartnersalesarea.DistributionChannel = CustSlsAreaAddrDepdntInfo.DistributionChannel
                                                                                    and Businesspartnersalesarea.Division            = CustSlsAreaAddrDepdntInfo.Division
  association [1..1] to I_BusinessPartner as _BusinessPartner on _BusinessPartner.BusinessPartner = $projection.BusinessPartner
  association [1..1] to I_Customer        as _Customer        on $projection.Customer = _Customer.Customer
{

  key BusinessPartnerAddress.BusinessPartner                          as BusinessPartner,
  key BusinessPartnerAddress.AddressID                                as AddressID,
  key Businesspartnersalesarea.Customer                               as Customer,
  key Businesspartnersalesarea.SalesOrganization                      as SalesOrganization,
  key Businesspartnersalesarea.DistributionChannel                    as DistributionChannel,
  key Businesspartnersalesarea.Division                               as Division,
      // Fields common to both KNVV_ADDR and KNVV tables

      // When an address number exists for customer sales address depdedent information, Fetch data from KNVV_ADDR table

      // Else fetch data from KNVV table

      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.IncotermsClassification
      else Businesspartnersalesarea.IncotermsClassification end       as IncotermsClassification,

      //      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.IncotermsTransferLocation

      //      else  Businesspartnersalesarea.IncotermsTransferLocation end   as IncotermsTransferLocation,


      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.IncotermsLocation1
      else  Businesspartnersalesarea.IncotermsLocation1 end           as IncotermsLocation1,

      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.IncotermsLocation2
      else  Businesspartnersalesarea.IncotermsLocation2 end           as IncotermsLocation2,

      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.IncotermsVersion
      else  Businesspartnersalesarea.IncotermsVersion end             as IncotermsVersion,

      //      A delivery block value in the address-independent table KNVV shall count more than ‘No delivery block’ for any specific address.

      //If for a specific combination (customer + address) a value is maintained, then this value has preference over the generic (address-independent) value in KNVV.


      case when ( CustSlsAreaAddrDepdntInfo.AddressID is not initial and CustSlsAreaAddrDepdntInfo.DeliveryIsBlocked is not initial )
      then CustSlsAreaAddrDepdntInfo.DeliveryIsBlocked
      else  Businesspartnersalesarea.DeliveryIsBlockedForCustomer end as DeliveryIsBlocked,

      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.SalesOffice
      else  Businesspartnersalesarea.SalesOffice end                  as SalesOffice,

      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.SalesGroup
      else  Businesspartnersalesarea.SalesGroup end                   as SalesGroup,

      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.SupplyingPlant
      else  Businesspartnersalesarea.SupplyingPlant end               as SupplyingPlant,

      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.IncotermsSupChnLoc1AddlUUID
      else  Businesspartnersalesarea.IncotermsSupChnLoc1AddlUUID end             as IncotermsSupChnLoc1AddlUUID,

      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.IncotermsSupChnLoc2AddlUUID
      else  Businesspartnersalesarea.IncotermsSupChnLoc2AddlUUID end             as IncotermsSupChnLoc2AddlUUID,

      case when CustSlsAreaAddrDepdntInfo.AddressID is not initial then CustSlsAreaAddrDepdntInfo.IncotermsSupChnDvtgLocAddlUUID
      else  Businesspartnersalesarea.IncotermsSupChnDvtgLocAddlUUID end             as IncotermsSupChnDvtgLocAddlUUID,

      // KNVV only fields

      CustomerGroup,
      AccountByCustomer,
      CustomerABCClassification,
      Currency,
      CustomerPriceGroup,
      //CustomerPricingProcedure,

      DeliveryPriority,
      OrderCombinationIsAllowed,
      //DeliveryIsBlockedForCustomer,

      CompleteDeliveryIsDefined,
      PartialDeliveryIsAllowed,
      // InvoiceDate,

      CustomerPaymentTerms,
      CustomerAccountAssignmentGroup,
      SalesDistrict,
      OrderIsBlockedForCustomer, //not in UI

      PriceListType,             //not in UI

      _Customer.AuthorizationGroup                                    as AuthorizationGroup,
      //PaymentGuaranteeProcedure,

      InvoiceListSchedule,
      ExchangeRateType,
      ItemOrderProbabilityInPercent,
      AdditionalCustomerGroup1,
      AdditionalCustomerGroup2,
      AdditionalCustomerGroup3,
      AdditionalCustomerGroup4,
      AdditionalCustomerGroup5,
      UnderdelivTolrtdLmtRatioInPct,
      OverdelivTolrtdLmtRatioInPct,
      MaxNmbrOfPartialDelivery,
      SuplrIsRlvtForSettlmtMgmt,
      ProductUnitGroup,
      SlsDocIsRlvtForProofOfDeliv,
      SlsUnlmtdOvrdelivIsAllwd,
      CreditControlArea,
      CustomerIsRebateRelevant,
      InspSbstHasNoTimeOrQuantity,
      ManualInvoiceMaintIsRelevant,
      SalesItemProposal,
      CustProdProposalProcedure,

      _BusinessPartner,
      _BPProtectedAddress,
      _Customer

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSPARTNERSALESAREA",
"I_BUSPARTADDRESS",
"I_CUSTOMER",
"I_CUSTSLSAREAADDRDEPDNTINFO"
],
"ASSOCIATED":
[
"I_BPPROTECTEDADDRESS",
"I_BUSINESSPARTNER",
"I_CUSTOMER"
],
"BASE":
[
"I_BUSPARTADDRESS"
],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/