Interface do cálculo da taxa média.
INTERFACE zif_ps_tx_media
PUBLIC .
TYPES:
BEGIN OF ty_data_shdb,
co_area TYPE string, "PWBR
fisc_year TYPE string, "2022
period_from TYPE string, "10
period_to TYPE string, "10
version TYPE string, "0
wbs_element TYPE string, "prps_posid
order_celem TYPE string, "3101010150
activity TYPE string, "12.AS1
value TYPE string, "lw_bseg-wrbtr
END OF ty_data_shdb .
TYPES:
BEGIN OF ty_s_period,
gjahr TYPE t009b-bdatj,
buper TYPE t009b-poper,
begda TYPE dats,
endda TYPE dats,
END OF ty_s_period .
TYPES:
ty_t_periods TYPE SORTED TABLE OF ty_s_period
WITH UNIQUE KEY gjahr buper .
DATA t_bdcdata TYPE tab_bdcdata .
DATA _handle TYPE balloghndl .
METHODS calcular_taxa_media_novo
IMPORTING
!i_rtp TYPE wkgxxx
!i_dp TYPE wkgxxx
!i_hp TYPE megxxx
!i_dri TYPE wkgxxx
!i_ha TYPE megxxx
RETURNING
VALUE(r_taxa_media) TYPE wkgxxx .
METHODS calcular_taxa_media
IMPORTING
!i_receita TYPE wkgxxx
!i_custo_plan TYPE wkgxxx
!i_horas_plan TYPE megxxx
!i_horas_real TYPE megxxx
!i_desp_incl TYPE wkgxxx
RETURNING
VALUE(r_taxa_media) TYPE wkgxxx .
METHODS calc_tx_media
IMPORTING
!kokrs TYPE coep-kokrs
!bukrs TYPE coep-bukrs
!pspnr TYPE prps-pspnr
!posid TYPE prps-posid
!gjahr TYPE xkalxkag-abgrj
!monat TYPE xkalxkag-abgrm
!objnr TYPE cosb-objnr
EXPORTING
!e_receita TYPE wkgxxx
!e_custo_plan TYPE wkgxxx
!e_horas_plan TYPE megxxx
!e_horas_real TYPE megxxx
!e_desp_incl TYPE wkgxxx .
METHODS executa
IMPORTING
!iw_data_shdb TYPE ty_data_shdb
!iv_first_screen TYPE abap_bool OPTIONAL
RETURNING
VALUE(rv_bool) TYPE abap_bool .
METHODS lancar_planejamento
IMPORTING
!kokrs TYPE coep-kokrs
!posid TYPE prps-posid
!gjahr TYPE xkalxkag-abgrj
!monat TYPE xkalxkag-abgrm
!value TYPE wtgxxx .
METHODS lancar_taxa_media
IMPORTING
!kokrs TYPE coep-kokrs
!posid TYPE prps-posid
!gjahr TYPE xkalxkag-abgrj
!monat TYPE xkalxkag-abgrm
!value TYPE wtgxxx .
METHODS montar_atividades
IMPORTING
!co_area TYPE coep-kokrs DEFAULT 'PWBR'
!version TYPE versn DEFAULT '0'
!wbs_element TYPE prps-posid
!year TYPE xkalxkag-abgrj
!period_from TYPE xkalxkag-abgrm
!period_to TYPE xkalxkag-abgrm
!order_celem TYPE kostl OPTIONAL
!activity TYPE lstar OPTIONAL
!quantity TYPE megxxx OPTIONAL
!value TYPE wtgxxx OPTIONAL .
METHODS montar_despesas
IMPORTING
!co_area TYPE coep-kokrs DEFAULT 'PWBR'
!version TYPE versn DEFAULT '0'
!wbs_element TYPE prps-posid
!year TYPE xkalxkag-abgrj
!period_from TYPE xkalxkag-abgrm
!period_to TYPE xkalxkag-abgrm
!order_celem TYPE kostl OPTIONAL
!activity TYPE lstar OPTIONAL
!quantity TYPE megxxx OPTIONAL
!value TYPE wtgxxx OPTIONAL .
METHODS montar_receitas
IMPORTING
!co_area TYPE coep-kokrs DEFAULT 'PWBR'
!version TYPE versn DEFAULT '0'
!wbs_element TYPE prps-posid
!year TYPE xkalxkag-abgrj
!period_from TYPE xkalxkag-abgrm
!period_to TYPE xkalxkag-abgrm
!order_celem TYPE kostl OPTIONAL
!activity TYPE lstar OPTIONAL
!quantity TYPE megxxx OPTIONAL
!value TYPE wtgxxx OPTIONAL .
METHODS planejar_atividades
IMPORTING
!iw_data_shdb TYPE ty_data_shdb
!iv_first_screen TYPE abap_bool OPTIONAL .
METHODS planejar_despesas
IMPORTING
!iw_data_shdb TYPE ty_data_shdb
!iv_first_screen TYPE abap_bool OPTIONAL .
METHODS planejar_receitas
IMPORTING
!iw_data_shdb TYPE ty_data_shdb
!iv_first_screen TYPE abap_bool OPTIONAL .
METHODS poc_custos_billable
IMPORTING
!kokrs TYPE coep-kokrs
!bukrs TYPE coep-bukrs
!pspnr TYPE prps-pspnr
!posid TYPE prps-posid
!gjahr TYPE xkalxkag-abgrj
!monat TYPE xkalxkag-abgrm
!objnr TYPE cosb-objnr
RETURNING
VALUE(r_custo_billable) TYPE wkgxxx .
METHODS poc_custos_included
IMPORTING
!kokrs TYPE coep-kokrs
!bukrs TYPE coep-bukrs
!pspnr TYPE prps-pspnr
!posid TYPE prps-posid
!gjahr TYPE xkalxkag-abgrj
!monat TYPE xkalxkag-abgrm
!objnr TYPE cosb-objnr
RETURNING
VALUE(r_custo_included) TYPE wkgxxx .
METHODS preencher_periodos
IMPORTING
!plfaz TYPE proj-plfaz
!plsez TYPE proj-plsez
RETURNING
VALUE(rt_periods) TYPE ty_t_periods .
METHODS preenche_bdc
IMPORTING
!iv_dynbegin TYPE string
!iv_name TYPE string
!iv_value TYPE any .
METHODS receita_planejada
IMPORTING
!kokrs TYPE coep-kokrs
!bukrs TYPE coep-bukrs
!pspnr TYPE prps-pspnr
!posid TYPE prps-posid
!gjahr TYPE xkalxkag-abgrj
!monat TYPE xkalxkag-abgrm .
METHODS reconhecer_receita
IMPORTING
!kokrs TYPE coep-kokrs
!bukrs TYPE coep-bukrs
!pspnr TYPE prps-pspnr
!posid TYPE prps-posid
!gjahr TYPE xkalxkag-abgrj
!monat TYPE xkalxkag-abgrm .
ENDINTERFACE.