SAP Function Modules

IUUC_ADBC_INS_TRIG_CRE SAP Function module - create insert trigger







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

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


Pattern for FM IUUC_ADBC_INS_TRIG_CRE - IUUC ADBC INS TRIG CRE





CALL FUNCTION 'IUUC_ADBC_INS_TRIG_CRE' "create insert trigger
  EXPORTING
    tabname =                   " dd02l-tabname  Table name
    i_shadowtab =               " tabname       Name of logging table
*   prid = 0                    " sy-tabix      Internal table, current line index
    trig_name =                 " ticnv-trg_upd1  Name of update trigger
*   flag_field = 'CNV_FLAG'     " x031l-fieldname  Field name
*   scenario = 'PREUPG'         " ticnv-scenario  Sscenario (graph) of a conversion
    it_dd03p =                  " dmc_dd03p_tab  DMC: Table type for the field list of a structure
*   cnvschema = ' '             " ticnv-schema1  Starting Schema
*   it_specific_conditions =    " abapprog      table type for field-content-specific process option assign.
    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_dbsys = SY-DBSYS          " sy-dbsys      R/3 System, Name of Central Database System
  IMPORTING
    e_error_message =           " dbsqlmsg      SQL Error Message
* TABLES
*   statements =                "
  EXCEPTIONS
    PROGRAM_NOT_GENERATED = 1   "
    .  "  IUUC_ADBC_INS_TRIG_CRE

ABAP code example for Function Module IUUC_ADBC_INS_TRIG_CRE





The ABAP code below is a full code listing to execute function module IUUC_ADBC_INS_TRIG_CRE 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_error_message  TYPE DBSQLMSG ,
it_statements  TYPE STANDARD TABLE OF STRING,"TABLES PARAM
wa_statements  LIKE LINE OF it_statements .


SELECT single TABNAME
FROM DD02L
INTO @DATA(ld_tabname).

DATA(ld_i_shadowtab) = 'Check type of data required'.
DATA(ld_prid) = '123 '.

SELECT single TRG_UPD1
FROM TICNV
INTO @DATA(ld_trig_name).


DATA(ld_flag_field) = some text here

SELECT single SCENARIO
FROM TICNV
INTO @DATA(ld_scenario).

DATA(ld_it_dd03p) = '123 '.

SELECT single SCHEMA1
FROM TICNV
INTO @DATA(ld_cnvschema).

DATA(ld_it_specific_conditions) = '123 '.
DATA(ld_i_phase) = '123 '.
DATA(ld_i_sequence_cache_size) = '123 '.
DATA(ld_i_exec_condition) = '123 '.
DATA(ld_i_active_mt_id) = '123 '.
DATA(ld_i_dbsys) = 'some text here'.

"populate fields of struture and append to itab
append wa_statements to it_statements. . CALL FUNCTION 'IUUC_ADBC_INS_TRIG_CRE' EXPORTING tabname = ld_tabname i_shadowtab = ld_i_shadowtab * prid = ld_prid trig_name = ld_trig_name * flag_field = ld_flag_field * scenario = ld_scenario it_dd03p = ld_it_dd03p * cnvschema = ld_cnvschema * 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_dbsys = ld_i_dbsys IMPORTING e_error_message = ld_e_error_message * TABLES * statements = it_statements EXCEPTIONS PROGRAM_NOT_GENERATED = 1 . " IUUC_ADBC_INS_TRIG_CRE
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "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_error_message  TYPE DBSQLMSG ,
ld_tabname  TYPE DD02L-TABNAME ,
it_statements  TYPE STANDARD TABLE OF STRING ,
wa_statements  LIKE LINE OF it_statements,
ld_i_shadowtab  TYPE TABNAME ,
ld_prid  TYPE SY-TABIX ,
ld_trig_name  TYPE TICNV-TRG_UPD1 ,
ld_flag_field  TYPE X031L-FIELDNAME ,
ld_scenario  TYPE TICNV-SCENARIO ,
ld_it_dd03p  TYPE DMC_DD03P_TAB ,
ld_cnvschema  TYPE TICNV-SCHEMA1 ,
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_dbsys  TYPE SY-DBSYS .


SELECT single TABNAME
FROM DD02L
INTO ld_tabname.


"populate fields of struture and append to itab
append wa_statements to it_statements.
ld_i_shadowtab = 'some text here'.
ld_prid = '123 '.

SELECT single TRG_UPD1
FROM TICNV
INTO ld_trig_name.


ld_flag_field = some text here

SELECT single SCENARIO
FROM TICNV
INTO ld_scenario.

ld_it_dd03p = '123 '.

SELECT single SCHEMA1
FROM TICNV
INTO ld_cnvschema.

ld_it_specific_conditions = '123 '.
ld_i_phase = '123 '.
ld_i_sequence_cache_size = '123 '.
ld_i_exec_condition = '123 '.
ld_i_active_mt_id = '123 '.
ld_i_dbsys = '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 IUUC_ADBC_INS_TRIG_CRE or its description.