SAP Function Modules

HF_INTEGRATED_COST_REPORTING SAP Function module







HF_INTEGRATED_COST_REPORTING is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name HF_INTEGRATED_COST_REPORTING into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: PS08
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM HF_INTEGRATED_COST_REPORTING - HF INTEGRATED COST REPORTING





CALL FUNCTION 'HF_INTEGRATED_COST_REPORTING' "
* EXPORTING
*   i_rpsco_only = SPACE        "
*   i_no_auth_check = SPACE     " c
*   i_proj_pspid =              " proj-pspid
*   i_vers1 = '000'             " rpsco-versn
*   i_vers2 = '000'             " rpsco-versn
*   i_ev_versn = '000'          " rpsco-versn
*   i_versn_all = SPACE         " c
*   i_repid = SPACE             " rkb1d-repid
*   i_flg_report_sel = SPACE    " c
*   i_vsnmr = SPACE             " vskopf-vsnmr
*   i_summation = 'X'           " lko74-incl_hibea
*   i_new_task = SPACE          " c
*   i_buffer = 'X'              " c
*   id_flg_sd = SPACE           " xflag
  IMPORTING
    e_repid =                   " rkb1d-repid
  TABLES
    t_objnr =                   " objlist_ps
*   t_rpsco_lis =               " rpsco_lis
*   t_rpsco_m =                 " rpsco_m
*   t_psj_auth =                " psj_auth
    .  "  HF_INTEGRATED_COST_REPORTING

ABAP code example for Function Module HF_INTEGRATED_COST_REPORTING





The ABAP code below is a full code listing to execute function module HF_INTEGRATED_COST_REPORTING including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_e_repid  TYPE RKB1D-REPID ,
it_t_objnr  TYPE STANDARD TABLE OF OBJLIST_PS,"TABLES PARAM
wa_t_objnr  LIKE LINE OF it_t_objnr ,
it_t_rpsco_lis  TYPE STANDARD TABLE OF RPSCO_LIS,"TABLES PARAM
wa_t_rpsco_lis  LIKE LINE OF it_t_rpsco_lis ,
it_t_rpsco_m  TYPE STANDARD TABLE OF RPSCO_M,"TABLES PARAM
wa_t_rpsco_m  LIKE LINE OF it_t_rpsco_m ,
it_t_psj_auth  TYPE STANDARD TABLE OF PSJ_AUTH,"TABLES PARAM
wa_t_psj_auth  LIKE LINE OF it_t_psj_auth .

DATA(ld_i_rpsco_only) = 'some text here'.
DATA(ld_i_no_auth_check) = 'Check type of data required'.

SELECT single PSPID
FROM PROJ
INTO @DATA(ld_i_proj_pspid).


SELECT single VERSN
FROM RPSCO
INTO @DATA(ld_i_vers1).


SELECT single VERSN
FROM RPSCO
INTO @DATA(ld_i_vers2).


SELECT single VERSN
FROM RPSCO
INTO @DATA(ld_i_ev_versn).

DATA(ld_i_versn_all) = 'Check type of data required'.

DATA(ld_i_repid) = some text here
DATA(ld_i_flg_report_sel) = 'Check type of data required'.

SELECT single VSNMR
FROM VSKOPF
INTO @DATA(ld_i_vsnmr).


DATA(ld_i_summation) = some text here
DATA(ld_i_new_task) = 'Check type of data required'.
DATA(ld_i_buffer) = 'Check type of data required'.
DATA(ld_id_flg_sd) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_objnr to it_t_objnr.

"populate fields of struture and append to itab
append wa_t_rpsco_lis to it_t_rpsco_lis.

"populate fields of struture and append to itab
append wa_t_rpsco_m to it_t_rpsco_m.

"populate fields of struture and append to itab
append wa_t_psj_auth to it_t_psj_auth. . CALL FUNCTION 'HF_INTEGRATED_COST_REPORTING' * EXPORTING * i_rpsco_only = ld_i_rpsco_only * i_no_auth_check = ld_i_no_auth_check * i_proj_pspid = ld_i_proj_pspid * i_vers1 = ld_i_vers1 * i_vers2 = ld_i_vers2 * i_ev_versn = ld_i_ev_versn * i_versn_all = ld_i_versn_all * i_repid = ld_i_repid * i_flg_report_sel = ld_i_flg_report_sel * i_vsnmr = ld_i_vsnmr * i_summation = ld_i_summation * i_new_task = ld_i_new_task * i_buffer = ld_i_buffer * id_flg_sd = ld_id_flg_sd IMPORTING e_repid = ld_e_repid TABLES t_objnr = it_t_objnr * t_rpsco_lis = it_t_rpsco_lis * t_rpsco_m = it_t_rpsco_m * t_psj_auth = it_t_psj_auth . " HF_INTEGRATED_COST_REPORTING
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_e_repid  TYPE RKB1D-REPID ,
ld_i_rpsco_only  TYPE STRING ,
it_t_objnr  TYPE STANDARD TABLE OF OBJLIST_PS ,
wa_t_objnr  LIKE LINE OF it_t_objnr,
ld_i_no_auth_check  TYPE C ,
it_t_rpsco_lis  TYPE STANDARD TABLE OF RPSCO_LIS ,
wa_t_rpsco_lis  LIKE LINE OF it_t_rpsco_lis,
ld_i_proj_pspid  TYPE PROJ-PSPID ,
it_t_rpsco_m  TYPE STANDARD TABLE OF RPSCO_M ,
wa_t_rpsco_m  LIKE LINE OF it_t_rpsco_m,
ld_i_vers1  TYPE RPSCO-VERSN ,
it_t_psj_auth  TYPE STANDARD TABLE OF PSJ_AUTH ,
wa_t_psj_auth  LIKE LINE OF it_t_psj_auth,
ld_i_vers2  TYPE RPSCO-VERSN ,
ld_i_ev_versn  TYPE RPSCO-VERSN ,
ld_i_versn_all  TYPE C ,
ld_i_repid  TYPE RKB1D-REPID ,
ld_i_flg_report_sel  TYPE C ,
ld_i_vsnmr  TYPE VSKOPF-VSNMR ,
ld_i_summation  TYPE LKO74-INCL_HIBEA ,
ld_i_new_task  TYPE C ,
ld_i_buffer  TYPE C ,
ld_id_flg_sd  TYPE XFLAG .

ld_i_rpsco_only = 'some text here'.

"populate fields of struture and append to itab
append wa_t_objnr to it_t_objnr.
ld_i_no_auth_check = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_rpsco_lis to it_t_rpsco_lis.

SELECT single PSPID
FROM PROJ
INTO ld_i_proj_pspid.


"populate fields of struture and append to itab
append wa_t_rpsco_m to it_t_rpsco_m.

SELECT single VERSN
FROM RPSCO
INTO ld_i_vers1.


"populate fields of struture and append to itab
append wa_t_psj_auth to it_t_psj_auth.

SELECT single VERSN
FROM RPSCO
INTO ld_i_vers2.


SELECT single VERSN
FROM RPSCO
INTO ld_i_ev_versn.

ld_i_versn_all = 'Check type of data required'.

ld_i_repid = some text here
ld_i_flg_report_sel = 'Check type of data required'.

SELECT single VSNMR
FROM VSKOPF
INTO ld_i_vsnmr.


ld_i_summation = some text here
ld_i_new_task = 'Check type of data required'.
ld_i_buffer = 'Check type of data required'.
ld_id_flg_sd = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name HF_INTEGRATED_COST_REPORTING or its description.