P_VARCONFIGNPURCHASINGDOCITEM

CDS View

P_VARCONFIGNPURCHASINGDOCITEM is a CDS View in S/4HANA. It contains 9 fields. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
P_SimulationObjectUnion view union_all CONSUMPTION

Fields (9)

KeyField CDS FieldsUsed in Views
CreatedByUser CreatedByUser 1
CreationDate CreationDate 1
LastChangeDate LastChangeDate 1
LastChangedByUser LastChangedByUser 1
Plant Plant 1
Product Product 1
ProductConfiguration ProductConfiguration 1
PurchasingDocument PurchasingDocument 1
PurchasingDocumentItem PurchasingDocumentItem 1
@AbapCatalog.sqlViewName: 'PAVCPURGDOCITEM'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED

@ClientHandling.algorithm: #SESSION_VARIABLE

@VDM.viewType: #BASIC
@VDM.private: true
define view P_VarConfignPurchasingDocItem
  as select from ekpo as PurchasingDocumentItem

  association [1..1] to P_VarConfignPurchasingDocument as _PurchasingDocument on PurchasingDocumentItem.ebeln = _PurchasingDocument.PurchasingDocument
{
  key PurchasingDocumentItem.ebeln                                                  as  PurchasingDocument,
  key PurchasingDocumentItem.ebelp                                                  as  PurchasingDocumentItem,

      PurchasingDocumentItem.matnr                                                  as  Product,
      PurchasingDocumentItem.werks                                                  as  Plant,
      PurchasingDocumentItem.cuobj                                                  as  ProductConfiguration,

      _PurchasingDocument.CreatedByUser,
      _PurchasingDocument.CreationDate,
      case
      when  _PurchasingDocument.LastChangeDate = '00000000'
       or  _PurchasingDocument.LastChangeDate is null
       then  _PurchasingDocument.CreationDate
      else _PurchasingDocument.LastChangeDate
      end                                                                           as  LastChangeDate,


      _PurchasingDocument.LastChangedByUser,

      @Semantics.quantity.unitOfMeasure: 'OrderQuantityUnit'
      PurchasingDocumentItem.menge                                                  as  OrderQuantity,
      @Semantics.unitOfMeasure: true
      PurchasingDocumentItem.meins                                                  as  OrderQuantityUnit

}
//Only configured Purchasing Document Items are relevant

where
      cuobj != '000000000000000000'
  and bstyp                                     = 'F' //Purchase Order (PO)

  and loekz                                     = ''  //Deletion marker

  and _PurchasingDocument.IsEndOfPurposeBlocked = ''
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"P_VARCONFIGNPURCHASINGDOCUMENT",
"EKPO"
],
"ASSOCIATED":
[
"P_VARCONFIGNPURCHASINGDOCUMENT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/