SAP Function Modules

RH_CPCALC_UPDATE_CO_INFO SAP Function module







RH_CPCALC_UPDATE_CO_INFO 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 RH_CPCALC_UPDATE_CO_INFO into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM RH_CPCALC_UPDATE_CO_INFO - RH CPCALC UPDATE CO INFO





CALL FUNCTION 'RH_CPCALC_UPDATE_CO_INFO' "
  EXPORTING
    plan_plvar =                " ppcst-plvar
    plan_versn =                " ppcst-versn
    plan_begda =                " ppcst-bego
    plan_endda =                " ppcst-endo
    plan_vname =                " ppcst-vname
    plan_curcy =                " ppcst-curcy
*   plan_curdt = SY-DATUM       " pp0n-curdt
*   plan_curty = 'M   '         " pp0n-curtp
  TABLES
    cost_per_cost_center =      " ppcco
    .  "  RH_CPCALC_UPDATE_CO_INFO

ABAP code example for Function Module RH_CPCALC_UPDATE_CO_INFO





The ABAP code below is a full code listing to execute function module RH_CPCALC_UPDATE_CO_INFO 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:
it_cost_per_cost_center  TYPE STANDARD TABLE OF PPCCO,"TABLES PARAM
wa_cost_per_cost_center  LIKE LINE OF it_cost_per_cost_center .


DATA(ld_plan_plvar) = some text here

DATA(ld_plan_versn) = some text here

DATA(ld_plan_begda) = 20210129

DATA(ld_plan_endda) = 20210129

DATA(ld_plan_vname) = some text here

DATA(ld_plan_curcy) = Check type of data required

DATA(ld_plan_curdt) = 20210129

DATA(ld_plan_curty) = some text here

"populate fields of struture and append to itab
append wa_cost_per_cost_center to it_cost_per_cost_center. . CALL FUNCTION 'RH_CPCALC_UPDATE_CO_INFO' EXPORTING plan_plvar = ld_plan_plvar plan_versn = ld_plan_versn plan_begda = ld_plan_begda plan_endda = ld_plan_endda plan_vname = ld_plan_vname plan_curcy = ld_plan_curcy * plan_curdt = ld_plan_curdt * plan_curty = ld_plan_curty TABLES cost_per_cost_center = it_cost_per_cost_center . " RH_CPCALC_UPDATE_CO_INFO
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_plan_plvar  TYPE PPCST-PLVAR ,
it_cost_per_cost_center  TYPE STANDARD TABLE OF PPCCO ,
wa_cost_per_cost_center  LIKE LINE OF it_cost_per_cost_center,
ld_plan_versn  TYPE PPCST-VERSN ,
ld_plan_begda  TYPE PPCST-BEGO ,
ld_plan_endda  TYPE PPCST-ENDO ,
ld_plan_vname  TYPE PPCST-VNAME ,
ld_plan_curcy  TYPE PPCST-CURCY ,
ld_plan_curdt  TYPE PP0N-CURDT ,
ld_plan_curty  TYPE PP0N-CURTP .


ld_plan_plvar = some text here

"populate fields of struture and append to itab
append wa_cost_per_cost_center to it_cost_per_cost_center.

ld_plan_versn = some text here

ld_plan_begda = 20210129

ld_plan_endda = 20210129

ld_plan_vname = some text here

ld_plan_curcy = Check type of data required

ld_plan_curdt = 20210129

ld_plan_curty = some text here

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 RH_CPCALC_UPDATE_CO_INFO or its description.