You are on page 1of 21

SAPYard “SAP ABAP on HANA” Sample FDD

Functional Specification – Report


Allocation Report

Version: 1.0
Date Created: 23rd Mar 2017

Document Control
Business Area MM/WM

GAP WBS_RDD0001

FS Definition Id RDD0001

SAP Version SAP ECC 6.0

Approval and Distribution

visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

Approved by Name Role Signature Date


Process Lead K Vinay Design Manager
Development Rashaan P Lead
Team Lead
PDD Owners E Pho BA

Document History

Version Author Reason for change Date

1.0 E Pho Final 22nd Mar 2017

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

1. GENERAL INFORMATION ............................................................................................................................................................... 4


2. STARTING CONDITIONS ................................................................................................................................................................ 5
3. BUSINESS NEEDS & REQUIREMENTS ............................................................................................................................................. 5
4. CURRENT FUNCTIONALITY ............................................................................................................................................................ 6
5. DESIRED FUNCTIONALITY ............................................................................................................................................................. 6
6. ISSUES ....................................................................................................................................................................................... 6
7. SELECTION SCREEN DETAILS ....................................................................................................................................................... 7
8. INTERACTIVE FEATURES ............................................................................................................................................................... 8
9. TECHNICAL DETAILS .................................................................................................................................................................... 8
10. SECURITY /AUTHORIZATION REQUIREMENTS ............................................................................................................................... 16
11. DATA MAPPING TABLES ............................................................................................................................................................. 16
11.1. DESIRED REPORT DESIGN/LAYOUT: ................................................................................................................................ 18
11.2. REPORT EXAMPLE AND DOWNLOAD REQUIREMENTS: ....................................................................................................... 19
11.2.1. ALLOCATION REPORT – OUTPUT EXAMPLE ...................................................................................................................... 19
12. CUSTOM TABLES/STRUCTURE IN SAP ......................................................................................................................................... 19
13. RECOVERY AND RESTART .......................................................................................................................................................... 19
14. LANGUAGE OF TEXTS ................................................................................................................................................................. 19
15. CURRENCY AND UNITS OF MEASURE ........................................................................................................................................... 19
16. SLA/PERFORMANCE AND FINANCIAL CONTROLS REQUIREMENTS .................................................................................................. 19
17. ASSUMPTIONS, DEPENDENCIES AND CONSTRAINTS ...................................................................................................................... 20
18. ERROR HANDLING, ESCALATION AND NOTIFICATION ..................................................................................................................... 20
19. TESTING SCENARIOS ................................................................................................................................................................. 21

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:

X High Report is required for go-live


Medium Either not needed day one or a workaround is possible
Priority Low Supports “nice to have” functionality
Other Specify:

Very High Refer to complexity estimator


X High Refer to complexity estimator
Medium Refer to complexity estimator
Complexity Low Refer to complexity estimator
Very Low Refer to complexity estimator
Other Specify:

ABAP Report Report Painter Info Systems


X
Writer
Info set SAP Query Drill-Down
Report Tool Query Reporting
(if known) Web Dashboard BEx Analyzer / Crystal Reports
Intelligence BOBJ Analysis
Other Specify:

Drill-down X ALV Grid ALV List Extract to Local File


Characteristics Sorting Button Entry File
(ECC only) 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

X On-Line Users execute the report online


X Background Report is scheduled to run in the background
Background
Report Mode User will run the report as a background job
(user)
(select all that apply)
Query Data is extracted but formatting will be handled by a separate system
Other Specify:

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

X Day Week Month Quarter


Year
Report Granularity
Other Specify:

Volume 1 10 100 X 500


(lines in report) 1000 10,000 10,000+ unknown

Peak Times X No Peak Times No peak time, average usage all the time
(per single Peak times Specify:
execution)

3. Business Needs & Requirements


In Job life cycle, Demand/Supply process for material and Equipment goes through various status from adding
material and equipment demand to project, Release of Demand to MRP for material and service order to TLM for
Equipment. Release of Demand trigger supply and EAM process to make stock available at Operation base for
material and Equipment. Once the stock is there at ops base it needs to be allocated to the project so that it can be
mobilized to the job site.

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

Issue Issue Date Issue Description Issue Resolution Resolved


# owner Raised By & Date

visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

7. Selection Screen Details


The following fields will be provided as an input to run the Allocation Report

Report Input Selection for Allocation Report


Field Labels Table/ Field Name Format Table Value/ Select Option Mandatory or
Structure Checkbox/ or Parameter Optional
Name Radio Button/
Radio Button
Group
Allocation
ZZ_EST_OPS_BS Select Option
Requirement Date RSADD DATS Table Value Mandatory
E_DT1 (Multi Selection)

Project WBS # Select Option


PRPS POSID CHAR Table Value Selective Mandatory
(Multi Selection)
Material Select Option
RESB MATNR CHAR Table Value Optional
(Multi Selection)
Select Option
Plant RESB WERKS CHAR Table Value Selective Mandatory
(Multi Selection)
Select Option
Storage Location RESB LGORT CHAR Table Value Optional
(Multi Selection)

Desired screen design (selection possibilities):


Sample format of report input selection and expected output

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.

Report Output fields for Allocation Report


Report Output fields SAP Table - Field Remarks
Project# PROJ-PSPID Fetch from PROJ table

Project WBS PRPS-POSID/CAUFV-PSPEL Fetch from PRPS/CAUFV table /WBS with


account assignment

Project Status TJ30T-TXT30 Fetch Object number from PROJ-OBJNR by


passing Project number in PROJ-PSPNR.
Query JEST with OBJNR where JEST-STAT = E*
and JEST-INACT=’ ‘ and get JEST-STAT
Now, Query TJ30T with TJ30T=’ZPSD0001, TJ30T-
ESTAT (value fetched from JEST above) and
TJ30T-SPRAS=EN and get TJ30T-TXT30

If, from the above logic TJ30T-TXT30=CANCEL,


display as CANCEL else fetch the status from:
Query JEST with OBJNR where JEST-STAT = I* and
JEST-INACT=’ ‘ and get JEST-STAT

visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

Now, Query TJ02T with TJ02T-ISTAT (value


fetched from JEST above) and TJ02T-SPRAS=EN
and get TJ02T-TXT30

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

Sub-Segment PRPS-USR01 Fetch from PRPS by passing Level 3 WBS

Network CAUFV-AUFNR Fetch from CAUFV by passing WBS

Item RESB- RSPOS Fetch from RESB by passing Network (AUFNR)

Material RESB-MATNR Material from Reservation

Material Description MAKT-MAKTX Material Description

UOM RESB-MEINS UOM from Reservation

Status TJ30T-TXT30 Fetch Object number from RESB-OBJNR by


querying for Reservation/Item.

Query JEST with OBJNR where JEST-STAT = E*


and JEST-INACT=’ ‘ and get JEST-STAT

Now, Query TJ30T with TJ30T=’ZPSD0003, TJ30T-


ESTAT (value fetched from JEST above) and
TJ30T-SPRAS=EN and get TJ30T-TXT30

visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

Plant RESB-WERKS Plant value from Reservation

Storage Location RESB-LGORT Storage Location value from Reservation

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

For Split valuated Materials, Query MBEW with


Material, Plant (Valuation Area), MBEW-
VPRSV=’V’ and MBEW-BWTAR=’ ‘ and fetch
MBEW-STPRS
Company Code Currency T001-WAERS Fetch Company Code from T001K-BUKRS by
querying for Plant (Valuation type). Pass
company code in T001-BUKRS and fetch the
currency T001-WAERS
Requirement Qty. RESB- BDMNG Requirement Qty. from Reservation

Remaining Qty. to be Calculated Refer Calculations in below sections


Allocated

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

642 movement types from output.

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

Remaining Project Stock Calculated Refer below sections for calculations

De-Allocated Quantity Calculated Refer below sections for calculations


(Hidden from default
View)
Serialized MARC-SERIAL Query MARC with Material/Plant. Show serial
flag if MARC-SERIAL is not BLANK

Batch MARC-XCHPF Query MARC with Material/Plant. Show Batch


flag if MARC-XCHPF is not BLANK

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

Final Issue RESBD-KZEAR Fetch the Final issue indicator by Querying


RESBD with Reservation and item number. If
BLANK display as BLANK else ‘X’.
RESBD –POTX1 Fetch Comments from RESBD
Comments

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.

 Calculation for ‘Remaining Qty. to be Allocated’


o Step 1: Get total allocated stock for that material and WBS element by
I. Query QBEW for Material Number (MATNR), WBS (PSPNR). Add the Quantity if
multiple entries found.
II. From the above result, ADD the Quantity for any 416 movements
(Deallocations) which are done by system, query MSEG for Material Number
(MATNR), WBS (PS_PSP_PNR), Movement type = 416, Debit/Credit (SHKZG) = ‘S’
and User ID (USNAM_MKPF) EQUAL to ‘BATCH-PS’ and Delivery = BLANK
 If the User ID is NOT EQUAL to ‘BATCH-PS’ then check the Delivery field
(MSEG-VBELN_IM)
 Pass all the Deliveries in LEDSPD_FLOW-VBELN_NEW and get the master
delivery (VBELN)
 Pass, the Deliveries which are not found in LEDSPD_FLOW above AND
the Master Deliveries from the above step, into LIKP and get the User
LIKP-ERNAM.
 Consider only those 416 movements if Users found above is system or
batch user (maintain CCD entries).
III. Further, ADD the quantity for all 415 Q movements (Job to Job) done for
different WBS, query MSEG for Material Number (MATNR), WBS (PS_PSP_PNR),
Movement type = 415 ‘Q’, Debit/Credit (SHKZG) = ‘S’ and PS_PSP_PNR NOT
EQUAL to MAT_PSPNR
visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

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.

 Remaining Project Stock:


o “Remaining Project Stock” (Column) = “Allocated Qty.”(Column) – “Consumption”
(Column) – “Deallocated Qty.”(Column)

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.

10. Security /Authorization Requirements

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.

11. Data Mapping Tables

Field Name Field Description Output Output Format Position SAP


Length Type screen
No./
field
name
PROJ-PSPID Project# 24 CHAR Left Justified 1

PRPS- Project WBS 24 CHAR Left Justified 2


POSID/CAUFV-
PSPEL
PROJ- Project Status 30 CHAR Left Justified 3
PROJ_STATUS
IHPA- PARNR Customer 35 CHAR Left Justified 4

IHPA- PARNR Rig 35 CHAR Left Justified 5

IHPA- PARNR Well 35 CHAR Left Justified 6

PRPS-USR00 Segment 20 CHAR Left Justified 7

visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

PRPS-USR01 Sub-Segment 20 CHAR Left Justified 8

CAUFV-AUFNR Network 12 CHAR Left Justified, 9


No leading
zeros
RESB- RSPOS Item 4 NUMC Left Justified 10

RESB-MATNR Material 18 CHAR Left Justified 11

MAKT-MAKTX Material Description 40 CHAR Left Justified 12

RESB-MEINS UOM 3 UNIT Left Justified 13

TJ30T-TXT30 Status 30 CHAR Left Justified 14

RESB-WERKS Plant 4 CHAR Left Justified 15

RESB-LGORT Storage Location 4 CHAR Left Justified 16

Logic Based – Available in SLoc 8 CHAR Left Justified 17


True/False
MARD-LABST Quantity in Sloc 13 QUAN Left Justified 18

Logic Based – Available in all 8 CHAR Left Justified 19


True/False Plants
Calculated All Plants inventory 13 QUAN Left Justified 20

MBEW-STPRS Unit Price 11 CURR Left Justified 21

T001-WAERS Company Code 5 CUKY Left Justified 22


Currency
RESB- BDMNG Requirement Qty. 13 QUAN Right Justified 23

Calculated Remaining Qty. to 13 QUAN Right Justified 24


be Allocated
RSADD- Allocation Required 8 DATS Left Justified 25
ZZ_EST_OPS_BS Date
E_DT1
RSADD- Job Site 8 DATS Left Justified 26
ZZ_TIME_RQ_S Requirement Date
T_DT1

visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

EKPO-MENGE Mobilized Qty 13 QUAN Right Justified 27

EKBE-MENGE PGI Qty 13 QUAN Right Justified 28

EKBE-MENGE GR Qty 13 QUAN Right Justified 29

MSEG-MENGE Consumed Qty 13 QUAN Right Justified 30

Calculated Demobilized Qty 13 QUAN Right Justified 31

EKBE-MENGE Return PGI Qty 13 QUAN Right Justified 32

EKBE-MENGE Return GR Qty 13 QUAN Right Justified 33

Calculated Qty at well-site 13 QUAN Right Justified 34

RSADD- J2J Same site 13 QUAN Right Justified 35


ZZ_J2J_SJS_SHP Ship Qty
_QTY
RSADD- J2J Same site 13 QUAN Right Justified 36
ZZ_J2J_SJS_RTN Return Qty
_QTY
Calculated De-Allocated 13 QUAN Right Justified 37
Quantity
Calculated Remaining Project 13 QUAN Right Justified 38
Stock
MARC-SERIAL Serialized 1 CHAR Left Justified 39

MARC-XCHPF Batch 1 CHAR Left Justified 40

RSADD- Valuation Type 10 CHAR Left Justified 41


ZZ_VAL_TYPE Preference
RESBD-KZEAR Final Issue 1 CHAR Left Justified 42

RESBD –POTX1 40 CHAR Left Justified 43


Comments

11.1. Desired Report Design/Layout:


See Sample Report Output/Layout

Check top sections

visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

11.2. Report Example and Download Requirements:

11.2.1. Allocation Report – Output Example


Check top sections

12. Custom Tables/Structure in SAP


There is no specific requirement.
Table Name
Short text
Data volume
Table maintenance
allowed ( Yes/ No)
Frequency of table uses
Table maintenance
generator needed ( Yes/
No)
Authorization Group
Field Data Element Domain Type Length Check Key Foreign Description
Name Table- Field Key
Field

Comments

13. Recovery and Restart


NA

14. Language of texts

User specific language (Unicode Requirement should meet according to business requirement)

15. Currency and Units of Measure


NA

16. SLA/Performance and Financial Controls Requirements

visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

NA

17. Assumptions, Dependencies and Constraints

17.1. Assumptions
o NA

17.2. Data
o Material master
o WBS element

17.3. Configuration
o Project Systems configuration

17.4. Development

o Custom field requirement is captured RICEFW EDD0100.

18. Error Handling, Escalation and Notification

18.1. Error Handling

Error Handling will be performed part of Selection Screen


Validations
1. The selection screen will have validation placed for each field entered.
a. Valid Allocation Required Date
b. Valid Project WBS Element - CAUFV- PSPEL
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 Projectthrow error message “Report execution can be
performed for SAPYard Projectonly’.
3. Following will be the mandatory fields for the selection screen
 Allocation Required Date
4. The material details will be fetched per network activity. Material Network will be identified
with control key value

visit www.sapyard.com for ABAP on SAP HANA, SAPUI5, Fiori, OData & SAP Netweaver Gateway
SAPYard “SAP ABAP on HANA” Sample FDD

 Material Network – ZPS2

19. Testing Scenarios


Normal Functionality - test cases that ensure the report functions as it should.
ID Description Expected Results
1 Run the report for valid WBS and plant The material details will be populated as per
combination. requirement.
2 Execute the report non-P&SD WBS and System will populate Error message for the
plant combination. selection.
3 Execute report for multiple WBS. Details will be populated for each WBS.
4 Execute report with J* All the open projects are displayed with additional
columns added such as – Status, Sloc stock, Plant
stock, Pick Qty., PGI Qty. etc..
5 Over allocate a material Remaining Qty to be allocated will be shown as
Negative

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

You might also like