Professional Documents
Culture Documents
Specification
11/05/2009
Version: 1.0
Page: 1 of 15
Project TOUCHSTONE
Document Information
Business Area Type of development SAP R/3 Version MM Report R/3 ECC 6.0
Approval
Approved by Functional Team Technical Team Name Nitin Chhabra Role Team Lead Signature Nitin Date 11/05/2009
Document History
Version Reason for change Date
Version: 1.0
Page: 2 of 15
Project TOUCHSTONE
Table of Contents
Functional Specifications........................................................................................................4
6 APPENDICES ............................................................................................................6
6.1 Appendix A Custom Table Definition..............................................................................6 6.2 Appendix B Report Layout...............................................................................................6 Technical Specifications..........................................................................................................8
Version: 1.0
Page: 3 of 15
Project TOUCHSTONE
Functional Specifications 1 Summary
In the standard SAP , there is no standard report available , by which a buyer can see the month wise moving Average price of any material and price in the last 3 purchase orders of the material, which is required for the analysis purpose. END OF GUIDANCE TEXT
2 Scope 2.1
Manual
Starting Conditions
2.2
Frequency
3 Logic Overview
Logic: Selction of the materials 1) MARA / MAKT a. b. c. 2) MARC a. b. Selection from MARA Plant (T001W-WERKS) - mandatory, check correctness Material Type (MARA-MTART) - mandatory, check correctness Material Group (MARA-MATKL) Material (MARA-MATNR)
1.
Version: 1.0
Page: 4 of 15
Project TOUCHSTONE
b. When interval is entered in the selection screen! = current month Get the fiscal year and fiscal month for the selection date entered in the selection screen ,then enter the selected materials in the field(MBEWH-MATNR) ,and plants(MBEWH- BWKEY)with the fiscal year in the filed (MBEWH- LFGJA) and fiscal month (MBEWH- LFMON )and get the corresponding MAP(MBEWHVERPR) and if the entry is not there then find for the previous fiscal months upto 12 last months till it gets the entry ,if the system couldt find any entry in last 12 months ,then set the MAP as ZERO.
Default Value
Mandatory
Mandatory,chec k correctness
Notes N.A
5 Data Mapping
N.A
5.1
N.A
Extraction Summary
Version: 1.0
Page: 5 of 15
Project TOUCHSTONE
6 Appendices
N.A
6.1
N.A
6.2
Material Class/Type
Material Group
Material Code
Material Description
Previous Price 2
Previous Price 1
Previous Price
Version: 1.0
Page: 6 of 15
Version: 1.0
Page: 7 of 15
Program Title:
Price Movement for a Period
Program Type:
Report
Application:
MM
Development Class:
ZDEV (presently , it will be stored as a local object)
Transport Request:
DR!xxxxx (to get after report development)
Message Class:
Z001
Project TOUCHSTONE
Other programs:
{Other programs that must be created to support the primary program must be listed here.}
All are Select Options: Label ---------------------Material type Material Group Material No Plant Date Interval
Constraints -----------------------------------------------------------OBLIGATORY NO INTERVALS NO-EXTENSION NO INTERVALS NO-EXTENSION NO INTERVALS NO-EXTENSION NO INTERVALS NO-EXTENSION NO-EXTENSION
Version: 1.0
Page: 9 of 15
Project TOUCHSTONE
2. Selection Screen Display
{This section will contain a display of the required input selection screen.}
Version: 1.0
Page: 10 of 15
Project TOUCHSTONE
3. Report Output Display:
Version: 1.0
Page: 11 of 15
Project TOUCHSTONE
{Enter sample layout for each reporting level or provide a document link containing the layout(s).}
4.
Technical Description:
{This section of the technical specification would include the pseudo-code in simple language that should be understandable to any related person, such as the functional consultant. This section will describe in detail the data extraction, data validation, data processing and output processing steps.}
Project TOUCHSTONE
Based on Selection Criteria:
1. Fetch data from tables (MARA & MARC) based on selection criteria as shown below: Material Type Material Group Plant Date Interval mandatory Mandatory (optional) (optional)
Extract the following fields from above mentioned tables (MARA & MARC): Material Type Material Group Plant Material No Material Description (mara~mtart) (mara~matkl) (marc~werks) (mara~matnr) (makt~maktx)
SELECT mara~mtart mara~matkl mara~matnr makt~maktx marc~werks INTO TABLE i_mara FROM mara INNER JOIN marc ON marc~mandt = mara~mandt AND marc~matnr = mara~matnr INNER JOIN makt ON marc~mandt = makt~mandt AND marc~matnr = makt~matnr WHERE mara~matnr IN s_matnr AND marc~werks IN s_werks.
Extract the following fields from above tables (EINA, EIPA): Calculate the Fiscal year using following Functions:
GM_GET_FISCAL_YEAR and HR_E_GET_FISC_YEAR_DATES
Derive the following data as per the Fiscal Year obtained. Purchase Price Previous Purchase price 1 Previous Purchase price 2 (eipa~preis) (eipa~preis) (eipa~preis)
Project TOUCHSTONE
INTO TABLE FROM eina INNER JOIN eipa~mandt eipa~infnr i_price eipa ON = eina~mandt AND = eina~infnr
FOR ALL ENTRIES IN i_mara WHERE eina~matnr = i_mara-matnr. ELSE. SELECT eina~matnr eipa~werks eipa~ebeln eipa~bedat eipa~preis INTO TABLE i_price FROM eina INNER JOIN eipa ON eipa~mandt = eina~mandt AND eipa~infnr = eina~infnr FOR ALL ENTRIES IN i_mara WHERE eina~matnr = i_mara-matnr AND eipa~bedat IN s_date. ENDIF.
Extract the following fields from above tables (MBEW, MBEWH): MAP (Moving Average Price) (mbewh~verpr)
IF SY-DATUM IN s_date. SELECT matnr bwkey verpr " MAP INTO TABLE i_verpr FROM mbew FOR ALL ENTRIES IN i_mara WHERE mbew~matnr = i_mara-matnr AND mbew~bwkey = i_mara-werks. ELSE. SELECT mbewh~matnr mbewh~bwkey mbewh~verpr INTO TABLE i_verpr FROM mbewh FOR ALL ENTRIES IN i_mara WHERE mbewh~matnr = i_mara-matnr AND mbewh~bwkey = i_mara-werks AND mbewh~lfgja = s_date-high+0(4) AND mbewh~lfmon <= s_date-high+4(2). ENDIF.
" MAP
Project TOUCHSTONE
IF sy-subrc <> 0. MESSAGE e008. ENDIF.
Version: 1.0
Page: 15 of 15