Professional Documents
Culture Documents
Version: 1.0
Date Created: 23rd Mar 2017
Document Control
Business Area MM/WM
GAP WBS_RDD0001
FS Definition Id RDD0001
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Document History
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Table of Contents
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
1. General Information
Description Allocation Report
Project / Release SAPYard Release 1
X ECC Report is generated in SAP ECC
BI Report is generated in BW/BOBJ (or other data warehouse)
System
Other Specify:
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
2. Starting Conditions
Hourly Details:
Daily Details:
Weekly Details:
Monthly Details:
Quarterly Details:
Report Yearly Details:
Frequency
Other Period Details
How
X On-Demand
often:
Other
Specify:
Frequency
Peak Times X No Peak Times No peak time, average usage all the time
(per single Peak times Specify:
execution)
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Allocation Report will be built so that the warehouse person knows the list of materials which needs to be
allocated to project stock on which date.
Mobilize Material
Returns from
Add Material Release of Material / Material and Consumption Deallocation
Job Site to
and Material / Equipment Equipment or Activity of Material/
Ops Base or
Equipment Equipment Allocation to from Ops duration Equipment
Different Job
Demand to Demand Project Stock Base to Job information Project Stock
Site
Project PLAN ORDR - ALLC - Site is posted DALC -
- Planned DMOB -
Ordered Allocated MOBL CONF - Deallocated
Demobilized
Mobilized Confirmed
4. Current Functionality
There is no standard report available which can provide Job Specific material allocation requirements.
5. Desired Functionality
Allocation report will provide Job Specific material and equipment Allocation requirements. This report will allow
user to execute report with project / WBS, Material and Plant Selection and provide output with a list of materials
to be allocated to a particular project on a particular date. An option to close the reservation will also be provided
to the user as a part of this report.
6. Issues
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Allocation
requirement Report.xlsx
Selection Screen Validations
1. The selection screen will have validation placed for each field entered.
a. Valid ‘Allocation Req Date’
b. Valid WBS Element - PRPS-POSID
c. Valid Material – MARA-MATNR
d. Valid Plant value – T001W-WERKS
2. Report should be executed for SAPYard Project, perform validation for project profile contain
ZPSD* , if non SAPYard Project throw error message “Report execution can be performed for
SAPYard Project only’.
3. If the user selects the checkbox “All Projects (incl. REL/TECO/CANC/CLSD)” then none of the
Projects need to be filtered from the Display. When the Checkbox is unchecked, only the active
(Released, System Status “REL”) Projects need to be considered and all other Projects in
different statuses such as “TECO” (Technically Complete), “CANC” (Cancelled) and “CLSD”
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
(Closed) need to be excluded from processing and display of the report. By default this flag
should be un-checked.
4. Add Validation to check Plant selected in report with Project plant, if different display validation
error message “ Plant Selected Different from Project Plant”
5. Following will be the mandatory fields for the selection screen
Allocation Requirement Date
Either Plant or WBS element
The system should check that along with Allocation Requirement Date we also enter
either Plant or WBS element. If none of these 2 fields are entered then system should
display an error message.
6. The material details will be fetched per network activity. Material Network will be identified
with control key value
a. Material Network – ZPS2
8. Interactive Features
There is no user interaction requirement for the report.
9. Technical Details
Below Table provide list of field require in report output for Allocation Report and corresponding business logic to
fetch those information.
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Customer IHPA- PARNR and KNA1- Fetch PARNR from IHPA by passing the Object
NAME1 number (Level 3 WBS) and Partner Function = SP
Get description by passing KNA1-PARNR and get
KNA1-NAME1
Rig IHPA- PARNR and KNA1- Fetch PARNR from IHPA by passing the Object
NAME1 number (Level 3 WBS) and Partner Function = Z7
Get description by passing KNA1-PARNR and get
KNA1-NAME1
Well IHPA- PARNR and KNA1- Fetch PARNR from IHPA by passing the Object
NAME1 number (Level 3 WBS) and Partner Function =
ZW
Get description by passing KNA1-PARNR and get
KNA1-NAME1
Segment PRPS-USR00 Fetch from PRPS by passing Level 3 WBS
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Available in SLoc Logic based – True/False If “Quantity in SLOC” >= “Remaining Qty. to be
Allocated”, then set “Available in SLOC” = ‘TRUE’
else set to ‘FALSE’
Quantity in Sloc MARD- LABST Query MARD with Material, Plant and Sloc. and
fetch Unrestricted Qty from MARD-LABST
Available in all Plants Logic based – True/False If “All Plants inventory” >= “Remaining Qty. to be
Allocated”, then set “Available in all Plants” =
‘TRUE’ else set to ‘FALSE’
All Plants inventory Calculated Query MARD with Material and fetch
Unrestricted Qty by taking sum of Quantities for
the field MARD-LABST
Unit Price MBEW-STPRS For Non-Split valuated Materials, Query MBEW
with Material, Plant (Valuation Area), MBEW-
VPRSV=’S’ and MBEW-BWTAR=’ ‘ and fetch
MBEW-STPRS
Allocation Required Date RSADD- Fetch Allocation Required Date from RSADD
ZZ_EST_OPS_BSE_DT1
Job Site Requirement Date RSADD- Fetch Job Site Requirement Date from RSADD
ZZ_TIME_RQ_ST_DT1
Mobilized Qty EKPO-MENGE Take a sum of Qty. for all Mobilized STO for that
Reservation/item
PGI Qty EKBKE-MENGE where EKBE- Take sum of PGI Qty of all Mobilize STO for that
EGABE=6 Reservation/item.
Consider movement type 641 and subtract all
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
GR Qty EKBKE-MENGE where EKBE- Take sum of GR Qty of all Mobilize STO for that
EGABE=1 Reservation/item
Consider movement type 101 and subtract all
102 movement types from output.
Consumed Qty RESB-ENMNG Query RESB table with Reservation / item
RESB-RSNUM/RSPOS and fetch RESB-
ENMNG
Demobilized Qty EKPO-MENGE + RSADD- Take a sum of Qty. for all De-mobilized STO for
ZZ_J2J_SJS_RTN_QTY that Reservation/item.
Add the J2J same site Qty to get total
Demobilized Qty.
Return PGI Qty EKBKE-MENGE where EKBE- Take sum of PGI Qty of all Demobilize STOs for
EGABE=6 that Reservation/item
Consider movement type 641 and subtract all
642 movement types from output.
Return GR Qty EKBKE-MENGE where EKBE- Take sum of GR Qty of all Demobilize STOs for
EGABE=1 that Reservation/item
Consider movement type 101 and subtract all
102 movement types from output.
Qty at Well-Site Calculated Refer below sections for calculations
J2J Same site Ship Qty RSADD-ZZ_J2J_SJS_SHP_QTY Query RSADD with Reservation/Item and fetch
ZZ_J2J_SJS_SHP_QTY
J2J Same site Return Qty RSADD-ZZ_J2J_SJS_RTN_QTY Query RSADD with Reservation/Item and fetch
ZZ_J2J_SJS_RTN_QTY
Valuation Type Preference RSADD-ZZ_VAL_TYPE Fetch Valuation type preference from RSADD
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Detail SAP functional logic to fetch report output fields for Allocation Report
The Report output should not consider material components which are in PLANNED status.
From the selection criteria maintained, pass the Allocation Required Date in RSADD-
ZZ_EST_OPS_BSE_DT1 and get all the reservation details (RSNUM).
o Query RESB with the Reservations obtained (RSNUM) and obtain the WBS numbers
from RESB- PSPEL.
o Filter out WBS which do not meet other filter criteria e.g. Plant or WBS elements which
are selectively mandatory fields.
o Get Project Number by querying PRPS-PSPNR and fetch PSPHI.
Identify Material Networks under project WBS.
o Fetch List of Material Networks for WBS element
I. Get network details with Query CAUFV-PSPEL (WBS Element)
II. Network status should not be in Cancel Status ‘CANC’
III. Material Network Control Key ‘ZPS2’.
IV. Control key table field AFVC- STEUS.
V. Get item number details with Query RESB-AUFNR and fetch RSPOS.
Get Object number (OBJNR) from table PRPS by passing the WBS element.
o Get Customer (PARNR) details by querying IHPA-OBJNR and PARVW = SP. Get
description by passing KNA1-PARNR and get KNA1-NAME1.
o Get Rig (PARNR) details by querying IHPA-OBJNR and PARVW = Z7. Get description by
passing KNA1-PARNR and get KNA1-NAME1.
o Get Well (PARNR) details by querying IHPA-OBJNR and PARVW = ZW. Get description by
passing KNA1-PARNR and get KNA1-NAME1.
Get Material/Description from Material Reservation created from Project. Query Table RESB-
AUFNR = material Network and Reservation details (Reservation Number RESB-RSNUM , Item
RESB-RSPOS, Material RESB-MATNR , Material Description from MAKT-MAKTX and Plant Value
RESB-WERKS)
o Plant Value from Reservation – RESB-WERKS
o Storage Location from Reservation – RESB-LGORT
o Requirement Quantity from Reservation - RESB-BDMNG
o UOM from Reservation – RESB-MEINS
Quantity in Sloc: Query MARD with Material, Plant and Sloc. (from reservation) and fetch
Unrestricted Qty from MARD-LABST
Available in Sloc: If “Quantity in SLOC” >= “Remaining Qty. to be Allocated”, then set “Available in SLOC” =
‘TRUE’ else set to ‘FALSE’.
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
All Plants Inventory: Query MARD with Material and fetch Qty by taking sum of Quantities for
the field MARD-LABST
Note: A hyperlink should be provided for quantity displayed in ‘All Plants Inventory’ such that
when the user clicks on it will generate and jump to MMBE output for the material. In MMBE if
the user clicks ‘back’ button the Allocation report should be displayed again.
Available in All Plants: If “All Plants inventory” >= “Remaining Qty. to be Allocated”, then set “Available in
all Plants” = ‘TRUE’ else set to ‘FALSE’.
Final Issue: Query RESBD with Reservation and Item number and fetch RESBD-KZEAR.
IV. Also, ADD the Consumed quantity, query MSEG for Material Number (MATNR),
WBS (MAT_PSPNR), Movement type = 281 ‘Q’ (subtract for any 282 ‘Q’
movements as well) and get the total consumed quantity MSEG-MENGE.
o Step 2: The resulting quantity from Step 1 will be the Total Allocated Quantity for that
Material.
o Step 3: Remaining Qty. to be Allocated should be derived as per the formula below for
that material/item:
Remaining Qty. to be Allocated = Requirement Qty. – Total Allocated Qty. (From Step
1/2)
o If the ‘Remaining Qty. to be Allocated’ is negative then it means that it is over-allocated.
o In case where same material is planned more than once then the Total Allocated
Quantity calculated in Step 2 should be distributed based on FIFO logic based on the
Requirement Date.
I. Total Allocated Qty column is supposed to be a hidden column in default layout.
II. In cases where Requirement date is same, consider the Component Number as
a FIFO criteria.
Get Allocation Required Date by querying RSADD for Reservation (RSNUM) and Item (RSPOS)
and fetch the field Allocation Required Date (RSADD-ZZ_EST_OPS_BSE_DT1)
Get Job Site Requirement Date by querying RSADD for Reservation (RSNUM) and Item (RSPOS)
and fetch the field Job Site Requirement Date (RSADD- ZZ_TIME_RQ_ST_DT1)
Project Status:
o Fetch Object number from PROJ-OBJNR by passing Project number in PROJ-PSPNR.
o Query JEST with OBJNR where JEST-STAT = E* and JEST-INACT=’ ‘ and get JEST-STAT
o Now, Query TJ30T with TJ30T=’ZPSD0001, TJ30T-ESTAT (value fetched from JEST above)
and TJ30T-SPRAS=EN and get TJ30T-TXT30
Segment: Fetch from PRPS-USR00 by passing Level 3 WBS in PRPS-PSPNR.
Sub-Segment: Fetch from PRPS-USR01 by passing Level 3 WBS in PRPS-PSPNR.
Component Status:
o Fetch Object number from RESB-OBJNR by querying for Reservation/Item.
o Query JEST with OBJNR where JEST-STAT = E* and JEST-INACT=’ ‘ and get JEST-STAT
o Now, Query TJ30T with TJ30T=’ZPSD0003, TJ30T-ESTAT (value fetched from JEST above)
and TJ30T-SPRAS=EN and get TJ30T-TXT30
Mobilized Qty: Query EKPO with Material, Reservation/Item and get the list of all STOs for that
material and take a sum of EKPO-MENGE to get the total Mobilized Qty. Do not consider deleted
STOs for this calculation.
PGI Qty: Query EKBE with the list of all mobilize STOs for that reservation item where EKBE-
VGABE=6 and get EKBE-MENGE
o Consider movement type 641 and subtract all 642 movement types from output.
GR Qty: Query EKBE with the list of all mobilize STOs for that reservation item where EKBE-
VGABE=1 and get EKBE-MENGE
o Consider movement type 101 and subtract all 102 movement types from output.
Consumed Qty: Query RESB table with Reservation / item (RESB-RSNUM/RSPOS) and fetch
RESB-ENMNG to get the consumption quantity
Demobilized Qty: Take a sum of Qty. for all De-mobilized STO for that Reservation/item. Add
the J2J (same site) Qty to get total Demobilized Qty.
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Return PGI Qty: Query EKBE with the list of all Demobilize STOs for that reservation item where
EKBE-VGABE=6 and get EKBE-MENGE
o Consider movement type 641 and subtract all 642 movement types from output.
Return GR Qty: Query EKBE with the list of all Demobilize STOs for that reservation item where
EKBE-VGABE=1 and get EKBE-MENGE
o Consider movement type 101 and subtract all 102 movement types from output.
Qty at Well-Site:
o For a particular line item/component, get all the mobilize STO’s and take a sum of Qty.
already Goods Receipt at the well-site.
o Query table EKBE with STO/Item number and filter for Movements 101 and 102. To find
the GR Qty. take the sum of all 101 movements and subtract all 102 movements (for
reversals) from it.
o From the total GR quantity subtract the Consumed Qty and Return Qty for that particular
line item/Component.
o Qty at well Site per reservation =
Total goods receipted Mobilized STO quantity [“GR Qty.” Column in the Report]
+ J2J same site shipped quantity for reservation/item (RSADD-ZZ_J2J_SJS_SHP_QTY)
- Returned qty. from reservation/item (“Demobilized Qty.” Column + J2J Same Site
Return Qty. (RSADD-ZZ_J2J_SJS_RTN_QTY))
- Consumed qty. from reservation item (“Consumed Qty.” Column from the report)
De-Allocated Quantity:
o Calculate Total Deallocated Stock for a Material and WBS combination as per below
o Total Deallocated Stock Qty = Total Allocated Stock Qty – Total Consumption (281 Q
and 282 Q) – Current Stock (QBEW)
o Perform a FIFO of the above quantity for each reservation/item with respect to the
Return GR quantity + Job to Job same site quantity
o Total Allocated Stock Qty can be used directly from the calculations done above.
o Total Consumption for a material can be calculated by querying MSEG for Material
Number (MATNR), WBS (MAT_PSPNR), Movement type = 281 ‘Q’ (subtract for any 282
‘Q’ movements as well) and get the total consumed quantity MSEG-MENGE
o Current Stock from QBEW, Query QBEW for Material Number (MATNR), WBS (PSPNR).
Add the Quantity if multiple entries found.
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Get Serial flag details by querying MARC with Material/Plant and fetch MARC-SERIAL. Set the
Serial flag if MARC-SERIAL is not BLANK.
Get Batch flag details by querying MARC with Material/Plant and fetch MARC- XCHPF. Set the
Batch flag if MARC- XCHPF is not BLANK.
Get Valuation type preference by querying RSADD with Reservation (RSNUM), Item (RSPOS) and
fetch the Valuation type preference RSADD- ZZ_VAL_TYPE.
Get Comment details from the table RESBD –POTX1 by passing Reservation (RSNUM) and Item
(RSPOS) details.
User should have an option to change the default layout.
SAP Role mapping and SOD will apply. Only users having role that provides access to Custom Report
Transaction for Allocation Report, will be able to trigger this enhancement.
Security team will require to identify separate Authorization Object to provide access to this report.
Report program will require to maintain this Authorization Object to control access plant level access.
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Comments
User specific language (Unicode Requirement should meet according to business requirement)
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
NA
17.1. Assumptions
o NA
17.2. Data
o Material master
o WBS element
17.3. Configuration
o Project Systems configuration
17.4. Development
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD
Exception - special logic or exceptions (e.g. report should exclude certain specific condition)
Error Handling - functionality in case of errors (e.g. Error Message or Error Log )
4 Execute report invalid plant details. Error message will be populated on selection
screen.
5 Execute report invalid WBS or material Error message will be populated on selection
details. screen.
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway