SAP Function Modules

C1F0_PHRASE_REPLACE SAP Function module







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

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


Pattern for FM C1F0_PHRASE_REPLACE - C1F0 PHRASE REPLACE





CALL FUNCTION 'C1F0_PHRASE_REPLACE' "
  EXPORTING
    i_recn =                    " rcgukey-recn
    i_recn_new =                " rcgukey-recn
*   i_valdat = SY-DATUM         " sy-datum      Key Date
*   i_aennr = SPACE             " rcguadm-aennr  Change Number
  IMPORTING
    e_flg_repl_in_sub =         " esp1_boolean
    e_flg_repl_in_lay =         " esp1_boolean
    e_flg_repl_in_dg =          " esp1_boolean
    e_flg_repl_in_dgsd =        " esp1_boolean
    e_flg_repl_in_ihs =         " esp1_boolean
* TABLES
*   x_usage_sub_tab =           " espph_usage_sub_tab_type
*   x_usage_lay_tab =           " espph_usage_lay_tab_type
*   x_usage_dg_tab =            " espph_usage_dg_tab_type
*   x_usage_dgsd_tab =          " espph_usage_dgsd_tab_type
*   x_usage_ihs_tab =           " espph_usage_ihs_tab_type
*   x_usage_wastmgmt_tab =      " espph_usage_wastmgmt_tab_type
  EXCEPTIONS
    MISSING_EXPORT_TABLE = 1    "
    NO_PHRASE_AUTHORISATION = 2  "
    PHRASE_NOT_FOUND = 3        "
    .  "  C1F0_PHRASE_REPLACE

ABAP code example for Function Module C1F0_PHRASE_REPLACE





The ABAP code below is a full code listing to execute function module C1F0_PHRASE_REPLACE 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_flg_repl_in_sub  TYPE ESP1_BOOLEAN ,
ld_e_flg_repl_in_lay  TYPE ESP1_BOOLEAN ,
ld_e_flg_repl_in_dg  TYPE ESP1_BOOLEAN ,
ld_e_flg_repl_in_dgsd  TYPE ESP1_BOOLEAN ,
ld_e_flg_repl_in_ihs  TYPE ESP1_BOOLEAN ,
it_x_usage_sub_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_SUB_TAB_TYPE,"TABLES PARAM
wa_x_usage_sub_tab  LIKE LINE OF it_x_usage_sub_tab ,
it_x_usage_lay_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_LAY_TAB_TYPE,"TABLES PARAM
wa_x_usage_lay_tab  LIKE LINE OF it_x_usage_lay_tab ,
it_x_usage_dg_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_DG_TAB_TYPE,"TABLES PARAM
wa_x_usage_dg_tab  LIKE LINE OF it_x_usage_dg_tab ,
it_x_usage_dgsd_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_DGSD_TAB_TYPE,"TABLES PARAM
wa_x_usage_dgsd_tab  LIKE LINE OF it_x_usage_dgsd_tab ,
it_x_usage_ihs_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_IHS_TAB_TYPE,"TABLES PARAM
wa_x_usage_ihs_tab  LIKE LINE OF it_x_usage_ihs_tab ,
it_x_usage_wastmgmt_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_WASTMGMT_TAB_TYPE,"TABLES PARAM
wa_x_usage_wastmgmt_tab  LIKE LINE OF it_x_usage_wastmgmt_tab .


DATA(ld_i_recn) = Check type of data required

DATA(ld_i_recn_new) = Check type of data required
DATA(ld_i_valdat) = '20210129'.

DATA(ld_i_aennr) = some text here

"populate fields of struture and append to itab
append wa_x_usage_sub_tab to it_x_usage_sub_tab.

"populate fields of struture and append to itab
append wa_x_usage_lay_tab to it_x_usage_lay_tab.

"populate fields of struture and append to itab
append wa_x_usage_dg_tab to it_x_usage_dg_tab.

"populate fields of struture and append to itab
append wa_x_usage_dgsd_tab to it_x_usage_dgsd_tab.

"populate fields of struture and append to itab
append wa_x_usage_ihs_tab to it_x_usage_ihs_tab.

"populate fields of struture and append to itab
append wa_x_usage_wastmgmt_tab to it_x_usage_wastmgmt_tab. . CALL FUNCTION 'C1F0_PHRASE_REPLACE' EXPORTING i_recn = ld_i_recn i_recn_new = ld_i_recn_new * i_valdat = ld_i_valdat * i_aennr = ld_i_aennr IMPORTING e_flg_repl_in_sub = ld_e_flg_repl_in_sub e_flg_repl_in_lay = ld_e_flg_repl_in_lay e_flg_repl_in_dg = ld_e_flg_repl_in_dg e_flg_repl_in_dgsd = ld_e_flg_repl_in_dgsd e_flg_repl_in_ihs = ld_e_flg_repl_in_ihs * TABLES * x_usage_sub_tab = it_x_usage_sub_tab * x_usage_lay_tab = it_x_usage_lay_tab * x_usage_dg_tab = it_x_usage_dg_tab * x_usage_dgsd_tab = it_x_usage_dgsd_tab * x_usage_ihs_tab = it_x_usage_ihs_tab * x_usage_wastmgmt_tab = it_x_usage_wastmgmt_tab EXCEPTIONS MISSING_EXPORT_TABLE = 1 NO_PHRASE_AUTHORISATION = 2 PHRASE_NOT_FOUND = 3 . " C1F0_PHRASE_REPLACE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here 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_flg_repl_in_sub  TYPE ESP1_BOOLEAN ,
ld_i_recn  TYPE RCGUKEY-RECN ,
it_x_usage_sub_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_SUB_TAB_TYPE ,
wa_x_usage_sub_tab  LIKE LINE OF it_x_usage_sub_tab,
ld_e_flg_repl_in_lay  TYPE ESP1_BOOLEAN ,
ld_i_recn_new  TYPE RCGUKEY-RECN ,
it_x_usage_lay_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_LAY_TAB_TYPE ,
wa_x_usage_lay_tab  LIKE LINE OF it_x_usage_lay_tab,
ld_e_flg_repl_in_dg  TYPE ESP1_BOOLEAN ,
ld_i_valdat  TYPE SY-DATUM ,
it_x_usage_dg_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_DG_TAB_TYPE ,
wa_x_usage_dg_tab  LIKE LINE OF it_x_usage_dg_tab,
ld_e_flg_repl_in_dgsd  TYPE ESP1_BOOLEAN ,
ld_i_aennr  TYPE RCGUADM-AENNR ,
it_x_usage_dgsd_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_DGSD_TAB_TYPE ,
wa_x_usage_dgsd_tab  LIKE LINE OF it_x_usage_dgsd_tab,
ld_e_flg_repl_in_ihs  TYPE ESP1_BOOLEAN ,
it_x_usage_ihs_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_IHS_TAB_TYPE ,
wa_x_usage_ihs_tab  LIKE LINE OF it_x_usage_ihs_tab,
it_x_usage_wastmgmt_tab  TYPE STANDARD TABLE OF ESPPH_USAGE_WASTMGMT_TAB_TYPE ,
wa_x_usage_wastmgmt_tab  LIKE LINE OF it_x_usage_wastmgmt_tab.


ld_i_recn = Check type of data required

"populate fields of struture and append to itab
append wa_x_usage_sub_tab to it_x_usage_sub_tab.

ld_i_recn_new = Check type of data required

"populate fields of struture and append to itab
append wa_x_usage_lay_tab to it_x_usage_lay_tab.
ld_i_valdat = '20210129'.

"populate fields of struture and append to itab
append wa_x_usage_dg_tab to it_x_usage_dg_tab.

ld_i_aennr = some text here

"populate fields of struture and append to itab
append wa_x_usage_dgsd_tab to it_x_usage_dgsd_tab.

"populate fields of struture and append to itab
append wa_x_usage_ihs_tab to it_x_usage_ihs_tab.

"populate fields of struture and append to itab
append wa_x_usage_wastmgmt_tab to it_x_usage_wastmgmt_tab.

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