SAP Function Modules

ECOP_TKA01_INIT SAP Function module







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

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


Pattern for FM ECOP_TKA01_INIT - ECOP TKA01 INIT





CALL FUNCTION 'ECOP_TKA01_INIT' "
  EXPORTING
    entity =                    " entcopy02-domname
    tabname =                   " entcopy02-tabname
    value_source_entity =       "
*   value_target_entity =       "
*   action =                    " entcopy02-functype
*   order =                     " e071k-trkorr
*   task =                      " e071k-trkorr
  IMPORTING
    retcode =                   " sy-subrc
* TABLES
*   list_of_objects =           " ecopt_l_o_obj_tab
  CHANGING
    pt_data =                   " data
    .  "  ECOP_TKA01_INIT

ABAP code example for Function Module ECOP_TKA01_INIT





The ABAP code below is a full code listing to execute function module ECOP_TKA01_INIT 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_retcode  TYPE SY-SUBRC ,
it_list_of_objects  TYPE STANDARD TABLE OF ECOPT_L_O_OBJ_TAB,"TABLES PARAM
wa_list_of_objects  LIKE LINE OF it_list_of_objects .

DATA(ld_pt_data) = 'Check type of data required'.

SELECT single DOMNAME
FROM ENTCOPY02
INTO @DATA(ld_entity).


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

DATA(ld_value_source_entity) = 'some text here'.
DATA(ld_value_target_entity) = 'some text here'.

SELECT single FUNCTYPE
FROM ENTCOPY02
INTO @DATA(ld_action).


SELECT single TRKORR
FROM E071K
INTO @DATA(ld_order).


SELECT single TRKORR
FROM E071K
INTO @DATA(ld_task).


"populate fields of struture and append to itab
append wa_list_of_objects to it_list_of_objects. . CALL FUNCTION 'ECOP_TKA01_INIT' EXPORTING entity = ld_entity tabname = ld_tabname value_source_entity = ld_value_source_entity * value_target_entity = ld_value_target_entity * action = ld_action * order = ld_order * task = ld_task IMPORTING retcode = ld_retcode * TABLES * list_of_objects = it_list_of_objects CHANGING pt_data = ld_pt_data . " ECOP_TKA01_INIT
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_pt_data  TYPE DATA ,
ld_retcode  TYPE SY-SUBRC ,
ld_entity  TYPE ENTCOPY02-DOMNAME ,
it_list_of_objects  TYPE STANDARD TABLE OF ECOPT_L_O_OBJ_TAB ,
wa_list_of_objects  LIKE LINE OF it_list_of_objects,
ld_tabname  TYPE ENTCOPY02-TABNAME ,
ld_value_source_entity  TYPE STRING ,
ld_value_target_entity  TYPE STRING ,
ld_action  TYPE ENTCOPY02-FUNCTYPE ,
ld_order  TYPE E071K-TRKORR ,
ld_task  TYPE E071K-TRKORR .

ld_pt_data = 'Check type of data required'.

SELECT single DOMNAME
FROM ENTCOPY02
INTO ld_entity.


"populate fields of struture and append to itab
append wa_list_of_objects to it_list_of_objects.

SELECT single TABNAME
FROM ENTCOPY02
INTO ld_tabname.

ld_value_source_entity = 'some text here'.
ld_value_target_entity = 'some text here'.

SELECT single FUNCTYPE
FROM ENTCOPY02
INTO ld_action.


SELECT single TRKORR
FROM E071K
INTO ld_order.


SELECT single TRKORR
FROM E071K
INTO ld_task.

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