Professional Documents
Culture Documents
*----------------------------------------------------------------------*
* Topic:
Project Proposal Quick Estimated Budget
*
*
*
* Description: The program will realize a model of an project
*
*
structure to enable the user an immediate estimation
*
*
of budgetary proposal. The program model is based on *
*
the assumption that a project core team employees are *
*
to be employed throughout the project life, plus sub
*
*
contractors, travels, equiped office, structure leasing *
*
and None Recurring Expenses.
*
*
*
*
*
* Programmer: Contribution from Benjamin halperb@013.net.il
*
*
*
* Date:
February 2004
*
*
*
*----------------------------------------------------------------------*
* Including classes:
INCLUDE YDISPLAY_LCL_CORE_EMPLOYEE.
INCLUDE YDISPLAY_LCL_CONTRACTOR.
INCLUDE YDISPLAY_LCL_TRAVELS.
INCLUDE YDISPLAY_LCL_INTEGRATIONS.
* Constants for display margins:
CONSTANTS: pos_1 TYPE i VALUE 30,
pos_2 TYPE i VALUE 40.
* Create a reference to classes:
DATA: employee
TYPE REF TO lcl_core_employee,
contractor TYPE REF TO lcl_contractor,
marketing
TYPE REF TO lcl_travels,
integrations TYPE REF TO lcl_integrations.
* Intermmediate variables:
DATA: employeesval
TYPE
contractorsval
TYPE
proposalcost
TYPE
marketingcost
TYPE
integrationcost
TYPE
office_furniture
TYPE
office_equipment
TYPE
office_hardware
TYPE
office_content
TYPE
structure_lease_fee TYPE
structure_service
TYPE
structure_tax
TYPE
structure_insur
TYPE
structure_current
TYPE
structure_area
TYPE
structure_duration TYPE
structure_month_exp TYPE
structure_total_exp TYPE
nretotal
TYPE
nre_test_equip
TYPE
nre_hardware_misc
TYPE
nre_design_proto
TYPE
TmpVal
TYPE
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i,
i.
* Inputs:
* Section of project core employees to be employed throughout
* all project life plus the warranty period obligation time
SELECTION-SCREEN BEGIN OF BLOCK CORE WITH FRAME TITLE TIT1.
PARAMETERS: core_qty TYPE i DEFAULT 3, "no. of core employees
hour_fee TYPE i DEFAULT 30, "work hour value
monthkey TYPE i DEFAULT 200, "hours per month
duration TYPE i DEFAULT 36. "employment duration [m]
SELECTION-SCREEN END OF BLOCK CORE.
* Section of project sub contractors required and time of employment
SELECTION-SCREEN BEGIN OF BLOCK CONTR WITH FRAME TITLE TIT2.
PARAMETERS: cntr_qty TYPE i DEFAULT 5, "no. of conractors
cntrt_hf TYPE i DEFAULT 20, "work hour value
cntrt_mk TYPE i DEFAULT 100, "hours per month
cntrt_du TYPE i DEFAULT 12. "employment duration [m]
SELECTION-SCREEN END OF BLOCK CONTR.
* Section of project marketing travels - based on:
* up to 2 participants for short stay (3 days ea.)
SELECTION-SCREEN BEGIN OF BLOCK MRKTRV WITH FRAME TITLE TIT3.
PARAMETERS: mt_parti TYPE i DEFAULT 2, "participants no.
mt_numbr TYPE i DEFAULT 5. "number of marketing travels
SELECTION-SCREEN END OF BLOCK MRKTRV.
* Section of project installation & integration travels - based on:
* up to 5 participants for long stay (15 days ea.)
SELECTION-SCREEN BEGIN OF BLOCK INTGRTRV WITH FRAME TITLE TIT4.
PARAMETERS: it_parti TYPE i DEFAULT 5, "participants no.
it_numbr TYPE i DEFAULT 2. "number of integration travels
SELECTION-SCREEN END OF BLOCK INTGRTRV.
* Section of project's office contenet purchase
SELECTION-SCREEN BEGIN OF BLOCK OFCCONT WITH FRAME TITLE TIT5.
PARAMETERS: ofc_furn TYPE i DEFAULT 20000, "office furniture
ofc_equp TYPE i DEFAULT 15000, "office equipment
ofc_hrdw TYPE i DEFAULT 5000. "office hardware
SELECTION-SCREEN END OF BLOCK OFCCONT.
* Section of the structure leasing expenses - based on:
* main leasing fee and environmental expenses
SELECTION-SCREEN BEGIN OF BLOCK LEASING WITH FRAME TITLE TIT6.
PARAMETERS: st_lease TYPE i DEFAULT 15, "lease fee per 1 square m
st_srvic TYPE i DEFAULT 2,
"service per 1 square m
st_taxpm TYPE i DEFAULT 2,
"taxation per 1 square m
st_insur TYPE i DEFAULT 100, "insurance per 1 month
st_currn TYPE i DEFAULT 2000, "monthly current expense
st_area TYPE i DEFAULT 100, "structure area in square m
st_durat TYPE i DEFAULT 36. "structure lease duration
SELECTION-SCREEN END OF BLOCK LEASING.
* Section of the non recurring expenses
SELECTION-SCREEN BEGIN OF BLOCK NRE WITH FRAME TITLE TIT7.
PARAMETERS: nre_tseq TYPE i DEFAULT 10000, "special test equipment
nre_hrdw TYPE i DEFAULT 5000, "required hardware
nre_dsgn TYPE i DEFAULT 50000. "design & development
SELECTION-SCREEN END OF BLOCK NRE.
********************************************************************
*
*
*
M A I N
P R O G R A M
*
*
*
********************************************************************
START-OF-SELECTION.
* Create
PERFORM
PERFORM
PERFORM
PERFORM
PERFORM
PERFORM
PERFORM
objects:
CreateEmployee.
CreateContractor.
CreateMarketingTravel.
CreateIntegrationsTravels.
CreateOfficeContent.
CreateStructureLease.
CreateNre.
ON.
ON.
ON.
ON.
ON.
ON.
ON.
ON.
ON.
********************************************************************
AT LINE-SELECTION.
CASE sy-lilli.
WHEN 3.
WRITE: / '
WRITE: / '
SKIP.
CALL METHOD employee->display_attributes.
CALL METHOD employee->calculate.
WHEN 4.
WRITE: / '
WRITE: / '
SKIP.
CALL METHOD contractor->display_attributes.
CALL METHOD contractor->calculate.
WHEN 5.
WRITE: / '
WRITE: / '
SKIP.
CALL METHOD marketing->display_attributes.
CALL METHOD marketing->calculate.
WHEN 6.
WRITE: / '
WRITE: / '
SKIP.
CALL METHOD integrations->display_attributes.
CALL METHOD integrations->calculate.
WHEN 7.
WRITE: / '
WRITE: / '
SKIP.
WRITE: / '
WHEN 8.
WRITE: / '
WRITE: / '
SKIP.
WRITE: / '
/ '
/
/
/
/
WHEN 9.
WRITE: / '
WRITE: / '
SKIP.
WRITE: / '
/ '
/ '
/ '
WHEN 10.
WRITE: / '
* Total proposal
proposalcost
+
+
cost:
= employeesval + contractorsval + marketingcost
integrationcost + office_content + structure_total_exp
nretotal.
WHEN 11.
PERFORM CreateMyGraph.
ENDCASE.
********************************************************************
*
*
*
F O R M
R O U T I N E S
*
*
*
********************************************************************
*&---------------------------------------------------------------------*
*&
Form CreateEmployee
*&---------------------------------------------------------------------*
form CreateEmployee.
CREATE OBJECT employee EXPORTING
im_qty
= core_qty
im_hour_fee
= hour_fee
im_monthly_key = monthkey
im_duration
= duration.
endform.
" CreateEmployee
*&---------------------------------------------------------------------*
*&
Form CreateContractor
*&---------------------------------------------------------------------*
form CreateContractor.
CREATE OBJECT contractor EXPORTING
im_qty
= cntr_qty
im_hour_fee
= cntrt_hf
im_monthly_key = cntrt_mk
im_duration
= cntrt_du.
endform.
" CreateContractor
*&---------------------------------------------------------------------*
*&
Form CreateMarketingTravel
*&---------------------------------------------------------------------*
form CreateMarketingTravel.
CREATE OBJECT marketing EXPORTING
im_participants_num = mt_parti
im_travels_num
= mt_numbr.
endform.
" CreateMarketingTravel
*&---------------------------------------------------------------------*
*&
Form CreateIntegrationsTravels
*&---------------------------------------------------------------------*
form CreateIntegrationsTravels.
CREATE OBJECT integrations EXPORTING
im_participants_num = it_parti
im_travels_num
= it_numbr.
endform.
" CreateIntegrationsTravels
*&---------------------------------------------------------------------*
*&
Form CreateOfficeContent
*&---------------------------------------------------------------------*
form CreateOfficeContent.
* Input parameters:
office_furniture = ofc_furn.
office_equipment = ofc_equp.
office_hardware = ofc_hrdw.
*&---------------------------------------------------------------------*
form CreateNre.
* Input parameters:
nre_test_equip
= nre_tseq.
nre_hardware_misc = nre_hrdw.
nre_design_proto = nre_dsgn.
* Calculate nre expense:
nretotal = nre_test_equip + nre_hardware_misc + nre_design_proto.
endform.
" CreateNre
*&---------------------------------------------------------------------*
*&
Form Print_Total_Nre_Expense
*----------------------------------------------------------------------*
*
--> import the P_NRETOTAL text
*----------------------------------------------------------------------*
form Print_Total_Nre_Expense using
p_nretotal.
WRITE: / '
NRE total expense:'
COLOR COL_TOTAL INTENSIFIED OFF,
sy-vline,
AT pos_2 nretotal RIGHT-JUSTIFIED
COLOR COL_HEADING,
sy-vline.
endform.
" Print_Total_Nre_Expense
*&---------------------------------------------------------------------*
*&
Form CreateMyGraph
*&---------------------------------------------------------------------*
form CreateMyGraph.
ITAB_DATA-DATANAME = 'Expenses'.
ITAB_DATA-QUANTITY1 = employeesval.
ITAB_DATA-QUANTITY2 = contractorsval.
ITAB_DATA-QUANTITY3 = marketingcost.
ITAB_DATA-QUANTITY4 = integrationcost.
ITAB_DATA-QUANTITY5 = office_content + structure_total_exp.
ITAB_DATA-QUANTITY6 = nretotal.
APPEND ITAB_DATA.
CALL FUNCTION 'GRAPH_MATRIX_3D'
EXPORTING
COL1
= 'Employees'
COL2
= 'Contractors'
COL3
= 'Marketing'
COL4
= 'Integration'
COL5
= 'Office'
COL6
= 'NRE'
TITL
= 'Proposal Expenses in US$.'
TABLES
DATA
= ITAB_DATA
OPTS
= ITAB_OPTIONS
EXCEPTIONS
OTHERS
= 1.
endform.
" CreateMyGraph
**************************************
****************************************
***INCLUDE YDISPLAY_LCL_CORE_EMPLOYEE .
*----------------------------------------------------------------------*
* CLASS lcl_core_employee DEFINIION
*----------------------------------------------------------------------*
CLASS lcl_core_employee DEFINITION.
PUBLIC SECTION.
TYPES: quantity
workhour_fee
monthly_hours
empl_duration
TYPE
TYPE
TYPE
TYPE
i,
i,
i,
i.
TYPE
TYPE
TYPE
TYPE
quantity
workhour_fee
monthly_hours
empl_duration,
TYPE
TYPE
TYPE
TYPE
quantity
workhour_fee
monthly_hours
empl_duration,
TYPE
TYPE
TYPE
TYPE
TYPE
TYPE
i,
workhour_fee,
monthly_hours,
empl_duration,
i,
i.
PRIVATE SECTION.
CLASS-DATA: n_o_core_empl
total_core_empl_expense
TYPE i,
TYPE i.
ENDCLASS.
*---------------------------------------------------------------------* CLASS lcl_core_employee IMPLEMENTATION
*---------------------------------------------------------------------CLASS lcl_core_employee IMPLEMENTATION.
METHOD constructor.
num
hourlyfee
monthlyhours
duration
ENDMETHOD.
=
=
=
=
im_qty.
im_hour_fee.
im_monthly_key.
im_duration.
METHOD set_attributes.
num
= im_qty.
hourlyfee
= im_hour_fee.
monthlyhours = im_monthly_key.
duration
= im_duration.
ENDMETHOD.
METHOD calculate.
monthlsalary = hourlyfee * monthlyhours.
totalexpense = monthlsalary * duration.
total_core_empl_expense = totalexpense * num.
WRITE: / '
Monthly salary:',
monthlsalary COLOR COL_POSITIVE,
totalexpense COLOR COL_GROUP,
' USD'.
ENDMETHOD.
METHOD calculate_summary.
monthlsalary = hourlyfee * monthlyhours.
totalexpense = monthlsalary * duration.
total_core_empl_expense = totalexpense * num.
ENDMETHOD.
METHOD display_attributes.
WRITE: / '
Num of employees:', AT pos_1 num, AT pos_2 ' Prsn',
/ '
Empl. duration [m]:', AT pos_1 duration,
/ 'Hour fee & monthly key:', AT pos_1 hourlyfee
COLOR COL_TOTAL,
monthlyhours COLOR COL_TOTAL.
ENDMETHOD.
METHOD display_employees_summary.
WRITE: / ' Total expense on core employees:'
COLOR COL_TOTAL INTENSIFIED OFF,
sy-vline,
AT pos_2 total_core_empl_expense RIGHT-JUSTIFIED
COLOR COL_HEADING,
sy-vline.
TmpVal = total_core_empl_expense.
ENDMETHOD.
ENDCLASS.
********************************
********************************
***INCLUDE YDISPLAY_LCL_CONTRACTOR .
*----------------------------------------------------------------------*
* CLASS lcl_contractor DEFINIION
*----------------------------------------------------------------------*
CLASS lcl_contractor DEFINITION.
PUBLIC SECTION.
TYPES: quantity
workhour_fee
monthly_hours
empl_duration
TYPE
TYPE
TYPE
TYPE
i,
i,
i,
i.
TYPE
TYPE
TYPE
TYPE
quantity
workhour_fee
monthly_hours
empl_duration,
TYPE
TYPE
TYPE
TYPE
quantity
workhour_fee
monthly_hours
empl_duration,
TYPE
TYPE
TYPE
TYPE
TYPE
TYPE
i,
workhour_fee,
monthly_hours,
empl_duration,
i,
i.
PRIVATE SECTION.
CLASS-DATA: n_o_cont_empl
total_cont_empl_expense
TYPE i,
TYPE i.
ENDCLASS.
*---------------------------------------------------------------------* CLASS lcl_contractor IMPLEMENTATION
*---------------------------------------------------------------------CLASS lcl_contractor IMPLEMENTATION.
METHOD constructor.
num
= im_qty.
hourlyfee
= im_hour_fee.
monthlyhours = im_monthly_key.
duration
= im_duration.
ENDMETHOD.
METHOD set_attributes.
num
hourlyfee
monthlyhours
duration
ENDMETHOD.
=
=
=
=
im_qty.
im_hour_fee.
im_monthly_key.
im_duration.
METHOD calculate.
monthlsalary = hourlyfee * monthlyhours.
totalexpense = monthlsalary * duration.
total_cont_empl_expense = totalexpense * num.
WRITE: / '
Monthly salary:',
monthlsalary COLOR COL_POSITIVE,
totalexpense COLOR COL_GROUP,
' USD'.
ENDMETHOD.
METHOD calculate_summary.
monthlsalary = hourlyfee * monthlyhours.
totalexpense = monthlsalary * duration.
total_cont_empl_expense = totalexpense * num.
ENDMETHOD.
METHOD display_attributes.
WRITE: / '
Num of contractors:', AT pos_1 num, AT pos_2 ' Contr',
/ '
Empl. duration [m]:', AT pos_1 duration,
/ 'Hour fee & monthly key:', AT pos_1 hourlyfee
COLOR COL_TOTAL,
monthlyhours COLOR COL_TOTAL.
ENDMETHOD.
METHOD display_contractors_summary.
WRITE: / '
Total expense on contractors:'
COLOR COL_TOTAL INTENSIFIED OFF,
sy-vline,
AT pos_2 total_cont_empl_expense RIGHT-JUSTIFIED
COLOR COL_HEADING,
sy-vline.
TmpVal = total_cont_empl_expense.
ENDMETHOD.
ENDCLASS.
********************************
********************************
***INCLUDE YDISPLAY_LCL_TRAVELS .
*---------------------------------------------------------------------* CLASS lcl_travels DEFINIION
*---------------------------------------------------------------------CLASS lcl_travels DEFINITION.
PUBLIC SECTION.
TYPES: n_o_participants TYPE i,
n_o_travels
TYPE i.
CONSTANTS: pos_1 TYPE i VALUE 30,
pos_2 TYPE i VALUE 40.
TYPE n_o_participants
TYPE n_o_travels,
TYPE n_o_participants
TYPE n_o_travels,
TYPE i,
TYPE i.
ENDCLASS.
*---------------------------------------------------------------------* CLASS lcl_travels IMPLEMENTATION
*---------------------------------------------------------------------CLASS lcl_travels IMPLEMENTATION.
METHOD constructor.
participants = im_participants_num.
num
= im_travels_num.
ENDMETHOD.
METHOD set_attributes.
participants = im_participants_num.
num
= im_travels_num.
ENDMETHOD.
METHOD display_attributes.
WRITE: / ' Num of participants:', AT pos_1 participants,
/ '
Num of travels:', AT pos_1 num.
ENDMETHOD.
* Method calculate - based on 5000 USD per 1 travel
METHOD calculate.
total_mrkt_expense = num * 5000 * participants.
WRITE: / '
Marketing travels:', AT pos_1
total_mrkt_expense COLOR COL_POSITIVE INTENSIFIED OFF,
' USD'.
ENDMETHOD.
METHOD calculate_summary.
total_mrkt_expense = num * 5000 * participants.
ENDMETHOD.
METHOD display_travels_summary.
WRITE: / '
Marketing travels:'
COLOR COL_TOTAL INTENSIFIED OFF,
sy-vline,
AT pos_2 total_mrkt_expense RIGHT-JUSTIFIED
COLOR COL_HEADING,
sy-vline.
TmpVal = total_mrkt_expense.
ENDMETHOD.
ENDCLASS.
********************************
********************************
***INCLUDE YDISPLAY_LCL_INTEGRATIONS .
*---------------------------------------------------------------------* CLASS lcl_integrations DEFINIION
*---------------------------------------------------------------------CLASS lcl_integrations DEFINITION.
PUBLIC SECTION.
TYPES: n_o_participants TYPE i,
n_o_travels
TYPE i.
CONSTANTS: pos_1 TYPE i VALUE 30,
pos_2 TYPE i VALUE 40.
METHODS: constructor IMPORTING
im_participants_num
im_travels_num
set_attributes IMPORTING
im_participants_num
im_travels_num
display_attributes,
calculate_summary,
calculate.
TYPE n_o_participants
TYPE n_o_travels,
TYPE n_o_participants
TYPE n_o_travels,
TYPE i,
TYPE i.