P_InfoRecordLeadTime
P_InfoRecordLeadTime is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (I_PurchasingInfoRecord, I_PurgInfoRecdOrgPlantData, P_StandardPurchaseOrders) and exposes 7 fields.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchasingInfoRecord | _eina | from |
| I_PurgInfoRecdOrgPlantData | _eine | inner |
| P_StandardPurchaseOrders | P_StandardPurchaseOrders | left_outer |
Parameters (2)
| Name | Type | Default |
|---|---|---|
| p_days | abap.int2 | |
| p_date | sydatum |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PINFORECORDLT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (7)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| Material | I_PurchasingInfoRecord | Material | ||
| Plant | I_PurgInfoRecdOrgPlantData | Plant | ||
| PlantendasMRPArea | ||||
| PurchasingInfoRecord | I_PurgInfoRecdOrgPlantData | PurchasingInfoRecord | ||
| PurchasingOrganization | I_PurgInfoRecdOrgPlantData | PurchasingOrganization | ||
| PurchasingDocument | PurchasingDocument | |||
| PurchasingDocumentItem | PurchasingDocumentItem |
@AbapCatalog.sqlViewName: 'PINFORECORDLT'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.viewType: #COMPOSITE
@VDM.private: true
@ClientHandling.algorithm: #SESSION_VARIABLE
define view P_InfoRecordLeadTime
with parameters
p_days : abap.int2,
p_date : sydatum
as select from I_PurchasingInfoRecord as _eina
inner join I_PurgInfoRecdOrgPlantData as _eine on _eina.PurchasingInfoRecord = _eine.PurchasingInfoRecord
left outer join P_StandardPurchaseOrders (p_days : $parameters.p_days,
p_date : $parameters.p_date ) as _orders on _eine.PurchasingInfoRecord = _orders.PurchasingInfoRecord
and _eine.Plant = _orders.Plant
and _eina.Material = _orders.Material
and _eine.PurchasingOrganization = _orders.PurchasingOrganization
{
_eina.Material,
_eine.Plant,
case
when MRPArea is not null
then MRPArea
else
_eine.Plant
end as MRPArea,
_eine.PurchasingInfoRecord,
_eine.PurchasingOrganization,
case
when _orders.ReplenishmentType is not null
then 'PO'
else
'NPO'
end as STATUS,
case
when _orders.ReplenishmentType is not null
then _orders.ReplenishmentType
else
'B'
end as ReplenishmentType,
PurchasingDocument,
PurchasingDocumentItem,
case
when _orders.DifferenceInDays is not null
then
cast( _orders.DifferenceInDays as abap.dec( 7, 2 ))
else
_eine.MaterialPlannedDeliveryDurn
end as DifferenceInDays
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASINGINFORECORD",
"I_PURGINFORECDORGPLANTDATA",
"P_STANDARDPURCHASEORDERS"
],
"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