@AbapCatalog.sqlViewName: 'PAVCPURGDOC'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@VDM.viewType: #BASIC
@VDM.private: true
define view P_VarConfignPurchasingDocument
as select from ekko as PurchasingDocument
{
key PurchasingDocument.ebeln as PurchasingDocument,
PurchasingDocument.bstyp as PurchasingDocumentCategory,
PurchasingDocument.ernam as CreatedByUser,
PurchasingDocument.aedat as CreationDate,
PurchasingDocument.ernam as LastChangedByUser,
tstmp_to_dats( PurchasingDocument.lastchangedatetime ,
abap_system_timezone( $session.client,'NULL' ),
$session.client,
'NULL' ) as LastChangeDate,
//Authorization checks needed fields
PurchasingDocument.iseopblocked as IsEndOfPurposeBlocked,
PurchasingDocument.bsart as PurchasingDocumentType,
PurchasingDocument.ekorg as PurchasingOrganization,
PurchasingDocument.ekgrp as PurchasingGroup
}
where
bstyp = 'F' //Purchase Order (PO)
and loekz = '' //Deletion marker
and isaged = '' //PurchasingDocumentIsAged
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"EKKO"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/