SAP Function Modules

IUUC_CRE_ACT_DB_TRIGGER SAP Function module - create and activate DB triggers







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

Associated Function Group: IUUC_REMOTE
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM IUUC_CRE_ACT_DB_TRIGGER - IUUC CRE ACT DB TRIGGER





CALL FUNCTION 'IUUC_CRE_ACT_DB_TRIGGER' "create and activate DB triggers
  EXPORTING
    i_tabname =                 " tabname       name of original table
    i_shadowtab =               " tabname       name of logging table
    i_tabclass =                " tabclass      Table category
    i_process_option =          " num1          process option
*   i_exec = 'X'                " ddrefstruc-bool  really create trigger(s)
*   i_scenario = 'GBSL'         " char4         to distinghish IUUC and GBSL
*   i_data_in_logtab =          " boolean       data fields are included in logging table
*   i_create_temp_trig =        " boolean       create temporary triggers
*   i_trigger_state = 0         " num1          trigger state
*   it_specific_conditions =    " abapprog      Table Type for ABAP Programs
*   i_phase =                   " iuuc_freeze_phase  phase in which trigger is to be changed from delta to freeze
*   i_sequence_cache_size = 100  " numc_5       sequence cache size
*   i_exec_condition =          " boolean       execution subject to condition
*   i_active_mt_id =            " char3         execution subject to switch
*   i_add_client_cond =         " boolean       add trigger condition for client field
*   i_db_operat =               " iuuc_operation  IUUC: Operation
*   i_logtab_multiuse =         " boolean       1 to N replication flag
  IMPORTING
    et_statements =             " abapprog      Table Type for ABAP Programs
    et_error =                  " tsfotabl      Table Type for ABAP Programs
  EXCEPTIONS
    TABLE_NOT_EXIST = 1         "               the specified table doesn't exist
    SHADOWTAB_NOT_EXIST = 2     "               the specified shadow table doesn't exist
    INSERT_TRIGGER_FAILED = 3   "               insert trigger could not be created / activiated
    UPDATE_TRIGGER_FAILED = 4   "               update trigger could not be created / activiated
    DELETE_TRIGGER_FAILED = 5   "               delete trigger could not be created / activiated
    TABLE_NOT_ON_DB = 6         "               table doesn't exist in DB system
    .  "  IUUC_CRE_ACT_DB_TRIGGER

ABAP code example for Function Module IUUC_CRE_ACT_DB_TRIGGER





The ABAP code below is a full code listing to execute function module IUUC_CRE_ACT_DB_TRIGGER 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_et_statements  TYPE ABAPPROG ,
ld_et_error  TYPE TSFOTABL .

DATA(ld_i_tabname) = 'Check type of data required'.
DATA(ld_i_shadowtab) = 'Check type of data required'.
DATA(ld_i_tabclass) = 'Check type of data required'.
DATA(ld_i_process_option) = 'Check type of data required'.

DATA(ld_i_exec) = some text here
DATA(ld_i_scenario) = 'Check type of data required'.
DATA(ld_i_data_in_logtab) = 'Check type of data required'.
DATA(ld_i_create_temp_trig) = 'Check type of data required'.
DATA(ld_i_trigger_state) = 'Check type of data required'.
DATA(ld_it_specific_conditions) = 'Check type of data required'.
DATA(ld_i_phase) = 'Check type of data required'.
DATA(ld_i_sequence_cache_size) = 'Check type of data required'.
DATA(ld_i_exec_condition) = 'Check type of data required'.
DATA(ld_i_active_mt_id) = 'Check type of data required'.
DATA(ld_i_add_client_cond) = 'Check type of data required'.
DATA(ld_i_db_operat) = 'Check type of data required'.
DATA(ld_i_logtab_multiuse) = 'Check type of data required'. . CALL FUNCTION 'IUUC_CRE_ACT_DB_TRIGGER' EXPORTING i_tabname = ld_i_tabname i_shadowtab = ld_i_shadowtab i_tabclass = ld_i_tabclass i_process_option = ld_i_process_option * i_exec = ld_i_exec * i_scenario = ld_i_scenario * i_data_in_logtab = ld_i_data_in_logtab * i_create_temp_trig = ld_i_create_temp_trig * i_trigger_state = ld_i_trigger_state * it_specific_conditions = ld_it_specific_conditions * i_phase = ld_i_phase * i_sequence_cache_size = ld_i_sequence_cache_size * i_exec_condition = ld_i_exec_condition * i_active_mt_id = ld_i_active_mt_id * i_add_client_cond = ld_i_add_client_cond * i_db_operat = ld_i_db_operat * i_logtab_multiuse = ld_i_logtab_multiuse IMPORTING et_statements = ld_et_statements et_error = ld_et_error EXCEPTIONS TABLE_NOT_EXIST = 1 SHADOWTAB_NOT_EXIST = 2 INSERT_TRIGGER_FAILED = 3 UPDATE_TRIGGER_FAILED = 4 DELETE_TRIGGER_FAILED = 5 TABLE_NOT_ON_DB = 6 . " IUUC_CRE_ACT_DB_TRIGGER
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 ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "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_et_statements  TYPE ABAPPROG ,
ld_i_tabname  TYPE TABNAME ,
ld_et_error  TYPE TSFOTABL ,
ld_i_shadowtab  TYPE TABNAME ,
ld_i_tabclass  TYPE TABCLASS ,
ld_i_process_option  TYPE NUM1 ,
ld_i_exec  TYPE DDREFSTRUC-BOOL ,
ld_i_scenario  TYPE CHAR4 ,
ld_i_data_in_logtab  TYPE BOOLEAN ,
ld_i_create_temp_trig  TYPE BOOLEAN ,
ld_i_trigger_state  TYPE NUM1 ,
ld_it_specific_conditions  TYPE ABAPPROG ,
ld_i_phase  TYPE IUUC_FREEZE_PHASE ,
ld_i_sequence_cache_size  TYPE NUMC_5 ,
ld_i_exec_condition  TYPE BOOLEAN ,
ld_i_active_mt_id  TYPE CHAR3 ,
ld_i_add_client_cond  TYPE BOOLEAN ,
ld_i_db_operat  TYPE IUUC_OPERATION ,
ld_i_logtab_multiuse  TYPE BOOLEAN .

ld_i_tabname = 'Check type of data required'.
ld_i_shadowtab = 'Check type of data required'.
ld_i_tabclass = 'Check type of data required'.
ld_i_process_option = 'Check type of data required'.

ld_i_exec = some text here
ld_i_scenario = 'Check type of data required'.
ld_i_data_in_logtab = 'Check type of data required'.
ld_i_create_temp_trig = 'Check type of data required'.
ld_i_trigger_state = 'Check type of data required'.
ld_it_specific_conditions = 'Check type of data required'.
ld_i_phase = 'Check type of data required'.
ld_i_sequence_cache_size = 'Check type of data required'.
ld_i_exec_condition = 'Check type of data required'.
ld_i_active_mt_id = 'Check type of data required'.
ld_i_add_client_cond = 'Check type of data required'.
ld_i_db_operat = 'Check type of data required'.
ld_i_logtab_multiuse = '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 IUUC_CRE_ACT_DB_TRIGGER or its description.