P_PURORDMAINTAINHEADERACTIVE
P_PURORDMAINTAINHEADERACTIVE is a CDS View in S/4HANA. It contains 43 fields. 2 CDS views read from this table.
CDS Views using this table (2)
| View | Type | Join | VDM | Description |
|---|---|---|---|---|
| P_PurOrdMaintainHeaderAll | view | from | CONSUMPTION | |
| P_PurOrdMaintainRefDocumentAll | view | left_outer | CONSUMPTION |
Fields (43)
| Key | Field | CDS Fields | Used in Views |
|---|---|---|---|
| KEY | PurchaseOrder | PurchaseOrder | 1 |
| KEY | PurchasingOrganization | PurchasingOrganization | 2 |
| AddressCityName | AddressCityName | 1 | |
| AddressCorrespondenceLanguage | AddressCorrespondenceLanguage | 1 | |
| AddressCountry | AddressCountry | 1 | |
| AddressFaxNumber | AddressFaxNumber | 1 | |
| AddressHouseNumber | AddressHouseNumber | 1 | |
| AddressID | AddressID | 1 | |
| AddressName | AddressName | 1 | |
| AddressPhoneNumber | AddressPhoneNumber | 1 | |
| AddressPostalCode | AddressPostalCode | 1 | |
| AddressRegion | AddressRegion | 1 | |
| AddressStreetName | AddressStreetName | 1 | |
| CashDiscount1Days | CashDiscount1Days | 1 | |
| CashDiscount1Percent | CashDiscount1Percent | 1 | |
| CashDiscount2Days | CashDiscount2Days | 1 | |
| CashDiscount2Percent | CashDiscount2Percent | 1 | |
| CompanyCode | CompanyCode | 2 | |
| CreatedByUser | CreatedByUser | 1 | |
| Currency | Currency | 2 | |
| EditState | EditState | 1 | |
| ExchangeRate | ExchangeRate | 1 | |
| HasTwin | HasTwin | 1 | |
| IncotermsClassification | HeaderIncotermsClassification,IncotermsClassification | 2 | |
| IncotermsLocation1 | HeaderIncotermsLocation1,IncotermsLocation1 | 2 | |
| IncotermsLocation2 | HeaderIncotermsLocation2,IncotermsLocation2 | 2 | |
| IncotermsTransferLocation | HeaderIncotermsTransferLoc,IncotermsTransferLocation | 2 | |
| IncotermsVersion | IncotermsVersion | 2 | |
| InvoicingParty | InvoicingParty | 1 | |
| IsHeld | IsHeld | 1 | |
| LastChangeDateTime | LastChangeDateTime | 1 | |
| LastChangeUser | LastChangeUser | 1 | |
| NetPaymentDays | NetPaymentDays | 1 | |
| PaymentTerms | PaymentTerms | 1 | |
| PricingProcedure | PricingProcedure | 2 | |
| PurchaseOrderDate | PurchaseOrderDate | 1 | |
| PurchasingDocumentCategory | PurchasingDocumentCategory | 1 | |
| PurchasingDocumentCondition | PurchasingDocumentCondition | 2 | |
| PurchasingDocumentType | PurchasingDocumentType | 2 | |
| PurchasingGroup | PurchasingGroup | 2 | |
| ReleaseIsNotCompleted | ReleaseIsNotCompleted | 1 | |
| Supplier | Supplier | 2 | |
| ValidityEndDate | ValidityEndDate | 1 |
// =========================================================================
// PO Maintenance: Purchase Order Header (Active Documents)
// =========================================================================
@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AbapCatalog.sqlViewName: 'PPOMAINTHDRACT'
@AccessControl.authorizationCheck: #CHECK
define view P_PurOrdMaintainHeaderActive
as select from I_PurchaseOrder as ekko
association [0..1] to P_PurOrdMaintainHeaderDraft as _HeaderDraft on ekko.PurchaseOrder = _HeaderDraft.PurchaseOrder and _HeaderDraft.CreatedByUser != ''
association [0..1] to P_PurOrdMaintainHeaderActAddr as _HeaderActAddr on ekko.PurchaseOrder = _HeaderActAddr.PurchaseOrder
{
key ekko.PurchaseOrder as PurchaseOrder,
'F' as PurchasingDocumentCategory,
ekko.PurchaseOrderType as PurchasingDocumentType,
ekko.CompanyCode as CompanyCode,
ekko.PurchasingOrganization as PurchasingOrganization,
ekko.PurchasingGroup as PurchasingGroup,
ekko.Supplier as Supplier,
ekko.DocumentCurrency as Currency,
ekko.PaymentTerms as PaymentTerms,
ekko.CashDiscount1Days as CashDiscount1Days,
ekko.CashDiscount2Days as CashDiscount2Days,
ekko.NetPaymentDays as NetPaymentDays,
ekko.CashDiscount1Percent as CashDiscount1Percent,
ekko.CashDiscount2Percent as CashDiscount2Percent,
cast(ekko.ExchangeRate as abap.dec(19,5)) as ExchangeRate,
ekko.IncotermsClassification as IncotermsClassification,
ekko.IncotermsTransferLocation as IncotermsTransferLocation,
ekko.IncotermsVersion as IncotermsVersion,
ekko.IncotermsLocation1 as IncotermsLocation1,
ekko.IncotermsLocation2 as IncotermsLocation2,
ekko.CreatedByUser as CreatedByUser,
ekko.PurchaseOrderDate as PurchaseOrderDate,
cast('19000101120000' as abap.dec(21,7)) as LastChangeDateTime, //default value for active POs for ETag handling
cast('' as abap.char(12)) as LastChangeUser,
ekko.InvoicingParty as InvoicingParty,
ekko.ReleaseIsNotCompleted as ReleaseIsNotCompleted,
ekko.PurchasingCompletenessStatus as IsHeld,
ekko.PurchasingDocumentCondition as PurchasingDocumentCondition,
ekko.PricingProcedure as PricingProcedure,
ekko.ValidityEndDate as ValidityEndDate,
ekko.IsEndOfPurposeBlocked as IsEndOfPurposeBlocked,
_HeaderActAddr.AddressID as AddressID,
_HeaderActAddr.PurchaseOrderAddressNumber as PurchaseOrderAddressNumber,
_HeaderActAddr.AddressName as AddressName,
_HeaderActAddr.AddressStreetName as AddressStreetName,
_HeaderActAddr.AddressHouseNumber as AddressHouseNumber,
_HeaderActAddr.AddressPostalCode as AddressPostalCode,
_HeaderActAddr.AddressCityName as AddressCityName,
_HeaderActAddr.AddressPhoneNumber as AddressPhoneNumber,
_HeaderActAddr.AddressFaxNumber as AddressFaxNumber,
_HeaderActAddr.AddressRegion as AddressRegion,
_HeaderActAddr.AddressCountry as AddressCountry,
_HeaderActAddr.AddressCorrespondenceLanguage as AddressCorrespondenceLanguage,
case when _HeaderDraft.PurchaseOrder is null then cast('0' as abap.char(1))
else cast('2' as abap.char(1))
end as EditState,
case when _HeaderDraft.PurchaseOrder is null then cast('' as abap.char(1))
else cast('X' as abap.char(1))
end as HasTwin
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASEORDER",
"P_PURORDMAINTAINHEADERACTADDR",
"P_PURORDMAINTAINHEADERDRAFT"
],
"ASSOCIATED":
[
"P_PURORDMAINTAINHEADERACTADDR",
"P_PURORDMAINTAINHEADERDRAFT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/