P_PurOrdMaintainHeaderDraft

DDL: P_PURORDMAINTAINHEADERDRAFT SQL: PPOMAINTHDRDRAFT Type: view CONSUMPTION Package: ODATA_MM_PUR_PO_MAINTAIN

PO Maintenance:Purchase Order Header Draft

P_PurOrdMaintainHeaderDraft is a Consumption CDS View that provides data about "PO Maintenance:Purchase Order Header Draft" in SAP S/4HANA. It reads from 1 data source (ekko_po_d) and exposes 41 fields with key field PurchaseOrderHeaderDraftUUID. It has 1 association to related views. Part of development package ODATA_MM_PUR_PO_MAINTAIN.

Data Sources (1)

SourceAliasJoin Type
ekko_po_d ekkod from

Associations (1)

CardinalityTargetAliasCondition
[0..1] P_PurOrdMaintDraftAdminData _DraftAdministrativeData ekkod.db_key = _DraftAdministrativeData.DraftID and _DraftAdministrativeData.EntityName = 'MM_PO_DRAFT'

Annotations (4)

NameValueLevelField
VDM.viewType #CONSUMPTION view
VDM.private true view
AbapCatalog.sqlViewName PPOMAINTHDRDRAFT view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view

Fields (41)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrderHeaderDraftUUID guid
PurchaseOrder ekko_po_d ebeln
PurchasingDocumentCategory
PurchasingDocumentType ekko_po_d bsart
CompanyCode ekko_po_d bukrs
PurchasingOrganization ekko_po_d ekorg
PurchasingGroup ekko_po_d ekgrp
Supplier ekko_po_d lifnr
Currency ekko_po_d waers
PaymentTerms ekko_po_d zterm
CashDiscount1Days ekko_po_d zbd1t
CashDiscount2Days ekko_po_d zbd2t
NetPaymentDays ekko_po_d zbd3t
CashDiscount1Percent ekko_po_d zbd1p
CashDiscount2Percent ekko_po_d zbd2p
ExchangeRate
IncotermsClassification ekko_po_d inco1
IncotermsTransferLocation ekko_po_d inco2
IncotermsVersion ekko_po_d incov
IncotermsLocation1 ekko_po_d inco2_l
IncotermsLocation2 ekko_po_d inco3_l
CreatedByUser ekko_po_d crea_uname
PurchaseOrderDate ekko_po_d bedat
LastChangeDateTime ekko_po_d lchg_date_time
LastChangeUser ekko_po_d lchg_uname
InvoicingParty ekko_po_d lifre
ReleaseIsNotCompleted
IsHeld ekko_po_d memory
PurchasingDocumentCondition ekko_po_d knumv
PricingProcedure ekko_po_d kalsm
AddressID ekko_po_d adrnr
AddressName ekko_po_d ad_name1
AddressStreetName ekko_po_d ad_street
AddressHouseNumber ekko_po_d ad_hsnm1
AddressPostalCode ekko_po_d ad_pstcd1
AddressCityName ekko_po_d ad_city1
AddressPhoneNumber ekko_po_d ad_tlnmbr1
AddressFaxNumber ekko_po_d ad_fxnmbr1
AddressRegion ekko_po_d regio
AddressCountry ekko_po_d land1
AddressCorrespondenceLanguage ekko_po_d langu
// =========================================================================

//   PO Maintenance:Purchase Order Header Draft

// =========================================================================


@VDM.viewType: #CONSUMPTION
@VDM.private: true
@AbapCatalog.sqlViewName: 'PPOMAINTHDRDRAFT'
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY

define view P_PurOrdMaintainHeaderDraft

  as select from ekko_po_d as ekkod
  association [0..1] to P_PurOrdMaintDraftAdminData as _DraftAdministrativeData on
                                   ekkod.db_key = _DraftAdministrativeData.DraftID  and  _DraftAdministrativeData.EntityName = 'MM_PO_DRAFT'         
{
    key guid                                         as PurchaseOrderHeaderDraftUUID,
        ekkod.ebeln                                  as PurchaseOrder,
        cast('F' as abap.char(1))                    as PurchasingDocumentCategory,
        ekkod.bsart                                  as PurchasingDocumentType,
        ekkod.bukrs                                  as CompanyCode,
        ekkod.ekorg                                  as PurchasingOrganization,
        ekkod.ekgrp                                  as PurchasingGroup,
        ekkod.lifnr                                  as Supplier,
        ekkod.waers                                  as Currency,
        ekkod.zterm                                  as PaymentTerms,
        ekkod.zbd1t                                  as CashDiscount1Days,
        ekkod.zbd2t                                  as CashDiscount2Days,
        ekkod.zbd3t                                  as NetPaymentDays,
        ekkod.zbd1p                                  as CashDiscount1Percent,
        ekkod.zbd2p                                  as CashDiscount2Percent,    
        cast(ekkod.wkurs as abap.dec(19,5))          as ExchangeRate,
        ekkod.inco1                                  as IncotermsClassification,
        ekkod.inco2                                  as IncotermsTransferLocation,
        ekkod.incov                                  as IncotermsVersion,
        ekkod.inco2_l                                as IncotermsLocation1,
        ekkod.inco3_l                                as IncotermsLocation2,
        ekkod.crea_uname                             as CreatedByUser,
        ekkod.bedat                                  as PurchaseOrderDate,
        ekkod.lchg_date_time                         as LastChangeDateTime,
        ekkod.lchg_uname                             as LastChangeUser,
        ekkod.lifre                                  as InvoicingParty,
        cast('' as abap.char(1))                     as ReleaseIsNotCompleted,
        ekkod.memory                                 as IsHeld,
        ekkod.knumv                                  as PurchasingDocumentCondition,
        ekkod.kalsm                                  as PricingProcedure,
        ekkod.adrnr                                  as AddressID,
        ekkod.ad_name1                               as AddressName,    
        ekkod.ad_street                              as AddressStreetName,
        ekkod.ad_hsnm1                               as AddressHouseNumber,
        ekkod.ad_pstcd1                              as AddressPostalCode,
        ekkod.ad_city1                               as AddressCityName,
        ekkod.ad_tlnmbr1                             as AddressPhoneNumber,
        ekkod.ad_fxnmbr1                             as AddressFaxNumber,    
        ekkod.regio                                  as AddressRegion,    
        ekkod.land1                                  as AddressCountry,
        ekkod.langu                                  as AddressCorrespondenceLanguage
}