I_PurOrdAccountAssignmentAPI01
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
| Category | CDS Views for Purchase Orders |
|---|
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
SAP API Hub
| State | C1 |
|---|---|
| Line of Business | Sourcing & Procurement |
| Application Component | MM-PUR-PO |
| Capabilities | Data Source in SQL Select, Data Source for Defining CDS Entities, Association Target for Defining CDS Entities |
| Package | Sourcing & 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
- Analytics with CDS Views — Build Analytics for S/4HANA Cloud Private Edition ABAP CDS views replicated to SAP Cloud Platform
- CDS Views on SAP Business Accelerator Hub — Explore SAP S/4HANA Cloud Private Edition Private Edition CDS Views on SAP Business Accelerator Hub
- Create CDS View as API — Create CDS views in SAP S/4HANA Cloud Private Edition and consume them as APIs
- Custom CDS Views — Access data using a Custom Core Data Service view (Custom CDS view)
- Key User Extensibility Tools — The Key User Extensibility Tools of S/4HANA
- SAP Extensibility Explorer for SAP S/4HANA Cloud Private Edition — Explore SAP S/4HANA Cloud Private Edition Extensibility options by leveraging the sample scenarios from SAP
- SAP S/4HANA Extensibility — SAP S/4HANA Extensibility Tutorial
- VDM View Types — The Virtual Data Model in SAP S/4HANA Cloud Private Edition
- View Browser — Search, browse and tag CDS Views
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_PurOrdAccountAssignment | I_PurOrdAccountAssignment | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [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)
| Name | Value | Level | Field |
|---|---|---|---|
| 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)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| 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]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA