I_BPSupplierAddrDepdntGenInfo

DDL: I_BPSUPPLIERADDRDEPDNTGENINFO SQL: IBPSUPLADDRINFO Type: view COMPOSITE

BP Supp Add Dep Gen Info

I_BPSupplierAddrDepdntGenInfo is a Composite CDS View that provides data about "BP Supp Add Dep Gen Info" in SAP S/4HANA. It reads from 2 data sources (I_BusPartAddress, I_BusinessPartnerSupplier) and exposes 45 fields with key fields BusinessPartner, AddressID. It has 3 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_BusPartAddress BusinessPartnerAddress from
I_BusinessPartnerSupplier BusinessPartnerSupplier inner

Associations (3)

CardinalityTargetAliasCondition
[1..1] I_BusinessPartner _BusinessPartner _BusinessPartner.BusinessPartner = $projection.BusinessPartner
[1..1] I_Supplier _Supplier $projection.Supplier = _Supplier.Supplier
[1..1] I_BPCurrentDefaultAddress _DefaultAddress _DefaultAddress.BusinessPartner = $projection.BusinessPartner

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IBPSUPLADDRINFO view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label BP Supp Add Dep Gen Info view
AccessControl.personalData.blocking #REQUIRED 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 #COMPOSITE view

Fields (45)

KeyFieldSource TableSource FieldDescription
KEY BusinessPartner I_BusPartAddress BusinessPartner
KEY AddressID I_BusPartAddress AddressID
Supplier I_BusinessPartnerSupplier Supplier
TrainStationNameendasTrainStationName
FactoryCalendarendasFactoryCalendar
SupplierAccountGroup I_BusinessPartnerSupplier SupplierAccountGroup
TitleSupplier I_BusinessPartnerSupplier FormOfAddress
InternationalLocationNumber1 I_BusinessPartnerSupplier InternationalLocationNumber1
InternationalLocationNumber2 I_BusinessPartnerSupplier InternationalLocationNumber2
InternationalLocationNumber3 I_BusinessPartnerSupplier InternationalLocationNumber3
ReferenceAccountGroup I_BusinessPartnerSupplier ReferenceAccountGroup
SupplierAlternativePayee I_BusinessPartnerSupplier SupplierAlternativePayee
Customer I_BusinessPartnerSupplier Customer
PostingIsBlocked I_BusinessPartnerSupplier PostingIsBlocked
PurchasingIsBlocked I_BusinessPartnerSupplier PurchasingIsBlocked
VATLiability I_BusinessPartnerSupplier VATLiability
PaymentIsBlockedForSupplier I_BusinessPartnerSupplier PaymentIsBlockedForSupplier
SuplrProofOfDelivRlvtCode I_BusinessPartnerSupplier SuplrProofOfDelivRlvtCode
BR_TaxIsSplit I_BusinessPartnerSupplier BR_TaxIsSplit
IsActiveEntity
AuthorizationGroup I_BusinessPartnerSupplier AuthorizationGroup
SupplierCorporateGroup I_BusinessPartnerSupplier SupplierCorporateGroup
ResponsibleType I_BusinessPartnerSupplier ResponsibleType
FiscalAddress I_BusinessPartnerSupplier FiscalAddress
SupplierProcurementBlock I_BusinessPartnerSupplier SupplierProcurementBlock
DataExchangeInstructionKey I_BusinessPartnerSupplier DataExchangeInstructionKey
BPIsEqualizationTaxSubject I_BusinessPartnerSupplier BPIsEqualizationTaxSubject
BRSpcfcTaxBasePercentageCode I_BusinessPartnerSupplier BRSpcfcTaxBasePercentageCode
DataMediumExchangeIndicator I_BusinessPartnerSupplier DataMediumExchangeIndicator
TaxNumberResponsible I_BusinessPartnerSupplier TaxNumberResponsible
TaxNumberType I_BusinessPartnerSupplier TaxNumberType
SuplrQualityManagementSystem I_BusinessPartnerSupplier SuplrQualityManagementSystem
SuplrQltyInProcmtCertfnValidTo I_BusinessPartnerSupplier SuplrQltyInProcmtCertfnValidTo
SupplierIsSubRangeRelevant I_BusinessPartnerSupplier SupplierIsSubRangeRelevant
AlternativePayeeIsAllowed I_BusinessPartnerSupplier AlternativePayeeIsAllowed
PaytSlipWthRefSubscriber I_BusinessPartnerSupplier PaytSlipWthRefSubscriber
SupplierIsPlantRelevant I_BusinessPartnerSupplier SupplierIsPlantRelevant
SupplierPlant I_BusinessPartnerSupplier SupplierPlant
DeletionIndicator I_BusinessPartnerSupplier DeletionIndicator
IsBusinessPurposeCompleted I_BusinessPartnerSupplier IsBusinessPurposeCompleted
PaymentReason I_BusinessPartnerSupplier PaymentReason
SupplierCentralDeletionIsBlock I_BusinessPartnerSupplier SupplierCentralDeletionIsBlock
_BusinessPartner _BusinessPartner
_Supplier _Supplier
_DefaultAddress _DefaultAddress
@AbapCatalog.sqlViewName: 'IBPSUPLADDRINFO'
@AbapCatalog.compiler.compareFilter: true
//@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #MANDATORY
@EndUserText.label: 'BP Supp Add Dep Gen Info'
@AccessControl.personalData.blocking: #REQUIRED
@ClientHandling.algorithm : #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType.serviceQuality: #C
@ObjectModel.usageType.sizeCategory: #XXL
@ObjectModel.usageType.dataClass: #MASTER
@VDM.viewType: #COMPOSITE

define view I_BPSupplierAddrDepdntGenInfo
  as select from           I_BusPartAddress            as BusinessPartnerAddress
    inner join             I_BusinessPartnerSupplier   as BusinessPartnerSupplier   on BusinessPartnerAddress.BusinessPartner = BusinessPartnerSupplier.BusinessPartner
    left outer to one join I_SupplierAddrDepdntGeneral as SuplAddrDepdntInformation on  BusinessPartnerSupplier.Supplier = SuplAddrDepdntInformation.Supplier
                                                                                    and BusinessPartnerAddress.AddressID = SuplAddrDepdntInformation.AddressID

  association [1..1] to I_BusinessPartner as _BusinessPartner on _BusinessPartner.BusinessPartner = $projection.BusinessPartner
  association [1..1] to I_Supplier        as _Supplier        on $projection.Supplier = _Supplier.Supplier
  association [1..1] to I_BPCurrentDefaultAddress as _DefaultAddress  on _DefaultAddress.BusinessPartner = $projection.BusinessPartner
  
{

  key BusinessPartnerAddress.BusinessPartner                         as BusinessPartner,
  key BusinessPartnerAddress.AddressID                               as AddressID,
      BusinessPartnerSupplier.Supplier                               as Supplier,
      // Logic to determine Supplier address number: If Address is marked as standard address at business partner level, then check if any addr dependent info is maintained in lfa1_addr,

      // If addr dependent data is maintained use 'lfa1_addr' tables address number If no deviation data is maintained, fallback to 'lfa1' tables addr number

      // For a non standard BP address with no address dependent data , The address number will be fetched from 'LFA1' table

      // Fields common to both LFA1_ADDR and LFA1 tables

      // When an address number exists for Supplier address depdedent information, Fetch data from LFA1_ADDR table

      // Else fetch data from LFA1 table

      case when SuplAddrDepdntInformation.AddressID is not initial then SuplAddrDepdntInformation.TrainStationName
      else  BusinessPartnerSupplier.TrainStationName end as TrainStationName,

      case when SuplAddrDepdntInformation.AddressID is not initial then SuplAddrDepdntInformation.FactoryCalendar
      else  BusinessPartnerSupplier.FactoryCalendar end as FactoryCalendar,

      case when SuplAddrDepdntInformation.AddressID is not initial then SuplAddrDepdntInformation.TranspServiceAgentStstcGrp
      else  BusinessPartnerSupplier.TranspServiceAgentStstcGrp end as TranspServiceAgentStstcGrp,

      case when SuplAddrDepdntInformation.AddressID is not initial then SuplAddrDepdntInformation.IsToBeAcceptedAtOrigin
      else  BusinessPartnerSupplier.IsToBeAcceptedAtOrigin end as IsToBeAcceptedAtOrigin,

      //case when SuplAddrDepdntInformation.AddressID is not initial then SuplAddrDepdntInformation.SuplrTaxAuthorityAccountNumber

      //else  BusinessPartnerSupplier.SuplrTaxAuthorityAccountNumber end as SuplrTaxAuthorityAccountNumber,


      // LFA1 fields

      BusinessPartnerSupplier.SupplierAccountGroup,
      //BusinessPartnerSupplier.FormOfAddress,

      BusinessPartnerSupplier.FormOfAddress as TitleSupplier,
      BusinessPartnerSupplier.InternationalLocationNumber1,
      BusinessPartnerSupplier.InternationalLocationNumber2,
      BusinessPartnerSupplier.InternationalLocationNumber3,
      //@ObjectModel.text.association: '_ReferenceAccountGroupText'

      BusinessPartnerSupplier.ReferenceAccountGroup,
      //@Consumption.valueHelp: '_SupplierAlternativePayee'

      //@ObjectModel.foreignKey.association: '_SupplierAlternativePayee'

      BusinessPartnerSupplier.SupplierAlternativePayee as SupplierAlternativePayee,
      BusinessPartnerSupplier.Customer,
      BusinessPartnerSupplier.PostingIsBlocked,
      BusinessPartnerSupplier.PurchasingIsBlocked,
      BusinessPartnerSupplier.VATLiability,
      BusinessPartnerSupplier.PaymentIsBlockedForSupplier,
      BusinessPartnerSupplier.SuplrProofOfDelivRlvtCode,
      BusinessPartnerSupplier.BR_TaxIsSplit,
      cast( 'X' as sdraft_is_active preserving type )                      as  IsActiveEntity,
      BusinessPartnerSupplier.AuthorizationGroup,  
      BusinessPartnerSupplier.SupplierCorporateGroup,
      BusinessPartnerSupplier.ResponsibleType,
      //@Consumption.valueHelp: '_FiscalAddress'

      BusinessPartnerSupplier.FiscalAddress,
      BusinessPartnerSupplier.SupplierProcurementBlock,
      BusinessPartnerSupplier.DataExchangeInstructionKey,
      BusinessPartnerSupplier.BPIsEqualizationTaxSubject,
      BusinessPartnerSupplier.BRSpcfcTaxBasePercentageCode,
      BusinessPartnerSupplier.DataMediumExchangeIndicator,
      BusinessPartnerSupplier.TaxNumberResponsible,
      BusinessPartnerSupplier.TaxNumberType,
      BusinessPartnerSupplier.SuplrQualityManagementSystem,
      BusinessPartnerSupplier.SuplrQltyInProcmtCertfnValidTo,
      BusinessPartnerSupplier.SupplierIsSubRangeRelevant,
      BusinessPartnerSupplier.AlternativePayeeIsAllowed,
      BusinessPartnerSupplier.PaytSlipWthRefSubscriber,
      BusinessPartnerSupplier.SupplierIsPlantRelevant,
      BusinessPartnerSupplier.SupplierPlant,
      BusinessPartnerSupplier.DeletionIndicator,
      @Semantics.booleanIndicator: true
      BusinessPartnerSupplier.IsBusinessPurposeCompleted,
      BusinessPartnerSupplier.PaymentReason,
      @Semantics.booleanIndicator:true
      BusinessPartnerSupplier.SupplierCentralDeletionIsBlock, 

      _BusinessPartner,
      _Supplier,
      _DefaultAddress
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSPARTNERSUPPLIER",
"I_BUSPARTADDRESS",
"I_SUPPLIERADDRDEPDNTGENERAL"
],
"ASSOCIATED":
[
"I_BPCURRENTDEFAULTADDRESS",
"I_BUSINESSPARTNER",
"I_SUPPLIER"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/