I_BPSuplrAddrDepdntPurgOrgInfo

DDL: I_BPSUPLRADDRDEPDNTPURGORGINFO SQL: IBPSUPADPURINFO Type: view COMPOSITE

Supplier addr depnt purch info

I_BPSuplrAddrDepdntPurgOrgInfo is a Composite CDS View that provides data about "Supplier addr depnt purch info" in SAP S/4HANA. It reads from 2 data sources (I_BusPartAddress, I_BusinessPartnerPurgOrg) and exposes 32 fields with key fields BusinessPartner, AddressID, Supplier, PurchasingOrganization. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_BusPartAddress BusinessPartnerAddress from
I_BusinessPartnerPurgOrg BusinesspartnerPurgOrg inner

Associations (2)

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

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IBPSUPADPURINFO view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #MANDATORY view
AccessControl.personalData.blocking #REQUIRED view
EndUserText.label Supplier addr depnt purch 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 #COMPOSITE view

Fields (32)

KeyFieldSource TableSource FieldDescription
KEY BusinessPartner I_BusPartAddress BusinessPartner
KEY AddressID I_BusPartAddress AddressID
KEY Supplier I_BusinessPartnerPurgOrg Supplier
KEY PurchasingOrganization I_BusinessPartnerPurgOrg PurchasingOrganization
PaymentTermsendasPaymentTerms
PurchasingGroupendasPurchasingGroup
PlanningCycleendasPlanningCycle
IncotermsVersionendasIncotermsVersion
ShippingConditionendasShippingCondition
DeletionIndicator I_BusinessPartnerPurgOrg DeletionIndicator
SupplierABCClassificationCode I_BusinessPartnerPurgOrg SupplierABCClassificationCode
InvoiceIsGoodsReceiptBased I_BusinessPartnerPurgOrg InvoiceIsGoodsReceiptBased
IsOrderAcknRqd I_BusinessPartnerPurgOrg IsOrderAcknRqd
CalculationSchemaGroupCode I_BusinessPartnerPurgOrg CalculationSchemaGroupCode
PurOrdAutoGenerationIsAllowed I_BusinessPartnerPurgOrg PurOrdAutoGenerationIsAllowed
PricingDateControl I_BusinessPartnerPurgOrg PricingDateControl
EvaldReceiptSettlementIsActive I_BusinessPartnerPurgOrg EvaldReceiptSettlementIsActive
SupplierConfirmationControlKey I_BusinessPartnerPurgOrg SupplierConfirmationControlKey
RoundingProfile I_BusinessPartnerPurgOrg RoundingProfile
ProductUnitGroup I_BusinessPartnerPurgOrg ProductUnitGroup
AutomaticEvaluatedRcptSettlmt I_BusinessPartnerPurgOrg AutomaticEvaluatedRcptSettlmt
ProdStockAndSlsDataTransfPrfl I_BusinessPartnerPurgOrg ProdStockAndSlsDataTransfPrfl
SuplrIsRlvtForSettlmtMgmt I_BusinessPartnerPurgOrg SuplrIsRlvtForSettlmtMgmt
SuplrInvcRevalIsAllowed I_BusinessPartnerPurgOrg SuplrInvcRevalIsAllowed
InvoiceIsMMServiceEntryBased I_BusinessPartnerPurgOrg InvoiceIsMMServiceEntryBased
SuplrIsSubjToSubsqntSettlement I_BusinessPartnerPurgOrg SuplrIsSubjToSubsqntSettlement
SuplrPurgOrgAgrmtOfBusVolIsRqd I_BusinessPartnerPurgOrg SuplrPurgOrgAgrmtOfBusVolIsRqd
AutomDebitCrtnIsEnbldOnGI I_BusinessPartnerPurgOrg AutomDebitCrtnIsEnbldOnGI
EvaldRcptSettlementProfile I_BusinessPartnerPurgOrg EvaldRcptSettlementProfile
PercentageHandlingSurchargeAmt I_BusinessPartnerPurgOrg PercentageHandlingSurchargeAmt
_BusinessPartner _BusinessPartner
_Supplier _Supplier
@AbapCatalog.sqlViewName: 'IBPSUPADPURINFO'
@AbapCatalog.compiler.compareFilter: true
//@AbapCatalog.preserveKey: true

@AccessControl.authorizationCheck: #MANDATORY
@AccessControl.personalData.blocking: #REQUIRED
@EndUserText.label: 'Supplier addr depnt purch info'
@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_BPSuplrAddrDepdntPurgOrgInfo 
as select from    I_BusPartAddress     as BusinessPartnerAddress
    inner join I_BusinessPartnerPurgOrg  as BusinesspartnerPurgOrg  on BusinessPartnerAddress.BusinessPartner = BusinesspartnerPurgOrg.BusinessPartner
    left outer to one join I_SuplrAddrDepdntPurchasingOrg as SuplrAddrDepdntPurchasingOrg on  BusinesspartnerPurgOrg.Supplier  = SuplrAddrDepdntPurchasingOrg.Supplier
                                                                             and BusinessPartnerAddress.AddressID         = SuplrAddrDepdntPurchasingOrg.AddressID
                                                                            and BusinesspartnerPurgOrg.PurchasingOrganization   = SuplrAddrDepdntPurchasingOrg.PurchasingOrganization
                                                                            
  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
{
  key BusinessPartnerAddress.BusinessPartner                         as BusinessPartner,
  key BusinessPartnerAddress.AddressID                               as AddressID,
  key BusinesspartnerPurgOrg.Supplier                                as Supplier,
  key BusinesspartnerPurgOrg.PurchasingOrganization                  as PurchasingOrganization,
  // 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 lfm1_addr,

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

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

  // Fields common to both LFM1_ADDR and LFM1 tables

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

  // Else fetch data from LFM1 table

  case when SuplrAddrDepdntPurchasingOrg.PurchasingIsBlockedForSupplier is not initial then SuplrAddrDepdntPurchasingOrg.PurchasingIsBlockedForSupplier
      else BusinesspartnerPurgOrg.PurchasingIsBlockedForSupplier end      as PurchasingIsBlockedForSupplier,
  case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.PurchaseOrderCurrency
      else BusinesspartnerPurgOrg.PurchaseOrderCurrency end      as PurchaseOrderCurrency,
  case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.SupplierRespSalesPersonName
      else BusinesspartnerPurgOrg.SupplierRespSalesPersonName end      as SupplierRespSalesPersonName,        
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.ContactPersonPhoneNumber
      else BusinesspartnerPurgOrg.ContactPersonPhoneNumber end      as ContactPersonPhoneNumber, 
   @Semantics.amount.currencyCode: 'PurchaseOrderCurrency'     
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.MinimumOrderAmount
      else BusinesspartnerPurgOrg.MinimumOrderAmount end      as MinimumOrderAmount,
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.PaymentTerms
      else BusinesspartnerPurgOrg.PaymentTerms end      as PaymentTerms , 
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.IncotermsClassification
      else BusinesspartnerPurgOrg.IncotermsClassification end      as IncotermsClassification ,  
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.IncotermsTransferLocation
      else BusinesspartnerPurgOrg.IncotermsTransferLocation end      as IncotermsTransferLocation ,           
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.IntrastatCrsBorderTrMode
      else BusinesspartnerPurgOrg.IntrastatCrsBorderTrMode end      as IntrastatCrsBorderTrMode , 
   // case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.PurgOutlineAgrmtCustomsOffice

    //  else BusinesspartnerPurgOrg.PurgOutlineAgrmtCustomsOffice end      as PurgOutlineAgrmtCustomsOffice ,    

   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.PurchasingGroup
      else BusinesspartnerPurgOrg.PurchasingGroup end      as PurchasingGroup ,   
  //case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.MaterialPlannedDeliveryDurn

  //     else BusinesspartnerPurgOrg.MaterialPlannedDeliveryDurn end      as MaterialPlannedDeliveryDurn,  

   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.PlanningCycle
      else BusinesspartnerPurgOrg.PlanningCycle end      as PlanningCycle ,   
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.IncotermsVersion
      else BusinesspartnerPurgOrg.IncotermsVersion end      as IncotermsVersion,   
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.IncotermsLocation1
      else BusinesspartnerPurgOrg.IncotermsLocation1 end      as IncotermsLocation1,   
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.IncotermsLocation2
      else BusinesspartnerPurgOrg.IncotermsLocation2 end      as IncotermsLocation2,     
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.IncotermsSupChnLoc1AddlUUID
      else BusinesspartnerPurgOrg.IncotermsSupChnLoc1AddlUUID end      as IncotermsSupChnLoc1AddlUUID,  
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.IncotermsSupChnLoc2AddlUUID
      else BusinesspartnerPurgOrg.IncotermsSupChnLoc2AddlUUID end      as IncotermsSupChnLoc2AddlUUID,      
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.IncotermsSupChnDvtgLocAddlUUID
      else BusinesspartnerPurgOrg.IncotermsSupChnDvtgLocAddlUUID end      as IncotermsSupChnDvtgLocAddlUUID, 
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.SupplierAccountNumber
      else BusinesspartnerPurgOrg.SupplierAccountNumber end      as SupplierAccountNumber, 
   case when SuplrAddrDepdntPurchasingOrg.AddressID is not initial then SuplrAddrDepdntPurchasingOrg.ShippingCondition
      else BusinesspartnerPurgOrg.ShippingCondition end      as ShippingCondition,     
      
    //LFM1 fields  

    BusinesspartnerPurgOrg.DeletionIndicator,
    BusinesspartnerPurgOrg.SupplierABCClassificationCode,
    BusinesspartnerPurgOrg.InvoiceIsGoodsReceiptBased,
    BusinesspartnerPurgOrg.IsOrderAcknRqd,
    BusinesspartnerPurgOrg.CalculationSchemaGroupCode,
    BusinesspartnerPurgOrg.PurOrdAutoGenerationIsAllowed,
    BusinesspartnerPurgOrg.PricingDateControl,
    BusinesspartnerPurgOrg.EvaldReceiptSettlementIsActive,
    BusinesspartnerPurgOrg.SupplierConfirmationControlKey,
    BusinesspartnerPurgOrg.RoundingProfile,
    BusinesspartnerPurgOrg.ProductUnitGroup,
    BusinesspartnerPurgOrg.AutomaticEvaluatedRcptSettlmt,
    BusinesspartnerPurgOrg.ProdStockAndSlsDataTransfPrfl,
    BusinesspartnerPurgOrg.SuplrIsRlvtForSettlmtMgmt,
    BusinesspartnerPurgOrg.SuplrInvcRevalIsAllowed,
    BusinesspartnerPurgOrg.InvoiceIsMMServiceEntryBased,
    BusinesspartnerPurgOrg.SuplrIsSubjToSubsqntSettlement,
    BusinesspartnerPurgOrg.SuplrPurgOrgAgrmtOfBusVolIsRqd,
    BusinesspartnerPurgOrg.AutomDebitCrtnIsEnbldOnGI,
    BusinesspartnerPurgOrg.EvaldRcptSettlementProfile,
    //BusinesspartnerPurgOrg.AbsoluteHandlingSurchargeAmt,

    BusinesspartnerPurgOrg.PercentageHandlingSurchargeAmt,
    //BusinesspartnerPurgOrg.MinimumHandlingSurchargeAmt,

    //BusinesspartnerPurgOrg.MaximumHandlingSurchargeAmt,  

                
   //Associations

   _BusinessPartner,  
   _Supplier         
}