I_SADL_Complex_Core

DDL: I_SADL_COMPLEX_CORE SQL: ISADLCOCO Type: view

Core view with joins/unions/where-clause

I_SADL_Complex_Core is a CDS View that provides data about "Core view with joins/unions/where-clause" in SAP S/4HANA. It reads from 3 data sources (snwd_so, snwd_so_i, snwd_so_i) and exposes 15 fields with key fields SalesOrder, ItemPosition, ItemPosition.

Data Sources (3)

SourceAliasJoin Type
snwd_so header inner
snwd_so_i item from
snwd_so_i item union_all

Annotations (2)

NameValueLevelField
AbapCatalog.sqlViewName ISADLCOCO view
EndUserText.label Core view with joins/unions/where-clause view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY SalesOrder snwd_so so_id
KEY ItemPosition snwd_so_i so_item_pos
CurrencyCode snwd_so_i currency_code
GrossAmount snwd_so_i gross_amount
NetAmount snwd_so_i net_amount
TaxAmount snwd_so_i tax_amount
AnyFlag
ItemPositionkey0000000000asSalesOrder
KEY ItemPosition snwd_so_i so_item_pos
CurrencyCode snwd_so_i currency_code
GrossAmount snwd_so_i gross_amount
NetAmount snwd_so_i net_amount
TaxAmount snwd_so_i tax_amount
AnyFlag
_Something _Something
@AbapCatalog.sqlViewName: 'ISADLCOCO'
@EndUserText.label: 'Core view with joins/unions/where-clause'

define view I_SADL_Complex_Core as 

select from snwd_so_i as item 
 inner join snwd_so as header on item.parent_key = header.node_key
 
 association to i_sadl_complex_core as _Something on _Something.SalesOrder = '1000000000' and _Something.ItemPosition = $projection.ItemPosition
{
 key header.so_id as SalesOrder,
 key item.so_item_pos as ItemPosition, 
 
 item.currency_code as CurrencyCode, 
 item.gross_amount as GrossAmount, 
 item.net_amount as NetAmount, 
 item.tax_amount as TaxAmount,
 
 cast('X' as boole_d preserving type ) as AnyFlag,
 _Something
}
where header.delivery_status = 'D'

union all

select from snwd_so_i as item
 association to i_sadl_complex_core as _Something on _Something.SalesOrder = '1000000000' and _Something.ItemPosition = $projection.ItemPosition 
{
 key '0000000000' as SalesOrder,
 key item.so_item_pos as ItemPosition, 
 
 item.currency_code as CurrencyCode, 
 item.gross_amount as GrossAmount, 
 item.net_amount as NetAmount, 
 item.tax_amount as TaxAmount,
 
 cast(' ' as boole_d preserving type) as AnyFlag,
 _Something
}
where item.op_item_pos = '0000000000'