0% found this document useful (1 vote)
139 views2 pages

Assignment Report

The document describes a report to analyze purchasing contracts and related purchase order items. It specifies selection criteria for contracts and includes logic to retrieve related purchase order and item data. The report will display contracts with selection criteria values and lists items for each contract with fields including item, material, quantity, price, planned spend, actual spend calculated from purchase orders, and variance between planned and actual spend.

Uploaded by

Janakiram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
139 views2 pages

Assignment Report

The document describes a report to analyze purchasing contracts and related purchase order items. It specifies selection criteria for contracts and includes logic to retrieve related purchase order and item data. The report will display contracts with selection criteria values and lists items for each contract with fields including item, material, quantity, price, planned spend, actual spend calculated from purchase orders, and variance between planned and actual spend.

Uploaded by

Janakiram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

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).

ABAP Training Page 1 of 2


Assignment - Report

Report layout
For each Contract, show the following:

Contract No.: EKKO-EBELN


Company Code: EKKO-BUKRS T001-BUTXT (in local language)
Vendor: EKKO-LIFNR LFA1-NAME1 (in local language)
Valid From: EKKO-KDATB Valid To: EKKO-KDATE
Deletion Ind: EKKO-LOEKZ (only show this line if EKKO-LOEKZ is non-
blank)

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

ABAP Training Page 2 of 2

You might also like