18 lines
797 B
Plaintext
18 lines
797 B
Plaintext
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
|
@EndUserText.label: 'Purchase order value'
|
|
define view entity {{P}}I_PO_VALUE
|
|
as select from {{p}}po_head as head
|
|
left outer join {{p}}po_item as item on item.po_no = head.po_no
|
|
and item.fiscal_year = head.fiscal_year
|
|
{
|
|
key head.po_no as po_no,
|
|
key head.fiscal_year as fiscal_year,
|
|
head.supplier as supplier,
|
|
count( * ) as item_count,
|
|
sum( cast( item.quantity as abap.dec( 13, 0 ) ) * item.price ) as total_value
|
|
}
|
|
group by
|
|
head.po_no,
|
|
head.fiscal_year,
|
|
head.supplier
|