SAP Function Modules

RH_CP_CO_PLAN_SCENARIO_RELEASE SAP Function module







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

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


Pattern for FM RH_CP_CO_PLAN_SCENARIO_RELEASE - RH CP CO PLAN SCENARIO RELEASE





CALL FUNCTION 'RH_CP_CO_PLAN_SCENARIO_RELEASE' "
  EXPORTING
    hr_plvar =                  " t77kd-plvar
    hr_versn =                  " t77kd-versn
    hr_begda =                  " t77kd-begda
    hr_endda =                  " t77kd-endda
*   hr_vname = SPACE            " t77kd-vname
    hr_check =                  " rhcod-test
*   hr_prot = 'X'               " rhcod-prot
  IMPORTING
    hr_release_subrc =          " sy-subrc
* TABLES
*   cost_per_cost_center_vname =   " ppcco
*   org_text_vname =            " ppcot
*   org_cost_vname =            " ppcoc
*   cost_tab_vname =            " ppcwt
    .  "  RH_CP_CO_PLAN_SCENARIO_RELEASE

ABAP code example for Function Module RH_CP_CO_PLAN_SCENARIO_RELEASE





The ABAP code below is a full code listing to execute function module RH_CP_CO_PLAN_SCENARIO_RELEASE 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_hr_release_subrc  TYPE SY-SUBRC ,
it_cost_per_cost_center_vname  TYPE STANDARD TABLE OF PPCCO,"TABLES PARAM
wa_cost_per_cost_center_vname  LIKE LINE OF it_cost_per_cost_center_vname ,
it_org_text_vname  TYPE STANDARD TABLE OF PPCOT,"TABLES PARAM
wa_org_text_vname  LIKE LINE OF it_org_text_vname ,
it_org_cost_vname  TYPE STANDARD TABLE OF PPCOC,"TABLES PARAM
wa_org_cost_vname  LIKE LINE OF it_org_cost_vname ,
it_cost_tab_vname  TYPE STANDARD TABLE OF PPCWT,"TABLES PARAM
wa_cost_tab_vname  LIKE LINE OF it_cost_tab_vname .


SELECT single PLVAR
FROM T77KD
INTO @DATA(ld_hr_plvar).


SELECT single VERSN
FROM T77KD
INTO @DATA(ld_hr_versn).


SELECT single BEGDA
FROM T77KD
INTO @DATA(ld_hr_begda).


SELECT single ENDDA
FROM T77KD
INTO @DATA(ld_hr_endda).


SELECT single VNAME
FROM T77KD
INTO @DATA(ld_hr_vname).


DATA(ld_hr_check) = some text here

DATA(ld_hr_prot) = some text here

"populate fields of struture and append to itab
append wa_cost_per_cost_center_vname to it_cost_per_cost_center_vname.

"populate fields of struture and append to itab
append wa_org_text_vname to it_org_text_vname.

"populate fields of struture and append to itab
append wa_org_cost_vname to it_org_cost_vname.

"populate fields of struture and append to itab
append wa_cost_tab_vname to it_cost_tab_vname. . CALL FUNCTION 'RH_CP_CO_PLAN_SCENARIO_RELEASE' EXPORTING hr_plvar = ld_hr_plvar hr_versn = ld_hr_versn hr_begda = ld_hr_begda hr_endda = ld_hr_endda * hr_vname = ld_hr_vname hr_check = ld_hr_check * hr_prot = ld_hr_prot IMPORTING hr_release_subrc = ld_hr_release_subrc * TABLES * cost_per_cost_center_vname = it_cost_per_cost_center_vname * org_text_vname = it_org_text_vname * org_cost_vname = it_org_cost_vname * cost_tab_vname = it_cost_tab_vname . " RH_CP_CO_PLAN_SCENARIO_RELEASE
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_hr_release_subrc  TYPE SY-SUBRC ,
ld_hr_plvar  TYPE T77KD-PLVAR ,
it_cost_per_cost_center_vname  TYPE STANDARD TABLE OF PPCCO ,
wa_cost_per_cost_center_vname  LIKE LINE OF it_cost_per_cost_center_vname,
ld_hr_versn  TYPE T77KD-VERSN ,
it_org_text_vname  TYPE STANDARD TABLE OF PPCOT ,
wa_org_text_vname  LIKE LINE OF it_org_text_vname,
ld_hr_begda  TYPE T77KD-BEGDA ,
it_org_cost_vname  TYPE STANDARD TABLE OF PPCOC ,
wa_org_cost_vname  LIKE LINE OF it_org_cost_vname,
ld_hr_endda  TYPE T77KD-ENDDA ,
it_cost_tab_vname  TYPE STANDARD TABLE OF PPCWT ,
wa_cost_tab_vname  LIKE LINE OF it_cost_tab_vname,
ld_hr_vname  TYPE T77KD-VNAME ,
ld_hr_check  TYPE RHCOD-TEST ,
ld_hr_prot  TYPE RHCOD-PROT .


SELECT single PLVAR
FROM T77KD
INTO ld_hr_plvar.


"populate fields of struture and append to itab
append wa_cost_per_cost_center_vname to it_cost_per_cost_center_vname.

SELECT single VERSN
FROM T77KD
INTO ld_hr_versn.


"populate fields of struture and append to itab
append wa_org_text_vname to it_org_text_vname.

SELECT single BEGDA
FROM T77KD
INTO ld_hr_begda.


"populate fields of struture and append to itab
append wa_org_cost_vname to it_org_cost_vname.

SELECT single ENDDA
FROM T77KD
INTO ld_hr_endda.


"populate fields of struture and append to itab
append wa_cost_tab_vname to it_cost_tab_vname.

SELECT single VNAME
FROM T77KD
INTO ld_hr_vname.


ld_hr_check = some text here

ld_hr_prot = 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_CP_CO_PLAN_SCENARIO_RELEASE or its description.