I_PurOrdAccountAssignmentAPI01

DDL: I_PURORDACCOUNTASSIGNMENTAPI01 SQL: IMMPURORDAAAPI01 Type: view COMPOSITE

Account Assignment in Purchase Order

I_PurOrdAccountAssignmentAPI01 (Composite)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Sourcing & Procurement

I_PurOrdAccountAssignmentAPI01 is a Composite CDS View that provides data about "Account Assignment in Purchase Order" in SAP S/4HANA. It reads from 1 data source (I_PurOrdAccountAssignment) and exposes 58 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber. It has 2 associations to related views.

SAP Help Documentation

CategoryCDS Views for Purchase Orders
Purpose
This CDS view helps retrieve the fields related to account assignment details of a purchase order. Account Assignment is the specification of the objects (for example cost center, sales order, project) that are charged in the case of a purchase order for a material that is intended for direct usage or consumption. A purchase order item can be assigned to a single account or to several accounts. Costs can be distributed on a percentage basis. To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views .

Prerequisites
Users who want to use this CDS view must have the following authorization objects assigned: M_BEST_EKO (Purchasing Organization in Purchase Order) M_BEST_EKG (Purchasing Group in Purchase Order) M_BEST_BSA (Document Type in Purchase Order) M_BEST_WRK (Plant in Purchase Order)

Structure
Important Fields Important fields in this view include the following: Field Name Description PurchaseOrder Purchase order number PurchaseOrderItem Item number in purchase order AccountAssignmentNumber Sequential number of account assignment CostCenter Cost center MasterFixedAsset Main asset number ProjectNetwork Network number for account assignment Quantity Quantity PurchaseOrderQuantityUnit Purchase order unit of measure MultipleAcctAssgmtDistrPercent Distribution percentage in the case of multiple account assignments PurgDocNetAmount Net order value in purchase order currency DocumentCurrency Currency key (currency of document) IsDeleted Deletion indicator: purchasing document account assignment GLAccount G/L account number BusinessArea Business area SalesOrder Sales and distribution document number SalesOrderItem Sales document item SalesOrderScheduleLine Schedule line number FixedAsset Asset subnumber OrderID Order number UnloadingPointName Unloading point ControllingArea Controlling area CostObject Cost object ProfitabilitySegment_2 Profitability segment ProfitCenter Funds center WBSElementInternalID_2 WBS element ProjectNetworkInternalID Routing number of operations in the order CommitmentItemshortID Commitment item short ID FundsCenter Funds center Fund Fund FunctionalArea Functional area GoodsRecipientName Goods recepient IsFinallyInvoiced Final invoice indicator REInternalFinNumber Internal key of real estate object NetworkActivityInternalID Internal counter PartnerAccountNumber Partner account number JointVentureRecoveryCode Recovery indicator SettlementReferenceData Reference date for settlement OrderInternalID Routing number of operations in the order OrderIntBillOfOperationsItem General counter for order TaxCode Tax on sales/purchases code TaxJurisdiction Tax Jurisdiction NonDeductibleInputTaxAmount Non-deductible input tax CostCtrActivityType Activity type BusinessProcess Business process GrantID Grant BudgetPeriod Budget period EarmarkedFundsDocument Document number for earmarked funds EarmarkedFundsDocumentItem Earmarked funds: document item SeviceDocumentType Service document type ServiceDocument Service document ID ServiceDocumentItem Service document item ID

View on SAP Help Portal →

SAP API Hub

StateC1
Line of BusinessSourcing & Procurement
Application ComponentMM-PUR-PO
CapabilitiesData Source in SQL Select, Data Source for Defining CDS Entities, Association Target for Defining CDS Entities
PackageSourcing & Procurement for SAP S/4HANA Cloud Private Edition
Description <p>This CDS view helps retrieve the fields related to account assignment details of a purchase order. Account Assignment is the specification of the objects (for example cost center, sales order, project) that are charged in the case of a purchase order for a material that is intended for direct usage or consumption. A purchase order item can be assigned to a single account or to several accounts. Costs can be distributed on a percentage basis.</p> <p>To help you decide which CDS view to use for your purposes, SAP has introduced the annotation ObjectModel.supportedCapabilities that indicates the most appropriate use cases for each CDS view. To find out what use cases are best supported by this CDS view, access the entry of the CDS view in the View Browser app and find the values for this annotation under the Annotation tab. For more information, see Supported Capabilities for CDS Views.</p>

Documentation

Data Sources (1)

SourceAliasJoin Type
I_PurOrdAccountAssignment I_PurOrdAccountAssignment from

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_PurchaseOrderAPI01 _PurchaseOrder $projection.PurchaseOrder = _PurchaseOrder.PurchaseOrder
[1..1] I_PurchaseOrderItemAPI01 _PurchaseOrderItem $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder and $projection.PurchaseOrderItem = _PurchaseOrderItem.PurchaseOrderItem

Annotations (12)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName IMMPURORDAAAPI01 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
VDM.lifecycle.contract.type #PUBLIC_LOCAL_API view
EndUserText.label Account Assignment in Purchase Order view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
Metadata.ignorePropagatedAnnotations true view

Fields (58)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchasing Document Number
KEY PurchaseOrderItem PurchaseOrderItem Item Number of Purchasing Document
KEY AccountAssignmentNumber AccountAssignmentNumber Sequential Number of Account Assignment
CostCenter CostCenter Cost Center
MasterFixedAsset MasterFixedAsset Main Asset Number
ProjectNetwork ProjectNetwork Network Number for Account Assignment
Quantity Quantity Quantity
PurchaseOrderQuantityUnit OrderQuantityUnit Purchase Order Unit of Measure
MultipleAcctAssgmtDistrPercent MultipleAcctAssgmtDistrPercent Distribution percentage in the case of multiple acct assgt
PurgDocNetAmount PurgDocNetAmount Net Order Value in PO Currency
DocumentCurrency DocumentCurrency Document Currency
IsDeleted IsDeleted Deletion Indicator: Purchasing Document Account Assignment
GLAccount GLAccount G/L Account Number
BusinessArea BusinessArea Business Area
SalesOrder SalesOrder Sales and Distribution Document Number
SalesOrderItem SalesOrderItem Sales Document Item
SalesOrderScheduleLine SalesOrderScheduleLine Schedule Line Number
FixedAsset FixedAsset Asset Subnumber
OrderID OrderID Order Number
UnloadingPointName UnloadingPointName Unloading Point Name
ControllingArea ControllingArea Controlling Area
CostObject CostObject Cost Object
ProfitabilitySegment Deprecated: Profitability Segment
ProfitabilitySegment_2 ProfitabilitySegment_2 Profitability Segment
ProfitCenter ProfitCenter Profit Center
WBSElementInternalID WBSElementInternalID Work Breakdown Structure Element (WBS Element)
WBSElementInternalID_2 WBSElementInternalID_2 WBS Element
ProjectNetworkInternalID ProjectNetworkInternalID Routing number of operations in the order
CommitmentItem CommitmentItem Commitment item
CommitmentItemShortID CommitmentItemShortID Commitment Item Short ID
FundsCenter FundsCenter Funds Center
Fund Fund Sender Fund
FunctionalArea FunctionalArea Sendr Fctl Area
GoodsRecipientName GoodsRecipientName Goods Recipient
IsFinallyInvoiced IsFinallyInvoiced Final Invoice Indicator
RealEstateObject Internal Key for Real Estate Object
REInternalFinNumber REInternalFinNumber Internal Key of Real Estate Object (FI)
NetworkActivityInternalID NetworkActivityInternalID Internal counter
PartnerAccountNumber PartnerAccountNumber Partner account number
JointVentureRecoveryCode JointVentureRecoveryCode Recovery Indicator
SettlementReferenceDate SettlementReferenceDate Reference date for settlement
OrderInternalID OrderInternalID Routing number of operations in the order
OrderIntBillOfOperationsItem OrderIntBillOfOperationsItem Order Internal Bill of Operations Item
TaxCode TaxCode Tax on sales/purchases code
TaxJurisdiction TaxJurisdiction Tax Jurisdiction
NonDeductibleInputTaxAmount NonDeductibleInputTaxAmount Non-deductible input tax
CostCtrActivityType CostCtrActivityType Activity Type
BusinessProcess BusinessProcess Business Process
GrantID GrantID Sender Grant
BudgetPeriod BudgetPeriod Budget Period
EarmarkedFundsDocument EarmarkedFundsDocument Document Number for Earmarked Funds
EarmarkedFundsItem EarmarkedFundsItem Earmarked Funds: Document Item
EarmarkedFundsDocumentItem EarmarkedFundsDocumentItem Earmarked Funds: Document Item
ServiceDocumentType ServiceDocumentType Service Document Type
ServiceDocument ServiceDocument Service Document ID
ServiceDocumentItem ServiceDocumentItem Service Document Item ID
_PurchaseOrder _PurchaseOrder
_PurchaseOrderItem _PurchaseOrderItem

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_PurOrdAccountAssignmentAPI01.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- SQL view name: IMMPURORDAAAPI01

CREATE VIEW I_PurOrdAccountAssignmentAPI01 AS
SELECT
  PurchaseOrder,
  PurchaseOrderItem,
  AccountAssignmentNumber,
  CostCenter,
  MasterFixedAsset,
  ProjectNetwork,
  Quantity,
  OrderQuantityUnit AS PurchaseOrderQuantityUnit,
  MultipleAcctAssgmtDistrPercent,
  PurgDocNetAmount,
  DocumentCurrency,
  IsDeleted,
  GLAccount,
  BusinessArea,
  SalesOrder,
  SalesOrderItem,
  SalesOrderScheduleLine,
  FixedAsset,
  OrderID,
  UnloadingPointName,
  ControllingArea,
  CostObject,
  cast( case when ProfitabilitySegment_2 > '9999999999' then '9999999999' else lpad( ProfitabilitySegment_2, 10, '0' ) end as rkeobjnr_numc ) AS ProfitabilitySegment,
  ProfitabilitySegment_2,
  ProfitCenter,
  WBSElementInternalID,
  WBSElementInternalID_2,
  ProjectNetworkInternalID,
  CommitmentItem,
  CommitmentItemShortID,
  FundsCenter,
  Fund,
  FunctionalArea,
  GoodsRecipientName,
  IsFinallyInvoiced,
  cast (REInternalFinNumber as imkey preserving type ) AS RealEstateObject,
  REInternalFinNumber,
  NetworkActivityInternalID,
  PartnerAccountNumber,
  JointVentureRecoveryCode,
  SettlementReferenceDate,
  OrderInternalID,
  OrderIntBillOfOperationsItem,
  TaxCode,
  TaxJurisdiction,
  NonDeductibleInputTaxAmount,
  CostCtrActivityType,
  BusinessProcess,
  GrantID,
  BudgetPeriod,
  EarmarkedFundsDocument,
  EarmarkedFundsItem,
  EarmarkedFundsDocumentItem,
  ServiceDocumentType,
  ServiceDocument,
  ServiceDocumentItem
FROM I_PurOrdAccountAssignment
LEFT OUTER JOIN I_PurchaseOrderAPI01 AS _PurchaseOrder ON PurchaseOrder = _PurchaseOrder.PurchaseOrder  -- association [1..1]
LEFT OUTER JOIN I_PurchaseOrderItemAPI01 AS _PurchaseOrderItem ON PurchaseOrder = _PurchaseOrderItem.PurchaseOrder AND PurchaseOrderItem = _PurchaseOrderItem.PurchaseOrderItem  -- association [1..1]
;