P_DDPURCHASEORDER

CDS View

Purchase Order Basic Details

P_DDPURCHASEORDER is a CDS View in S/4HANA. Purchase Order Basic Details. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_PurchaseOrderQuickView view from COMPOSITE Purchase Order Data
@AbapCatalog.sqlViewName: 'PDDPURORD'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
//@EndUserText.label: 'Purchase Order Basic Details'

@VDM.private: true
@VDM.viewType: #COMPOSITE
@ClientHandling.algorithm: #SESSION_VARIABLE
@ObjectModel.usageType: {serviceQuality: #X, sizeCategory: #XL, dataClass: #MASTER}
define view P_DDPurchaseOrder
  with parameters
    P_MRPElementCategory : delkz
  as select from    I_PurchasingDocument     as ekko
    inner join      I_PurchasingDocumentItem as ekpo on ekko.PurchasingDocument = ekpo.PurchasingDocument
    left outer join I_PurgDocScheduleLine    as eket on  ekpo.PurchasingDocument     = eket.PurchasingDocument
                                                     and ekpo.PurchasingDocumentItem = eket.PurchasingDocumentItem
  association [0..1] to I_PurchasingGroup            as _PurchasingGroup on  $projection.PurchasingGroup = _PurchasingGroup.PurchasingGroup
  association [0..1] to I_PurchasingDocumentTypeText as _DocTypeTxt      on  $projection.PurchasingDocumentType     = _DocTypeTxt.PurchasingDocumentType //T161T

                                                                         and $projection.PurchasingDocumentCategory = _DocTypeTxt.PurchasingDocumentCategory
{
  key ekko.PurchasingDocument,
  key ekpo.PurchasingDocumentItem,
  key eket.ScheduleLine,
      ekpo.Material,
      _Material._Text[1:Language = $session.system_language].MaterialName,
      ekko.PurchasingDocumentCategory,
      ekko.PurchasingDocumentType,
      _DocTypeTxt[1:Language = $session.system_language].PurchasingDocumentTypeName,
      ekpo.PurchasingDocumentItemCategory,
      ekko.Supplier,
      ekpo.SupplierMaterialNumber,
      ekpo.InventorySpecialStockType,

      case $parameters.P_MRPElementCategory
      when 'BE'
      then ekpo.Plant
      when 'U1'
      then ekko.SupplyingPlant
      when 'LE'
      then ekpo.Plant
      end                                                                                                       as MRPPlant,

      case $parameters.P_MRPElementCategory
      when 'BE'
      then ekko.SupplyingPlant
      when 'U2'
      then ekpo.Plant
      when 'LE'
      then ekko.SupplyingPlant
      end                                                                                                       as SupplyingPlant,

      ekpo.PurchasingInfoRecord,
      ekko.PurchasingOrganization,
      ekko.PurchasingGroup,
      _PurchasingGroup.PurchasingGroupName,
      case _PurchasingGroup.PhoneNumberExtension
        when '' then _PurchasingGroup.PurchasingGroupPhoneNumber
        else concat(_PurchasingGroup.PhoneNumber, concat('-', _PurchasingGroup.PhoneNumberExtension))
      end                                                                                                       as PurchasingGroupPhoneNumber,
      _PurchasingGroup.EmailAddress                                                                             as PurchasingGroupEmailAddress,
      ekpo.PlannedDeliveryDurationInDays,
      ekpo.GoodsReceiptDurationInDays,
      eket.ScheduleLineDeliveryDate                                                                             as DeliveryDate,
      eket.ProductAvailabilityDate,
      eket.ScheduleLineOrderDate,
      ekpo.PartialDeliveryIsAllowed,
      ekpo.PurchaseContract,
      ekpo.PurchaseContractItem,
      ekpo.OrderQuantityUnit,
      ekpo.OrderQuantity,
      eket.ScheduleLineOrderQuantity,
      eket.RoughGoodsReceiptQty,
      eket.ScheduleLineOpenQuantity,
      eket.ScheduleLineIssuedQuantity,
      eket.StockTransferDeliveredQuantity,
      eket.ScheduleLineCommittedQuantity,
      ekpo.OrderPriceUnitToOrderUnitNmrtr,
      ekpo.OrdPriceUnitToOrderUnitDnmntr
}
where
  (
       ekpo.IsEndOfPurposeBlocked is null
    or ekpo.IsEndOfPurposeBlocked = ''
    or ekpo.IsEndOfPurposeBlocked = ' '
  )
  and(
       ekko.IsEndOfPurposeBlocked is null
    or ekko.IsEndOfPurposeBlocked = ''
    or ekko.IsEndOfPurposeBlocked = ' '
  )