Assignment Report
Assignment Report
Selection criteria
Contract Number - EKKO-EBELN
Contract Type - EKKO-BSART
Company Code - EKKO-BUKRS
Purchasing Organisation - EKKO-EKORG
Purchasing Group - EKKO-EKGRP
Vendor - EKKO-LIFNR
Validity Date (default to current date) - Date
Created By - EKKO-ERNAM
Created On - EKKO-AEDAT
Include Deleted Contracts/Items ? - Checkbox
All the above (except Validity Date) should be Select-options to allow ranges,
multiple values etc.
Validity Date should be a Parameter.
Program Logic
Get all entries from table EKKO where EKKO-BSTYP = ‘K’ and the other fields
meet the selection critera entered.
The Validity Date entered must be >= EKKO-KDATB and <= EKKO-KDATE.
If Include Deleted Contracts ? = unset, only select entries where EKKO-LOEKZ
= blank.
If any selection criteria (including Validity Date) is left blank, then the selection of
EKKO entries should not be restricted by that selection criteria.
For each entry found on table EKKO, get the related Contract Items from table
EKPO (i.e. where EKPO-EBELN = EKKO-EBELN).
If Include Deleted Contracts/Items ? = unset, only select entries where EKPO-
LOEKZ = blank.
For each entry found on table EKPO, get the related PO Items from table EKPO
(i.e. where EKPO-KONNR = EKPO-EBELN and EKPO-KTPNR = EKPO-
EBELP and EKPO-LOEKZ = blank). Accumulate EKPO-NETWR to calculate
the Actual Spend of a particular Contract Item.
If the currency of the PO is not the same as the currency of the Contract, then the
value of EKPO-NETWR will need to be converted to the Contract currency
before the accumulation takes place.
Note that all related POs are selected, irrespective of where they are in the
purchasing cycle (e.g. just created, receipted but not invoiced etc).
Report layout
For each Contract, show the following:
Within each Contract, list each Item with the following headings/details going
across the page (i.e. in columns):
Item EKPO-EBELP
Material EKPO-MATNR
Material Description EKPO-TXZ01
Plant EKPO-WERKS
Target Quantity EKPO-KTMNG
UoM EKPO-MEINS
Net Price EKPO-NETPR
Currency EKKO-WAERS
Planned Spend EKPO-KTMNG * EKPO-NETPR
Actual Spend (to-date) Accumulation of EKPO-NETWR (in curr. of
Contract) for all related Pos
Variance (to-date) Actual Spend (to-date) – Planned Spend
Deletion Indicator EKPO-LOEKZ