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.
@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: #COMPOSITEdefineview I_BPSuplrAddrDepdntPurgOrgInfo
asselectfrom I_BusPartAddress as BusinessPartnerAddress
innerjoin I_BusinessPartnerPurgOrg as BusinesspartnerPurgOrg on BusinessPartnerAddress.BusinessPartner = BusinesspartnerPurgOrg.BusinessPartner
leftouter 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
casewhen SuplrAddrDepdntPurchasingOrg.PurchasingIsBlockedForSupplier isnot initial then SuplrAddrDepdntPurchasingOrg.PurchasingIsBlockedForSupplier
else BusinesspartnerPurgOrg.PurchasingIsBlockedForSupplier endas PurchasingIsBlockedForSupplier,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.PurchaseOrderCurrency
else BusinesspartnerPurgOrg.PurchaseOrderCurrency endas PurchaseOrderCurrency,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.SupplierRespSalesPersonName
else BusinesspartnerPurgOrg.SupplierRespSalesPersonName endas SupplierRespSalesPersonName,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.ContactPersonPhoneNumber
else BusinesspartnerPurgOrg.ContactPersonPhoneNumber endas ContactPersonPhoneNumber,
@Semantics.amount.currencyCode: 'PurchaseOrderCurrency'
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.MinimumOrderAmount
else BusinesspartnerPurgOrg.MinimumOrderAmount endas MinimumOrderAmount,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.PaymentTerms
else BusinesspartnerPurgOrg.PaymentTerms endas PaymentTerms ,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.IncotermsClassification
else BusinesspartnerPurgOrg.IncotermsClassification endas IncotermsClassification ,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.IncotermsTransferLocation
else BusinesspartnerPurgOrg.IncotermsTransferLocation endas IncotermsTransferLocation ,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.IntrastatCrsBorderTrMode
else BusinesspartnerPurgOrg.IntrastatCrsBorderTrMode endas IntrastatCrsBorderTrMode ,
// casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.PurgOutlineAgrmtCustomsOffice
// else BusinesspartnerPurgOrg.PurgOutlineAgrmtCustomsOffice endas PurgOutlineAgrmtCustomsOffice ,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.PurchasingGroup
else BusinesspartnerPurgOrg.PurchasingGroup endas PurchasingGroup ,
//casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.MaterialPlannedDeliveryDurn
// else BusinesspartnerPurgOrg.MaterialPlannedDeliveryDurn endas MaterialPlannedDeliveryDurn,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.PlanningCycle
else BusinesspartnerPurgOrg.PlanningCycle endas PlanningCycle ,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.IncotermsVersion
else BusinesspartnerPurgOrg.IncotermsVersion endas IncotermsVersion,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.IncotermsLocation1
else BusinesspartnerPurgOrg.IncotermsLocation1 endas IncotermsLocation1,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.IncotermsLocation2
else BusinesspartnerPurgOrg.IncotermsLocation2 endas IncotermsLocation2,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.IncotermsSupChnLoc1AddlUUID
else BusinesspartnerPurgOrg.IncotermsSupChnLoc1AddlUUID endas IncotermsSupChnLoc1AddlUUID,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.IncotermsSupChnLoc2AddlUUID
else BusinesspartnerPurgOrg.IncotermsSupChnLoc2AddlUUID endas IncotermsSupChnLoc2AddlUUID,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.IncotermsSupChnDvtgLocAddlUUID
else BusinesspartnerPurgOrg.IncotermsSupChnDvtgLocAddlUUID endas IncotermsSupChnDvtgLocAddlUUID,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.SupplierAccountNumber
else BusinesspartnerPurgOrg.SupplierAccountNumber endas SupplierAccountNumber,
casewhen SuplrAddrDepdntPurchasingOrg.AddressID isnot initial then SuplrAddrDepdntPurchasingOrg.ShippingCondition
else BusinesspartnerPurgOrg.ShippingCondition endas 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
}