I_ARunPreview
Basic View for Preview Run data
I_ARunPreview is a Basic CDS View that provides data about "Basic View for Preview Run data" in SAP S/4HANA. It reads from 1 data source (arun_preview) and exposes 25 fields.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| arun_preview | arun_preview | from |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Basic View for Preview Run data | view | |
| VDM.viewType | #BASIC | view | |
| VDM.lifecycle.contract.type | #PUBLIC_LOCAL_API | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| AbapCatalog.sqlViewName | IARUNPREVIEW | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #B | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view |
Fields (25)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| ARunUUID | arunid | |||
| Plant | plant | |||
| Material | material | |||
| RequirementType | req_ind | |||
| SupplyAssignmentStatus | arun_status | |||
| AssignedSupplyType | stock_source | |||
| char12endasSupplyNumber | ||||
| char5endasSupplyItem | ||||
| char4endasSupplyScheduleLine | ||||
| Batch | batch | |||
| StorageLocation | storage_location | |||
| AssignedQuantityInBaseUnit | alloc_qty | |||
| PreviewFixedAssignedQtyInBsUnt | ||||
| PreviewReservedAssgdQtyInBsUnt | ||||
| PreviewOnHoldAssgdQtyInBsUnt | ||||
| PreviewRdyForReleaseQtyInBsUnt | ||||
| BaseUnit | material_baseunit | |||
| RequestedDate | requested_date | |||
| ProductAvailabilityDate | material_avail_date | |||
| SupplyDeliveryDate | ||||
| NumberOfDays | ||||
| CreationDateTime | creation_time | |||
| LastChangeByUser | changed_by | |||
| RequirementSegment | req_segment | |||
| StockSegment | stk_segment |
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Basic View for Preview Run data'
@VDM: {
viewType: #BASIC,
lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
authorizationCheck: #NOT_REQUIRED,
personalData.blocking: #('TRANSACTIONAL_DATA')
}
@AbapCatalog: {
sqlViewName: 'IARUNPREVIEW',
compiler.compareFilter: true
}
@ObjectModel: {
usageType: {
dataClass: #TRANSACTIONAL,
serviceQuality: #B,
sizeCategory: #XXL
}
}
define view I_ARunPreview
as select from arun_preview
{
arunid as ARunUUID,
plant as Plant,
material as Material,
req_ind as RequirementType,
arun_status as SupplyAssignmentStatus,
case req_ind
when 'VC' then salesdoc_num
when 'VI' then salesdoc_num
when 'VG' then salesdoc_num
when 'U1' then purchdoc_num
when 'BB' then reserv_num
when 'AR' then reserv_num
else LPAD('',10,'0')
end as RequirementDocumentNumber,
case req_ind
when 'VC' then salesdoc_item
when 'VI' then salesdoc_item
when 'VG' then salesdoc_item
when 'U1' then LPAD(purchdoc_item,6,'0')
when 'BB' then LPAD(reserv_item,6,'0')
when 'AR' then LPAD(reserv_item,6,'0')
else LPAD('',6,'0')
end as RequirementDocumentItem,
stock_source as AssignedSupplyType,
case stock_source
when 'B' then cast(purchord_num as abap.char(12))
when 'F' then cast(prodord_num as abap.char(12))
when 'L' then cast(purchord_num as abap.char(12))
when 'P' then cast(plnum as abap.char(12))
when 'A' then cast(purchord_num as abap.char(12))
else cast('' as abap.char(12))
end as SupplyNumber,
case stock_source
when 'B' then cast(purchord_item as abap.char(5))
when 'F' then cast(prodord_item as abap.char(5))
when 'A' then cast(purchord_item as abap.char(5))
when 'L' then cast(purchord_item as abap.char(5))
else cast('' as abap.char(5))
end as SupplyItem,
case stock_source
when 'B' then cast(purchord_sch as abap.char(4))
when 'L' then cast(confirmation_no as abap.char(4))
else cast('' as abap.char(4))
end as SupplyScheduleLine,
batch as Batch,
storage_location as StorageLocation,
alloc_qty as AssignedQuantityInBaseUnit,
case when arun_status = 'F' then alloc_qty else 0 end as PreviewFixedAssignedQtyInBsUnt,
case when arun_status = 'R' then alloc_qty else 0 end as PreviewReservedAssgdQtyInBsUnt,
case when arun_status = 'H' then alloc_qty else 0 end as PreviewOnHoldAssgdQtyInBsUnt,
case when arun_status = 'O' then alloc_qty else 0 end as PreviewRdyForReleaseQtyInBsUnt,
material_baseunit as BaseUnit,
requested_date as RequestedDate,
material_avail_date as ProductAvailabilityDate,
case when stock_source = 'S' or stock_source = 'C' then cast( $session.system_date as abap.dats ) else delivery_date_po end as SupplyDeliveryDate,
case when stock_source = 'S' or stock_source = 'C' then 0 else DATS_DAYS_BETWEEN( material_avail_date, delivery_date_po ) end as NumberOfDays,
// arun_mode as SupplyAssignmentRunMode,
creation_time as CreationDateTime,
changed_by as LastChangeByUser,
// mat_avail_date_mrp as MRPMaterialAvailabilityDate,
req_segment as RequirementSegment,
stk_segment as StockSegment
}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"ARUN_PREVIEW"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0
}
}*/
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