FAGL_R_CHECK_PRCTR 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 FAGL_R_CHECK_PRCTR into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
FAGL_R_SEG_SERVICES
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'FAGL_R_CHECK_PRCTR' "Reorg: Check profit center
EXPORTING
iv_kokrs = " kokrs Controlling Area
iv_prctr = " prctr Profit Center
iv_datab = " sy-datum current period begin
iv_datab_val = " sy-datum Validity start
iv_datbis = " sy-datum Current period end
iv_datbis_val = " sy-datum Validity end
iv_seg_old_reorg = " fb_segment Segment for Segmental Reporting
* iv_seg_new_reorg = " fb_segment Segment for Segmental Reporting
* iv_with_data = 'X' " xfeld Checkbox
* it_bukrs = " t_bukrs Company codes
CHANGING
ct_prc_reorg = " fagl_r_t_profitcenter_reorg Enter Cost Centers in Reorganization Plan
ct_prc_reorg_del = " fagl_r_t_profitcenter_reorg Enter Cost Centers in Reorganization Plan
EXCEPTIONS
SENDED_MESSAGE = 1 "
. " FAGL_R_CHECK_PRCTR
The ABAP code below is a full code listing to execute function module FAGL_R_CHECK_PRCTR 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_ct_prc_reorg) = 'Check type of data required'.
DATA(ld_ct_prc_reorg_del) = 'Check type of data required'.
DATA(ld_iv_kokrs) = 'Check type of data required'.
DATA(ld_iv_prctr) = 'Check type of data required'.
DATA(ld_iv_datab) = '20210129'.
DATA(ld_iv_datab_val) = '20210129'.
DATA(ld_iv_datbis) = '20210129'.
DATA(ld_iv_datbis_val) = '20210129'.
DATA(ld_iv_seg_old_reorg) = '20210129'.
DATA(ld_iv_seg_new_reorg) = '20210129'.
DATA(ld_iv_with_data) = '20210129'.
DATA(ld_it_bukrs) = '20210129'. . CALL FUNCTION 'FAGL_R_CHECK_PRCTR' EXPORTING iv_kokrs = ld_iv_kokrs iv_prctr = ld_iv_prctr iv_datab = ld_iv_datab iv_datab_val = ld_iv_datab_val iv_datbis = ld_iv_datbis iv_datbis_val = ld_iv_datbis_val iv_seg_old_reorg = ld_iv_seg_old_reorg * iv_seg_new_reorg = ld_iv_seg_new_reorg * iv_with_data = ld_iv_with_data * it_bukrs = ld_it_bukrs CHANGING ct_prc_reorg = ld_ct_prc_reorg ct_prc_reorg_del = ld_ct_prc_reorg_del EXCEPTIONS SENDED_MESSAGE = 1 . " FAGL_R_CHECK_PRCTR
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.
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_ct_prc_reorg | TYPE FAGL_R_T_PROFITCENTER_REORG , |
| ld_iv_kokrs | TYPE KOKRS , |
| ld_ct_prc_reorg_del | TYPE FAGL_R_T_PROFITCENTER_REORG , |
| ld_iv_prctr | TYPE PRCTR , |
| ld_iv_datab | TYPE SY-DATUM , |
| ld_iv_datab_val | TYPE SY-DATUM , |
| ld_iv_datbis | TYPE SY-DATUM , |
| ld_iv_datbis_val | TYPE SY-DATUM , |
| ld_iv_seg_old_reorg | TYPE FB_SEGMENT , |
| ld_iv_seg_new_reorg | TYPE FB_SEGMENT , |
| ld_iv_with_data | TYPE XFELD , |
| ld_it_bukrs | TYPE T_BUKRS . |
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 FAGL_R_CHECK_PRCTR or its description.