C_PurDocListPRStatus
Purchase Requisition Status
C_PurDocListPRStatus is a Consumption CDS View that provides data about "Purchase Requisition Status" in SAP S/4HANA. It reads from 1 data source (I_Purchaserequisitionitem) and exposes 3 fields with key fields PurchaseRequisition, PurchaseRequisitionItem.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_Purchaserequisitionitem | eban | from |
Annotations (5)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | CDOCLPRSTATUS | view | |
| EndUserText.label | Purchase Requisition Status | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| VDM.private | true | view |
Fields (3)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseRequisition | I_Purchaserequisitionitem | PurchaseRequisition | |
| KEY | PurchaseRequisitionItem | I_Purchaserequisitionitem | PurchaseRequisitionItem | |
| char2OrderedendendendasCompletionStatus |
@AbapCatalog.sqlViewName: 'CDOCLPRSTATUS'
@EndUserText.label: 'Purchase Requisition Status'
@VDM.viewType: #CONSUMPTION
@AccessControl.authorizationCheck: #PRIVILEGED_ONLY
@VDM.private: true
/***********************************************************************************************************/
/* ME2STAR: Purchasing Requisition Item status
10 : Deleted
08 : Rejected
22 : Created
23 : Ordered
21 : Approved */
/***********************************************************************************************************/
define view C_PurDocListPRStatus
as select from I_Purchaserequisitionitem as eban
{key eban.PurchaseRequisition,
key eban.PurchaseRequisitionItem,
case eban.IsDeleted
when 'X' then cast('10' as abap.char(2)) --> "Deleted"
when 'L' then cast('10' as abap.char(2)) --> "Deleted"
when 'S' then cast('10' as abap.char(2)) --> "Deleted"
else
case eban.PurReqnReleaseStatus
when '08' then cast('16' as abap.char(2)) --> "Release Rejected"
// when '02' then cast('21' as abap.char(2)) --> "Release Approved"
// when '05' then cast('21' as abap.char(2)) --> "Release Approved"
else case eban.ProcessingStatus
when 'N' then cast('27' as abap.char(2)) --> "Created"
else cast('23' as abap.char(2)) --> "Ordered"
end
end
end as CompletionStatus
} group by eban.PurchaseRequisition, eban.PurchaseRequisitionItem, eban.ProcessingStatus, eban.PurReqnReleaseStatus,eban.IsDeleted;
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASEREQUISITIONITEM"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/
Learn More
- What Is a CDS View in SAP S/4HANA?
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- CDS View Annotations — A Complete Guide
- 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