P_PURORDMAINTAINITEMACTIVE

CDS View

P_PURORDMAINTAINITEMACTIVE is a CDS View in S/4HANA. It contains 81 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
P_PurOrdMaintainItemAll view from CONSUMPTION
P_PurOrdMaintainRefDocumentAll view from CONSUMPTION

Fields (81)

KeyField CDS FieldsUsed in Views
KEY Plant Plant 2
KEY PurchaseOrder PurchaseOrder 2
KEY PurchaseOrderItem PurchaseOrderItem 2
AcctAssignmentCategory AcctAssignmentCategory 2
ControllingArea ControllingArea 1
CostCenter CostCenter 1
CreatedByUser CreatedByUser 1
Currency Currency 1
Customer Customer 1
DeliveryAddressCityName DeliveryAddressCityName 1
DeliveryAddressCountry DeliveryAddressCountry 1
DeliveryAddressHouseNumber DeliveryAddressHouseNumber 1
DeliveryAddressName DeliveryAddressName 1
DeliveryAddressPostalCode DeliveryAddressPostalCode 1
DeliveryAddressRegion DeliveryAddressRegion 1
DeliveryAddressStreetName DeliveryAddressStreetName 1
DeliveryDate DeliveryDate 2
EditState EditState 1
FunctionalArea FunctionalArea 1
GLAccount GLAccount 1
GoodsReceiptIsExpected GoodsReceiptIsExpected 2
GoodsReceiptIsNonValuated GoodsReceiptIsNonValuated 2
HasTwin HasTwin 1
IncotermsClassification IncotermsClassification 2
IncotermsLocation1 IncotermsLocation1 2
IncotermsLocation2 IncotermsLocation2 2
IncotermsTransferLocation IncotermsTransferLocation 2
IncotermsVersion IncotermsVersion 1
InvoiceIsExpected InvoiceIsExpected 2
InvoiceIsGoodsReceiptBased InvoiceIsGoodsReceiptBased 2
IsCompletelyDelivered IsCompletelyDelivered 1
IsDeleted IsDeleted 2
IsFinallyInvoiced IsFinallyInvoiced 1
LastChangeDateTime LastChangeDateTime 1
LastChangeUser LastChangeUser 1
ManualDeliveryAddressID ManualDeliveryAddressID 1
Material Material 2
MaterialGroup MaterialGroup 2
MaterialType MaterialType 2
NetPriceIsDerived NetPriceIsDerived 1
OrderItemQtyToBaseQtyDnmntr OrderItemQtyToBaseQtyDnmntr 2
OrderItemQtyToBaseQtyNmrtr OrderItemQtyToBaseQtyNmrtr 2
OrderPriceUnitToOrderUnitNmrtr OrderPriceUnitToOrderUnitNmrtr 2
OrdPriceUnitToOrderUnitDnmntr OrdPriceUnitToOrderUnitDnmntr 2
OverallLimitAmount OverallLimitAmount 1
OverallLimitAmountIsUnlimited OverallLimitAmountIsUnlimited 1
OverdelivTolrtdLmtRatioInPct OverdelivTolrtdLmtRatioInPct 2
PerformancePeriodEndDate PerformancePeriodEndDate 2
PerformancePeriodStartDate PerformancePeriodStartDate 2
PricingProcedure PricingProcedure 1
ProductType ProductType 2
ProfitCenter ProfitCenter 1
PurchaseOrderItemCategory PurchaseOrderItemCategory 2
PurchaseOrderNetAmount PurchaseOrderNetAmount 1
PurchaseOrderNetPriceAmount PurchaseOrderNetPriceAmount 2
PurchaseOrderNetPriceQuantity PurchaseOrderNetPriceQuantity 2
PurchaseOrderPriceUnit PurchaseOrderPriceUnit 2
PurchaseOrderQty PurchaseOrderQty 2
PurchaseOrderQuantityUnit PurchaseOrderQuantityUnit 2
PurchasingDocumentItemText PurchasingDocumentItemText 2
PurchasingDocumentType PurchasingDocumentType 1
PurchasingGroup PurchasingGroup 1
PurchasingOrganization PurchasingOrganization 1
PurOrderEffectiveItemAmount PurOrderEffectiveItemAmount 1
RefPurchaseOutlineAgreement RefPurchaseOutlineAgreement 2
RefPurchOutlineAgrmtItem RefPurchOutlineAgrmtItem 2
RefPurOrderInfoRecord RefPurOrderInfoRecord 1
SalesOrder SalesOrder 1
SalesOrderItem SalesOrderItem 1
ServicePackage ServicePackage 1
ServicePerformer ServicePerformer 2
StorageLocation StorageLocation 2
Supplier Supplier 1
SupplierMaterialNumber SupplierMaterialNumber 2
TaxCalculationProcedure TaxCalculationProcedure 1
TaxCode TaxCode 2
TaxJurisdiction TaxJurisdiction 2
TaxJurisdictionCalcProcedure TaxJurisdictionCalcProcedure 1
UnderdelivTolrtdLmtRatioInPct UnderdelivTolrtdLmtRatioInPct 2
UnlimitedOverdeliveryIsAllowed UnlimitedOverdeliveryIsAllowed 2
WBSElementInternalID WBSElementInternalID 1
@VDM.viewType: #CONSUMPTION
@AbapCatalog.sqlViewName: 'PPOMAINTITMACT'
@VDM.private: true
@AccessControl.authorizationCheck: #CHECK
 
  
define view P_PurOrdMaintainItemActive
  as select from I_PurchaseOrderItem                   as ekpo
  left outer join P_PurOrdMaintainItemActAddr          as item_address                on  ekpo.PurchaseOrder = item_address.PurchaseOrder
                                                                                      and ekpo.PurchaseOrderItem = item_address.PurchaseOrderItem
  left outer join P_PurOrdMaintainItemActCalcPrc       as item_calcproc               on  ekpo.PurchaseOrder = item_calcproc.PurchaseOrder
                                                                                      and ekpo.PurchaseOrderItem = item_calcproc.PurchaseOrderItem
  association [1..1] to P_PurOrdMaintainHeaderActive   as _PurOrdMaintainHeaderActive on  ekpo.PurchaseOrder = _PurOrdMaintainHeaderActive.PurchaseOrder
  association [0..1] to P_PurOrdMaintainPDocAccAssLine as _PurOrdAccountAssignment    on  ekpo.PurchaseOrder = _PurOrdAccountAssignment.PurchasingDocument
                                                                                      and ekpo.PurchaseOrderItem = _PurOrdAccountAssignment.PurchasingDocumentItem
  association [1..1] to P_PurOrdSingleScheduleLine     as _PurgDocScheduleLine        on  ekpo.PurchaseOrder = _PurgDocScheduleLine.PurchasingDocument
                                                                                      and ekpo.PurchaseOrderItem = _PurgDocScheduleLine.PurchasingDocumentItem
  association [0..1] to P_PurOrdMaintainItemDraft      as _PurOrdMaintainItemDraft    on  ekpo.PurchaseOrder = _PurOrdMaintainItemDraft.PurchaseOrder
                                                                                      and ekpo.PurchaseOrderItem = _PurOrdMaintainItemDraft.PurchaseOrderItem

{  key ekpo.PurchaseOrder                      as PurchaseOrder,
   key ekpo.PurchaseOrderItem                  as PurchaseOrderItem,
       ekpo.PurchaseOrderItemText              as PurchasingDocumentItemText,
       ekpo.Material                           as Material,
       ekpo.MaterialType                       as MaterialType,
       ekpo.MaterialGroup                      as MaterialGroup,
       ekpo.Plant                              as Plant,
       ekpo.StorageLocation                    as StorageLocation,
       ekpo.PurchaseOrderQuantityUnit          as PurchaseOrderQuantityUnit,
       ekpo.OrderQuantity                      as PurchaseOrderQty,
       ekpo.NetPriceAmount                     as PurchaseOrderNetPriceAmount,
       ekpo.NetAmount                          as PurchaseOrderNetAmount,
       ''                                      as NetPriceIsDerived,
       ekpo.EffectiveAmount                    as PurOrderEffectiveItemAmount,
       ekpo.NetPriceQuantity                   as PurchaseOrderNetPriceQuantity,
       ekpo.OrderPriceUnit                     as PurchaseOrderPriceUnit,
       ekpo.Customer                           as Customer,
       ekpo.TaxCode                            as TaxCode,
       ekpo.TaxJurisdiction                    as TaxJurisdiction,
       ekpo.GoodsReceiptIsExpected             as GoodsReceiptIsExpected,
       ekpo.GoodsReceiptIsNonValuated          as GoodsReceiptIsNonValuated,
       ekpo.InvoiceIsExpected                  as InvoiceIsExpected,
       ekpo.InvoiceIsGoodsReceiptBased         as InvoiceIsGoodsReceiptBased,
       ekpo.OverdelivTolrtdLmtRatioInPct       as OverdelivTolrtdLmtRatioInPct,
       ekpo.UnlimitedOverdeliveryIsAllowed     as UnlimitedOverdeliveryIsAllowed,
       ekpo.UnderdelivTolrtdLmtRatioInPct      as UnderdelivTolrtdLmtRatioInPct,
       ekpo.OrderItemQtyToBaseQtyNmrtr         as OrderItemQtyToBaseQtyNmrtr,
       ekpo.OrderItemQtyToBaseQtyDnmntr        as OrderItemQtyToBaseQtyDnmntr,
       ekpo.PurchasingInfoRecord               as RefPurOrderInfoRecord,
       ekpo.PurchaseContract                   as RefPurchaseOutlineAgreement,
       ekpo.PurchaseContractItem               as RefPurchOutlineAgrmtItem,
       ekpo.PurchaseOrderItemCategory          as PurchaseOrderItemCategory,
       ekpo.AccountAssignmentCategory          as AcctAssignmentCategory,
       ekpo.PurchasingDocumentDeletionCode     as IsDeleted,
       ekpo.SupplierMaterialNumber             as SupplierMaterialNumber,
       ekpo.IncotermsClassification            as IncotermsClassification,
       ekpo.IncotermsTransferLocation          as IncotermsTransferLocation,
       ekpo.IncotermsLocation1                 as IncotermsLocation1,
       ekpo.IncotermsLocation2                 as IncotermsLocation2,
       ekpo.OrderPriceUnitToOrderUnitNmrtr     as OrderPriceUnitToOrderUnitNmrtr,
       ekpo.OrdPriceUnitToOrderUnitDnmntr      as OrdPriceUnitToOrderUnitDnmntr,
       ekpo.IsCompletelyDelivered              as IsCompletelyDelivered,
       ekpo.IsFinallyInvoiced                  as IsFinallyInvoiced,
       ekpo.serviceperformer                   as ServicePerformer,
       ekpo.producttype                        as ProductType,
       ekpo.ServicePackage                     as ServicePackage,               
       cast('0' as abap.dec(13,2))             as OverallLimitAmount,
       cast('' as abap.char(1))                as OverallLimitAmountIsUnlimited, 
       cast('0' as abap.dec(13,2))             as ExpectedOverallLimitAmount,     
       _PurOrdAccountAssignment.CostCenter                as CostCenter,
       _PurOrdAccountAssignment.ControllingArea           as ControllingArea,
       _PurOrdAccountAssignment.WBSElementInternalID      as WBSElementInternalID,
       _PurOrdAccountAssignment.FunctionalArea            as FunctionalArea,
       _PurOrdAccountAssignment.SalesOrder                as SalesOrder,
       _PurOrdAccountAssignment.SalesOrderItem            as SalesOrderItem,
       _PurOrdAccountAssignment.GLAccount                 as GLAccount,
       _PurOrdAccountAssignment.ProfitCenter              as ProfitCenter,
      cast( _PurgDocScheduleLine.ScheduleLineDeliveryDate as abap.char(8)) as DeliveryDate,
       _PurgDocScheduleLine.PerformancePeriodStartDate    as PerformancePeriodStartDate,                                   
       _PurgDocScheduleLine.PerformancePeriodEndDate      as PerformancePeriodEndDate,                                     
       item_address.PurchaseOrderItemAddressNumber        as PurchaseOrderItemAddressNumber,       
       item_address.ManualDeliveryAddressID               as ManualDeliveryAddressID,
       item_address.DeliveryAddressName                   as DeliveryAddressName,
       item_address.DeliveryAddressStreetName             as DeliveryAddressStreetName,
       item_address.DeliveryAddressHouseNumber            as DeliveryAddressHouseNumber,
       item_address.DeliveryAddressPostalCode             as DeliveryAddressPostalCode,
       item_address.DeliveryAddressCityName               as DeliveryAddressCityName,
       item_address.DeliveryAddressRegion                 as DeliveryAddressRegion,
       item_address.DeliveryAddressCountry                as DeliveryAddressCountry,
       item_calcproc.TaxCalculationProcedure              as TaxCalculationProcedure,
       item_calcproc.TaxJurisdictionCalcProcedure         as TaxJurisdictionCalcProcedure,
       _PurOrdMaintainHeaderActive.Currency               as Currency,
       _PurOrdMaintainHeaderActive.PricingProcedure       as PricingProcedure,
       _PurOrdMaintainHeaderActive.PurchasingDocumentType as PurchasingDocumentType,
       _PurOrdMaintainHeaderActive.PurchasingOrganization as PurchasingOrganization,
       _PurOrdMaintainHeaderActive.PurchasingGroup        as PurchasingGroup,
       _PurOrdMaintainHeaderActive.Supplier               as Supplier,
       _PurOrdMaintainHeaderActive.IncotermsVersion       as IncotermsVersion,
       case when _PurOrdMaintainItemDraft.PurchaseOrderItem is null
          then cast ('0' as abap.char(1))
          else cast ('2' as abap.char(1))
       end                                                as EditState,
       case when _PurOrdMaintainItemDraft.PurchaseOrderItem is null
          then cast(''  as abap.char(1))
          else cast('X' as abap.char(1))
         end                                              as HasTwin,
       cast('' as abap.char(12))                          as CreatedByUser,
       cast('' as abap.char(12))                          as LastChangeUser,
       cast('19000101120000' as abap.dec(21,7))           as LastChangeDateTime //default value for active PO items for ETag handling

}

where _PurOrdMaintainHeaderActive.PurchasingDocumentCategory = 'F' //only purchase orders

                                                                                              
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASEORDERITEM",
"P_PURORDMAINTAINHEADERACTIVE",
"P_PURORDMAINTAINITEMACTADDR",
"P_PURORDMAINTAINITEMACTCALCPRC",
"P_PURORDMAINTAINITEMDRAFT",
"P_PURORDMAINTAINPDOCACCASSLINE",
"P_PURORDSINGLESCHEDULELINE"
],
"ASSOCIATED":
[
"P_PURORDMAINTAINHEADERACTIVE",
"P_PURORDMAINTAINITEMDRAFT",
"P_PURORDMAINTAINPDOCACCASSLINE",
"P_PURORDSINGLESCHEDULELINE"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/