Files
abap-llm/tasks_gen/train/G1091/faulty/m3_i_po_value.ddls.asddls
2026-10-05 18:02:52 +02:00

18 lines
793 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
inner 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