SAP Function Modules

EW_NAV_VIEW_GET_TREE SAP Function module







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

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


Pattern for FM EW_NAV_VIEW_GET_TREE - EW NAV VIEW GET TREE





CALL FUNCTION 'EW_NAV_VIEW_GET_TREE' "
  EXPORTING
    iv_profile =                " ewcustenv_profile
    iv_partner =                " bu_partner
  IMPORTING
    es_tree_attr =              " ewnavview_tree_attr
    es_hier_header =            " ewnavview_tree_hhdr
  TABLES
*   it_add_sels =               " ecrm_cic_op_cluster_sel
    et_columns =                " ewnavview_col_attr
    et_node_add =               " treev_node
    et_item_add =               " ccm_mtreeitm
    et_node_exp =               " ewnavview_node_key
  EXCEPTIONS
    ILLEGAL_PROFILE = 1         "
    .  "  EW_NAV_VIEW_GET_TREE

ABAP code example for Function Module EW_NAV_VIEW_GET_TREE





The ABAP code below is a full code listing to execute function module EW_NAV_VIEW_GET_TREE 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_es_tree_attr  TYPE EWNAVVIEW_TREE_ATTR ,
ld_es_hier_header  TYPE EWNAVVIEW_TREE_HHDR ,
it_it_add_sels  TYPE STANDARD TABLE OF ECRM_CIC_OP_CLUSTER_SEL,"TABLES PARAM
wa_it_add_sels  LIKE LINE OF it_it_add_sels ,
it_et_columns  TYPE STANDARD TABLE OF EWNAVVIEW_COL_ATTR,"TABLES PARAM
wa_et_columns  LIKE LINE OF it_et_columns ,
it_et_node_add  TYPE STANDARD TABLE OF TREEV_NODE,"TABLES PARAM
wa_et_node_add  LIKE LINE OF it_et_node_add ,
it_et_item_add  TYPE STANDARD TABLE OF CCM_MTREEITM,"TABLES PARAM
wa_et_item_add  LIKE LINE OF it_et_item_add ,
it_et_node_exp  TYPE STANDARD TABLE OF EWNAVVIEW_NODE_KEY,"TABLES PARAM
wa_et_node_exp  LIKE LINE OF it_et_node_exp .

DATA(ld_iv_profile) = 'Check type of data required'.
DATA(ld_iv_partner) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_add_sels to it_it_add_sels.

"populate fields of struture and append to itab
append wa_et_columns to it_et_columns.

"populate fields of struture and append to itab
append wa_et_node_add to it_et_node_add.

"populate fields of struture and append to itab
append wa_et_item_add to it_et_item_add.

"populate fields of struture and append to itab
append wa_et_node_exp to it_et_node_exp. . CALL FUNCTION 'EW_NAV_VIEW_GET_TREE' EXPORTING iv_profile = ld_iv_profile iv_partner = ld_iv_partner IMPORTING es_tree_attr = ld_es_tree_attr es_hier_header = ld_es_hier_header TABLES * it_add_sels = it_it_add_sels et_columns = it_et_columns et_node_add = it_et_node_add et_item_add = it_et_item_add et_node_exp = it_et_node_exp EXCEPTIONS ILLEGAL_PROFILE = 1 . " EW_NAV_VIEW_GET_TREE
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_es_tree_attr  TYPE EWNAVVIEW_TREE_ATTR ,
ld_iv_profile  TYPE EWCUSTENV_PROFILE ,
it_it_add_sels  TYPE STANDARD TABLE OF ECRM_CIC_OP_CLUSTER_SEL ,
wa_it_add_sels  LIKE LINE OF it_it_add_sels,
ld_es_hier_header  TYPE EWNAVVIEW_TREE_HHDR ,
ld_iv_partner  TYPE BU_PARTNER ,
it_et_columns  TYPE STANDARD TABLE OF EWNAVVIEW_COL_ATTR ,
wa_et_columns  LIKE LINE OF it_et_columns,
it_et_node_add  TYPE STANDARD TABLE OF TREEV_NODE ,
wa_et_node_add  LIKE LINE OF it_et_node_add,
it_et_item_add  TYPE STANDARD TABLE OF CCM_MTREEITM ,
wa_et_item_add  LIKE LINE OF it_et_item_add,
it_et_node_exp  TYPE STANDARD TABLE OF EWNAVVIEW_NODE_KEY ,
wa_et_node_exp  LIKE LINE OF it_et_node_exp.

ld_iv_profile = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_it_add_sels to it_it_add_sels.
ld_iv_partner = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_et_columns to it_et_columns.

"populate fields of struture and append to itab
append wa_et_node_add to it_et_node_add.

"populate fields of struture and append to itab
append wa_et_item_add to it_et_item_add.

"populate fields of struture and append to itab
append wa_et_node_exp to it_et_node_exp.

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