SAP Function Modules

KPEP_WL_COMP_DO SAP Function module







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

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


Pattern for FM KPEP_WL_COMP_DO - KPEP WL COMP DO





CALL FUNCTION 'KPEP_WL_COMP_DO' "
  EXPORTING
    ls_layout =                 " reconstx_layout
  TABLES
    it_objinfo_1 =              " kpep_wl_objinfo
    it_hier_1 =                 " reconstx_hierarchy
    it_objinfo_2 =              " kpep_wl_objinfo
    it_hier_2 =                 " reconstx_hierarchy
    it_objlayout =              " reconstx_fieldobj
    it_version_data =           " reconstx_infoobject
  EXCEPTIONS
    ERROR_OCCURRED = 1          "
    .  "  KPEP_WL_COMP_DO

ABAP code example for Function Module KPEP_WL_COMP_DO





The ABAP code below is a full code listing to execute function module KPEP_WL_COMP_DO 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:
it_it_objinfo_1  TYPE STANDARD TABLE OF KPEP_WL_OBJINFO,"TABLES PARAM
wa_it_objinfo_1  LIKE LINE OF it_it_objinfo_1 ,
it_it_hier_1  TYPE STANDARD TABLE OF RECONSTX_HIERARCHY,"TABLES PARAM
wa_it_hier_1  LIKE LINE OF it_it_hier_1 ,
it_it_objinfo_2  TYPE STANDARD TABLE OF KPEP_WL_OBJINFO,"TABLES PARAM
wa_it_objinfo_2  LIKE LINE OF it_it_objinfo_2 ,
it_it_hier_2  TYPE STANDARD TABLE OF RECONSTX_HIERARCHY,"TABLES PARAM
wa_it_hier_2  LIKE LINE OF it_it_hier_2 ,
it_it_objlayout  TYPE STANDARD TABLE OF RECONSTX_FIELDOBJ,"TABLES PARAM
wa_it_objlayout  LIKE LINE OF it_it_objlayout ,
it_it_version_data  TYPE STANDARD TABLE OF RECONSTX_INFOOBJECT,"TABLES PARAM
wa_it_version_data  LIKE LINE OF it_it_version_data .

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

"populate fields of struture and append to itab
append wa_it_objinfo_1 to it_it_objinfo_1.

"populate fields of struture and append to itab
append wa_it_hier_1 to it_it_hier_1.

"populate fields of struture and append to itab
append wa_it_objinfo_2 to it_it_objinfo_2.

"populate fields of struture and append to itab
append wa_it_hier_2 to it_it_hier_2.

"populate fields of struture and append to itab
append wa_it_objlayout to it_it_objlayout.

"populate fields of struture and append to itab
append wa_it_version_data to it_it_version_data. . CALL FUNCTION 'KPEP_WL_COMP_DO' EXPORTING ls_layout = ld_ls_layout TABLES it_objinfo_1 = it_it_objinfo_1 it_hier_1 = it_it_hier_1 it_objinfo_2 = it_it_objinfo_2 it_hier_2 = it_it_hier_2 it_objlayout = it_it_objlayout it_version_data = it_it_version_data EXCEPTIONS ERROR_OCCURRED = 1 . " KPEP_WL_COMP_DO
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_ls_layout  TYPE RECONSTX_LAYOUT ,
it_it_objinfo_1  TYPE STANDARD TABLE OF KPEP_WL_OBJINFO ,
wa_it_objinfo_1  LIKE LINE OF it_it_objinfo_1,
it_it_hier_1  TYPE STANDARD TABLE OF RECONSTX_HIERARCHY ,
wa_it_hier_1  LIKE LINE OF it_it_hier_1,
it_it_objinfo_2  TYPE STANDARD TABLE OF KPEP_WL_OBJINFO ,
wa_it_objinfo_2  LIKE LINE OF it_it_objinfo_2,
it_it_hier_2  TYPE STANDARD TABLE OF RECONSTX_HIERARCHY ,
wa_it_hier_2  LIKE LINE OF it_it_hier_2,
it_it_objlayout  TYPE STANDARD TABLE OF RECONSTX_FIELDOBJ ,
wa_it_objlayout  LIKE LINE OF it_it_objlayout,
it_it_version_data  TYPE STANDARD TABLE OF RECONSTX_INFOOBJECT ,
wa_it_version_data  LIKE LINE OF it_it_version_data.

ld_ls_layout = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_objinfo_1 to it_it_objinfo_1.

"populate fields of struture and append to itab
append wa_it_hier_1 to it_it_hier_1.

"populate fields of struture and append to itab
append wa_it_objinfo_2 to it_it_objinfo_2.

"populate fields of struture and append to itab
append wa_it_hier_2 to it_it_hier_2.

"populate fields of struture and append to itab
append wa_it_objlayout to it_it_objlayout.

"populate fields of struture and append to itab
append wa_it_version_data to it_it_version_data.

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