Forms & Reports Functional Specification
Excess and Zero demand Update Program
VERSION:1.0LAST UPDATED:07/12/2013
DOCUMENT CONTROL:
REVISION HISTORY:
Version #Date ModifiedModified ByBrief Description of Change
1.007/12/2013xxxxxxxxxxxExisting program ZMTGEOUPDATE needs to
be copied and further modification such as PIM code, additional z
tables and etc
APPROVALS:
AuthorxxxxxxxxxxxxxDate Created:06/15/2013
Functional Team Lead xxxxxxxxxxxxxxxSignature and Date
Approved:
Business Process OwnerxxxxxxxxxxxxxxxSignature and Date
Approved:
Technical Team LeadxxxxxxxxxxxxSignature and Date Approved:
Project ManagerxxxxxxxxxxxxxxxSignature and Date Approved:
TABLE OF CONTENTS:
I.INTRODUCTION5A.Purpose of the document5B.Request
Overview5II.OVERVIEW6A.Business Driver6B.Key business
requirements6C.High level Process overview6III.DETAILS6A.Detail
Processing Logic6B.Selection Screen14C.Report/Form Layout14D.Paper
Requirements14E.Print Requirement15F.Special
characteristics15G.Exception Handling Rules15H.Special
Requirements15I.Dependencies15J.Constraints15K.Scheduling
Requirements15L.Test Specification151.Functional Test
Scenarios152.Test Data & Other Needs163.Test System &
Environment16M.Audit Requirements/Integrity
Controls16N.Security/Authorization Requirements16IV.TECHNICAL
SECTION17A.Object Type:17B.All Z Objects Information18C.Detail
Technical Specification18D.Open Item / Issues Log / Proposed
Solutions (keep all history)18
Forms and Reports Functional Specification
Business Transformation Phase 2B Page 14 of
20INTRODUCTIONPurpose of the documentTo calculate Excess and Zero
demand based on demand forecast and on hand inventory, with
applicable Time & Reserve percentage.
Request Overview
1. Scenario ID:2. Scenario Title:3. Process ID:4. Process
Title:5. Development Spec ID: 6. Name of Enhancement:7. Short
Description:
8. Type: |X| ABAP Report |_| Form |_| Query|_|
Other_________________9. Tools used|X| ABAP Program |_| Report
Painter|_| Report Writer |_| Information System |_| ALV|_| SAP
Script|_| Smartform|_| Other10. Data latency:|X| Batch |_|
On-demand11. Frequency:|_| Annually|X| Quarterly |_| Monthly |_|
Weekly |_| Daily |_| Other12. Requesting Team:
____________________13. Systems Impacted: |X| R/3 |_| CRM |_| APO
|_| EBP |_| BW |_| SEM |_|Other____________14. Modules Impacted:
|X| FI |_| CO |_| SD |X| MM |X| PP |_| QM |_| BW |_|
SEM|_|Other____________15. Complexity |_| High |X| Medium |_|
Low16. Spec Created on: 05/30/201317. Date required
by:07/01/201318. Created by: __xxxxxxxxxx_______ Phone:19.
Functional Analyst: __ xxxxxxxxxx _______ Phone:20. Technical
Analyst: _____________________________ Phone:21. Business Owner:
__xxxxxxxxxxx_______ Phone:
OVERVIEWBusiness DriverInventories are stated at the lower of
cost (first-in, first-out method) or market. On a quarterly basis,
Xxxxxxxx Semiconductor assesses the realizable value of all
inventories to determine whether adjustments for impairment are
required. Inventory that is obsolete or in excess of forecasted
usage is written down to its estimated realizable value based on
assumptions about future demand and market conditions.
Key business requirementsSystem should be able calculate Excess
and Zero demand based on demand forecast and on hand inventory,
with applicable Time & Reserve percentage.System should
consider demand and inventory of Xxxxxxxx inventory only. As after
Xxxxxxxx integration with YYYYYY Corp SAP, inventory will be
comingled with Xxxxxxxx and AGS inventory.
High level Process overview E&Z process overview
DETAILS
Detail Processing Logic
Step A : Xxxxxxxx program ZMTGEOUPDATE which is in Xxxxxxxx
system, needs to be copied and modified to meet YYYYYY
requirements.
Step B : Create table ZMEOPLANT and ZMEOPERIOD which are in
xxxxxxxx system
Step C : Below is the additional logic to be added in Program
ZMTGEOUPDATE for Xxxxxxxx migration project :
STEP 1 : In selection parameter, additional field PIM
code(Production/Inspection memo) to be added. As after migration
project, both Xxxxxxxx and AGS inventory will be in comingled
status. Therefore E&Z calc program needs to pick only Xxxxxxxx
material for further processing including inventory in AGS
plants(defined in selection parameter)
STEP 2 : Based on PIM code(MARA-FERTH) value defined in
selection parameter, go to table MARA with material from internal
table of MDKP records( MRP header records) and update PIM code
value against line item of MDKP internal database. If PIM code
field in selection parameter is blank, then get all records
including update respective value found in MARA ie blank, xxxxxxxx
PIM, AGS PIM and etc.
STEP 3 : Results of this program are updated in two table
ZMEOPLANT and ZMEOPERIOD. Additional field for PIM value need to be
added to the exist table ZMEOPLANT and ZMEROPERIOD. When results
are updated in these two tables, PIM value also needs to be updated
which has been stored in internal table of MDKP. Create new field
name ZMEOPLANT- FERTH and ZMEOPERIOD- FERTH in respective tables
for PIM
STEP 4 : Historical usage (ZMEOPLANT-USAGE12) date calc changes
: Currently program uses last 12 month consumption excluding
current month in program is run using table mver. For SSG, business
needs to calc historical usage including current quarter in which
program has run and previous last 4 quarters .ie last 4 quarters
plus current quarter consumption.
STEP 5 : Time stamp field update in Table ZMEOPLANT and
ZMEOPERIOD : Currently table ZMEOPLANT and ZMEOPERIOD doesnt have
time stamp when records are inserted. As records from these tables
will be extracted into BI for E&Z reporting, therefore as a
best practice its better have time stamp. Below are two fields to
be added for time stamp. 1) Time stamp of record insert, 2) Time
stamp of records changes.
STEP 6 : Tcode ZMTGEOUPDATE to be created for program
ZMTGEOUPDATE
=====================================================
Below is the existing logic of E&Z calc program
ZMTGEOUPDATE. Note : Logic is read by me (functional analyst) which
will give overview of the program logic but may not provide
compressive details or its accuracy.
Get Plant Data :From the plant entered in Selection parameter,
get plant details from T001W. Also get company code details using
plants from T001KGet fiscal year xxxxxxxxt from company code table
from T001Save the fiscal year xxxxxxxxt for the primary plant Keep
above data in internal table t_zmeot001
Get dates from various selections for (1) avg monthly MRP
requirements and (2) month range for consumption history :(1) avg
monthly MRP requirements - Current date (when program is run) to
next 3 months i.e., next 4 months.(2) fiscal month range for
consumption history - The month range is a 12 month period ending
with last fiscal month. (previous 12 months)(3) Dates of 4 period
buckets : Based on Start date of first E&O period field from
selection parameter, 4 period buckets are determined. Period 1
bucket, from first date of current month(based on start date of
first E&O period field) to next 12 months( 12 months period
picked from no. of months period field of table ZMEOPARMS) . Then
period 2 bucket, from first day of 13 month to next 10
months(picked from table ZMEOPARMS) and then period 3 bucket, from
first of 23 months to next 14 months (picked from table ZMEOPARMS
based on period nbr) Based on fiscal year xxxxxxxxt of primary
plant(t_zmeot001) from step Get plant Data, periods are
calculated.
Get MRP Document headers :1. If planning Scenario is blank in
selection parameter then get MD (Type of MRP list) from MDKP. i.e.,
if LTP is not run for demand forecasting. But if planning scenario
is entered in selection parameter then get data LP (Type of MRP
list) from MDKP. Below data needs to be collected for all LP or MD
records :Material Number MATNR, Plant(PLWRK), Planning Scenario of
Long-Term Planning(PLSCN), MRP date(DSDAT), Number of material
requirements planning table(DTNUM), Base Unit of Measure(MEINS),
Safety Stock(EISBE), Aggregated MRP list(CFLAG), MRP Type(DISMM),
Message identification(MSGID), Message Type(MSGAR), Message
number(MSGNR),
2. Get all non-planning materials ( ND materials) Based on
material, plant in selection parameter and ND MRP type (MARC-dismm)
, records are pulled from material master data(MARC).ND records
collected are added into step 1 LTP run records ( MDKP records). If
records already exist then records is updated with MRP type ND,
else record is added to MDKP records. process_material_localGet
material and plant details :Based on material and plant in MDKP,
get additional fields from Material master, such Profit center, MRP
Controller (Materials Planner), Procurement Type, Special
procurement type.Standard cost update to MDKP records If plant is
0930, then get standard cost of material from MBEW. Other plant,
get Standard cost of material from material ledger tables ( ckmlhd/
ckmlcr).
For the MDKP records where MRP type is not ND( normal planning
materials) Based on Aggregated MRP list (mdkp-cflag) get MRP line
items from mdtbIf Availability indicator (MDTB- vrfkz) is flagged,
then process below If Receipt/issue indicator((mdtb-plumi) = -(
which means requirement), and Receipt/requirements
date(mdtb-dat00)falls between current date to Avg monthly MRP date
ie with 4 months, then keep in zmeoplant-avreq12 internal
table.Else ie other records are processed belowBased on MRP element
(mdtb-delkz), records are selected into various category- When
'WB'. "Plant stock = zmeoplant-onhnd WHEN 'LB'. "Storage location
stock= zmeoplant-onhnd WHEN 'KB'. "Sales order stock =
zmeoplant-onhnd WHEN 'LK'. "Sub contract stock = zmeoplant-onhndlk
WHEN 'QM'. "QM stock = zmeoplant-onhndqm WHEN 'BE'. "Purchase Order
Then with this PO go to EKPO to find out if Purchasing Document
Type(ekko-bsart) is 'ZG'("STOCK TRANSPORT PO ) or PO vendor
ekko-lifnr is(from selection parameter)"Internal vendor range =
zmeoplant-onordipoAll other PO = zmeoplant-onordepo
WHEN 'BA'. "Purchase Requisition = zmeoplant-onordprq WHEN 'FE'.
"Production Order (SWO)= zmeoplant-onordswo Get CO order balance (
using aufk and FM K_BALANCE_GET)
WHEN 'PA' "Planned Order OR 'SA'. "Simulated Planned Order=
zmeoplant-onordplo
WHEN 'SB' "(reduction of reqts) OR 'SM'. "Simulated Reqts
(reduction of reqts)Then put qty in zmeoplant-avreq12(4 months avg
MRP req)
Other MRP elements(unexpected MRP elements), show in separate
message tab
If necessary, get the demand forecast and include it as
additional requirements. This only applies to materials with MRP
type PE when using LTP data.
If MRP Type(mdkp-dismm ) is PE, then obtain these forecast based
on selection material & plant from ( FM MPOP_SINGLE_READ) and
keep records in zmeoplant-avreq12(4months avg MRP req)
Subtract and vendor consignment stock from the on-hand Obtain
vendor consignment stock from MARD and deduction from on hand
inventoryzmeoplant-onhnd = zmeoplant-onhnd - consign_qty
Blocked stock to be added to On-hand inventory Get blocked stock
for the plant when in selection parameter and add to on hand
inventory
*Computethetotalon-handzmeoplant-totonhnd=zmeoplant-onhnd+zmeoplant-onhndkb+zmeoplant-onhndlk+zmeoplant-onhndqm+zmeoplant-onordipo+block_qty.
*Convertthesumofnext4monthsMRPreqtstoa12monthbasiszmeoplant-avreq12=zmeoplant-avreq12*3.
For the MDKP records where MRP type are ND( normal planning
materials) get_mrp_documents_nd
Inventory is obtained for material where planning is not done as
material master has MRP status of ND. So for these materials,
inventory and requirements are obtained from Stock requirement
list.
Using FM 'MD_STOCK_REQUIREMENTS_LIST_API', records are
extracted.
Based on Aggregated MRP list (mdkp-cflag) get MRP line items
from mdtbIf Availability indicator (MDTB- vrfkz) is flagged, then
process below If Receipt/issue indicator((mdtb-plumi) = -( which
means requirement), and Receipt/requirements date(mdtb-dat00)falls
between current date to Avg monthly MRP date ie with 4 months, then
keep in zmeoplant-avreq12 internal table.Else ie other records are
processed belowBased on MRP element (mdtb-delkz), records are
selected into various categories- When 'WB'. "Plant stock =
zmeoplant-onhnd WHEN 'LB'. "Storage location stock= zmeoplant-onhnd
WHEN 'KB'. "Sales order stock = zmeoplant-onhnd WHEN 'LK'. "Sub
contract stock = zmeoplant-onhndlk WHEN 'QM'. "QM stock =
zmeoplant-onhndqm WHEN 'BE'. "Purchase Order Then with this PO go
to EKPO to find out if Purchasing Document Type(ekko-bsart) is
'ZG'("STOCK TRANSPORT PO ) or PO vendor ekko-lifnr is(from
selection parameter)"Internal vendor range = zmeoplant-onordipoAll
other PO = zmeoplant-onordepo
WHEN 'BA'. "Purchase Requisition = zmeoplant-onordprq WHEN 'FE'.
"Production Order (SWO)= zmeoplant-onordswo Get CO order balance (
using aufk and FM K_BALANCE_GET)
WHEN 'PA' "Planned Order OR 'SA'. "Simulated Planned Order=
zmeoplant-onordplo
WHEN 'SB' "(reduction of reqts) OR 'SM'. "Simulated Reqts
(reduction of reqts)Then put qty in zmeoplant-avreq12(4 months avg
MRP req)
Other MRP elements(unexpected MRP elements), show in separate
message tab
If necessary, get the demand forecast and include it as
additional requirements. This only applies to materials with MRP
type PE when using LTP data.
If MRP Type(mdkp-dismm ) is PE, then obtain these forecast based
on selection material & plant from ( FM MPOP_SINGLE_READ) and
keep records in zmeoplant-avreq12(4months avg MRP req)
Subtract and vendor consignment stock from the on-hand Obtain
vendor consignment stock from MARD and deduction from on hand
inventoryzmeoplant-onhnd = zmeoplant-onhnd - consign_qty
Blocked stock to be added to On-hand inventory Get blocked stock
for the plant when in selection parameter and add to on hand
inventory
*Computethetotalon-handzmeoplant-totonhnd=zmeoplant-onhnd+zmeoplant-onhndkb+zmeoplant-onhndlk+zmeoplant-onhndqm+zmeoplant-onordipo+block_qty.
*Convertthesumofnext4monthsMRPreqtstoa12monthbasiszmeoplant-avreq12=zmeoplant-avreq12*3.
Table ZMEOPARMS setup Time & Reserve % :
Table ZMEOPARMS where user maintain time and reserve % for
calculation of reserve amount on excess inventory.
Selection Screen
Program ZMTGEOUPDATE selection screen :
Screen LabelReferenced FieldRange of ValueAttributes, Default
ValuesValidations / ChecksComments/ Selection Criteria (select
options, parameters, radio buttons, checkboxes)
PIMMARA-FERTHYN
Report/Form LayoutAdditional fields to be updated in table
ZMEOPLANT and ZMEOPERIOD :1) Add PIM field(FERTH) to table
ZMEOPLANT and ZMEOPERIOD and update values of PIM to the field.
Please create with field name ZMEOPLANT- FERTH and ZMEOPERIOD-
FERTH2) Time stamp of record insert3) Time stamp of record
changes
No Product master table fields in ECC update program as
discussed with business. Since these reporting values will be
available in E&Z BI reportPaper RequirementsNA
Print Requirement
Special characteristics< Sorting, grouping, where total or
subtotals should occur, if any, drilldown, etc.>
Exception Handling Rules
Special Requirements
Dependencies
Constraints As program will be run not just for plants of
Xxxxxxxx but also AGS related plant. Therefore, special
consideration is required on performance improvement of the
program
Scheduling RequirementsProgram will be run during off-peak hours
and in background mode immediately after LTP run program is
finished. Process is to run on the last Saturday of the 1st month
of the quarter. Program will run only once in quarter
Test Specification
Will be part of Xxxxxxxx migration project time lineFunctional
Test Scenarios
IDTest ScenarioExpected ResultsComments
1Validation of PIM material : Pick a material having PIM code in
material master of xxxxxxxx plart. Xxxxxxxx plart showing up in the
table ZMEOPLANT and ZMEOPERIOD
2Validation of standard cost Check if standard cost is picked
from master plant entered in selection paratemer
3Validate On hand qty figures displayed in E&Z reportCheck
the values of on hand qty figures of E&Z report with MB5B
report for a particular material
Test Data & Other Needs
Demand forecast data needs to be uploaded and LTP run should be
executed successfully.
Test System & Environment
Test System:
Client:
Audit Requirements/Integrity Controls
Security/Authorization Requirements
Program ZMTGEOUPDATE is very critical and important step of
E&Z process from quarter close prosperity to post E&Z
reserve. And program ZMTGEOUPDATE updates two Z tables, from which
results are analysied. Therefore Program ZMTGEOUPDATE will be
accessable to run by only few business user.
E&Z program will be included in planner roles.
Tcode ZMTGEOUPDATE : access to run program and update in Table
ZMEOPERIOD and ZMEOPLANT. Specific role of E&Z process need to
be created and access provided to few business user. As currently
available in Xxxxxxxx systemTable ZMEOPERIOD and ZMEOPLANT : Read
access for these table to user as currently available in xxxxxxxx
system.
TECHNICAL SECTION
Object Type:Report (X ) Interface ( ) Conversion ( )Enhancement
( ) Workflow ( ) Form ( )WebDynpro ( )Other ( ) Specify:
_____________
All Z Objects InformationObject TypeReport
Object NameZAFGR177
Object DescriptionExcess and Obsolete Update
Development ClassZAFG
Transaction CodeZAFGR177
Message ClassZZ
Other Relevant InformationNA
Detail Technical SpecificationRequirement:
There was a requirement to copy the Xxxxxxxx report ZMTGEOUPDATE
into xxxx following the xxxx standards and do the fine tuning.
Solution:
The Solution can be done with the functionality established in
Xxxxxxxx System and create a new report ZAFGR177 in xxxx system
.
Details Logic Implemented:
Selection screen for user
input--------------------------------Primary plant(for master data)
( p_plwrk)Plants in E&O(s_werks)E&O run ID (p_runid )Start
date of first E&O period (p_mrpdat)Parameter set (p_parms
)Material (s_matnr)Internal vendor list (s_lifnr)PIM
Code(s_pmcode)Planning Scenario (p_plscn)
Other Parameters for user
action--------------------------------------Delete data(for RUN
ID)(P_RERUN)Include-PE & ND type materials (P_PEFST)No database
updates (P_TEST)
option for No. of records to be insert in to table in one sort
(Default
5,000)------------------------------------------------------------Nbr
of DB inserts per commit(P_COMIT)
Details logic---------------> if p_rerun = checked ('X') AND
p_test Not checked.
deleting the existing records from below two Z-tables
ZAM0238ZAM0239 If records deleted or not deleted based on that
below message will display.ZAM0239 RECORDS DELETEDZAM0239 NO
RECORDS TO DELETEZAM0238 RECORDS DELETEDZAM0238 NO RECORDS TO
DELETE
-> Then getting the plant related master data for the
selected plants based on selection screen (s_werks) value.- Get the
plant names and valuation areas from the plant master from T001W
table by passing werks IN s_werks AND bwkey NE space.- Get the
company codes from the valuation area table T001K table by
passingbwkey = T001W-bwkey- gathering plant name,valuation
area,company code ,fiscal year xxxxxxxxt and currency into an
internal table (it_zmeot001) selecting from table t001w,t001k and
t001. --> Then Saving the fiscal year xxxxxxxxt for the primary
plant which will be used in getting the fiscal month of the MRP/LTP
run date.
-> Setup dates used for various selections1st setup--Getting
the E&O parameters from ZAF0156 table and capturing in an
internal table.
Then getting the fiscal month of the MRP/LTP run date by passing
the fiscal year xxxxxxxxt and MRP/LTP run date.and getting the
previous fiscal month by passing fiscal month and year of MRP/LTP
run date.
-- Then setting the begin and end date to the end of the
previous period as (lastenddate = '18991231'). -- Then based on no.
of periods in ZAF0156 internal table getting the next fiscal month.
-- Finally getting the end date of the period and updating the
enddate in ZAF0156 internal table . 2nd setup-- Setup date range
for determining avg monthly MRP requirements for next 4 months.3rs
setup-- Setup fiscal month range for consumption history for
previous 12 months + current quarter ie. for 15 months.
-> Get the MRP doc headers for the selected plants (MDKP)--
If Planning scenario (p_plscn) is not entered in selection screen
thengetting the MRP List headers for the selected plants/LTP from
MDKP table passing by plwrk IN s_werks (plant entered from
selection screen) AND sobsl 'PB' (Special procurement type) AND
matnr IN s_matnr(Material entered from Selection screen) AND dtart
= 'MD'. (Type of MRP list) Elsegetting the MRP List headers for the
selected plants/LTP from MDKP table passing by plwrk IN s_werks AND
sobsl 'PB' AND matnr IN s_matnr AND dtart = 'LP' AND plscn =
p_plscn.(Planning scenario entered from sel.screen)-- next getting
all ND materials from MARC table and updating MDKP table (if blank
material is in selection, then all material in that plant is
considered) and updating MDKP table.-- Then mapping the records
from MDKP table to the MARC table based on plant and material
combination and MRP type = 'ND'. if ND type record exists then
updating the MDKP records as per ND type Else modifying the MDKP
table based on MRP type of MARC record.
-> Then looping all records of MDKP table at every new matnr
filling the ZAM0239 table.-- converitng any MRP error messages to
the job log as success messages-- capturing plant and material data
and filling ZAM0238 table as following.- validating the MARC
records based on material and plant combination of MDKP record.-
validating it_zmeot001 (Plant, Valuation Area, and Company Code
table for E&O ) based on plant of MDKP record.- Then if
valuation area = 4030getting material valuation data from MBEW
table and filling ZAM0238-unitcost field of ZAM0238 table else
getting Material Ledger: Header Record and Material Ledger: Period
Totals Records Valuesfilling ZAM0238-unitcost and
ZAM0238-unitcost_32 fields of ZAM0238 table.- Then checking MRP
type = 'ND' or notif it is 'ND' getting MRP records from MDTB and
MDTC table based on DTNUM (Number of material requirements planning
table) and filling the ZAM0238 table fields by some calculations
and validations switched based on MRP Element(mdtb-delkz). Below
MRP Element are being checked and done some
calculations.'WB','LB','KB','LK','QM','BA','PA' OR 'SA'--For these
type calculation done by adding Quantity received or quantity
required with respective field of ZAM0238 table.
'BE'--(Purchase Order) checking in EKKO table and filling the
records.
'FE'--(Production Order (shop work order)) getting the CO order
balances and capturing in a table.
'SB' or 'SM'-( reduction of reqts) validating ZAF0156 table by
passing Receipt/Requirements date and skipping any requests after
the last period if not record exist else filling ZAM0239
table.Others--(Unexpected MRP Element)capturing the error and
success message into an internal table.
If necessary, get the demand forecast and include it as
additional requirements. This only applies to materials with MRP
type PE when using LTP data and only if the p_pefst option is
selected on the selection screen.
Then Subtracting the vendor consignment stock from the on-hand
(consignment stock is getting from MARD table by passing material
and plant)Then computing the total on-hand value and Converting the
sum of next 4 monthsMRP reqts to a 15 month basis.- IF MRP type NE
'ND'.Then gertting MRP records by using a standard RFC
'MD_STOCK_REQUIREMENTS_LIST_API' and processing as above to fill
the ZAM0238 table and ZAM0239 table .- Then getting open blanket
purchase orders from EKPO table and filling ZAM0238 table.- Then
setting negative qtys to zero in ZAM0238 records.- If there are any
sources of supply, get last 12 months + current quarter consumption
from MVER table and filling the ZAM0238 table.- Then At End of
material selection in the each row of loop computing reserve by
periodprorating reserve quantity to plants prorating reserve value
to periods.- Then if p_test check box is not checked inserting the
values finally to ZAM0238 database table and ZAM0239 database
table.- Those Material which have unexpected MRP elements the logs
will be created for those and displayed in output screen.
Test cases:
Input :-
Output-:
Updating in the Z-table (ZAM0238)
Updating in the Z-table(ZAM0239)
Open Item / Issues Log / Proposed Solutions (keep all
history)
Assigned To
Date OpenedDue DateStatusDescription Resolution