SAP Tables

SALS_INFO_GET_TREE SAP Function module




SALS_INFO_GET_TREEis a standard SAP function module available within R/3 SAPsystems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import/export parameters, exceptions etc as well as any documentation contributions specific to the object. See here to view full function module documentation and code listing, simply by entering the name SALS_INFO_GET_TREE into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM SALS_INFO_GET_TREE - SALS INFO GET TREE
Associated Function Group: SALS
Released Date: Not Released
CALL FUNCTION 'SALS_INFO_GET_TREE' "
* EXPORTING
*   tid =                       " alglobtid
*   sysid = SY-SYSID            " sy-sysid
*   mc_name =                   " almttre40b-mtmcname
*   mo_name =                   " almttre40b-objectname
*   ma_name =                   " almttre40b-mtnameshrt
* TABLES
*   out_treeinfo =              " almttre40b
*   perftyperc =                " alperftype
*   smestyperc =                " alsmsgrawt
*   link_txt_attr_rc =          " altxtlnkat
  EXCEPTIONS
    C_CALL_FAILED = 1           "
    INVALID_TID = 2             "
    UNKNOWN_MC = 3              "
    UNKNOWN_MO = 4              "
    UNKNOWN_MA = 5              "
    .  "  SALS_INFO_GET_TREE

ABAP code example for Function Module SALS_INFO_GET_TREE

The ABAP code below is a full code listing to execute function module SALS_INFO_GET_TREE including all data declarations. The code uses the latest in-line data declaration syntax but I have included an abap code snipet 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_out_treeinfo   TYPE STANDARD TABLE OF ALMTTRE40B,"tables param
wa_out_treeinfo LIKE LINE OF it_out_treeinfo  ,
it_perftyperc   TYPE STANDARD TABLE OF ALPERFTYPE,"tables param
wa_perftyperc LIKE LINE OF it_perftyperc  ,
it_smestyperc   TYPE STANDARD TABLE OF ALSMSGRAWT,"tables param
wa_smestyperc LIKE LINE OF it_smestyperc  ,
it_link_txt_attr_rc   TYPE STANDARD TABLE OF ALTXTLNKAT,"tables param
wa_link_txt_attr_rc LIKE LINE OF it_link_txt_attr_rc  .

DATA(ld_tid) = 'Check type of data required'.
DATA(ld_sysid) = 'some text here'.

DATA(ld_mc_name). = 'some text here'

DATA(ld_mo_name). = 'some text here'

DATA(ld_ma_name). = 'some text here'

"populate fields of struture and append to itab
append wa_out_treeinfo to it_out_treeinfo.

"populate fields of struture and append to itab
append wa_perftyperc to it_perftyperc.

"populate fields of struture and append to itab
append wa_smestyperc to it_smestyperc.

"populate fields of struture and append to itab
append wa_link_txt_attr_rc to it_link_txt_attr_rc.. CALL FUNCTION 'SALS_INFO_GET_TREE' * EXPORTING * tid = ld_tid * sysid = ld_sysid * mc_name = ld_mc_name * mo_name = ld_mo_name * ma_name = ld_ma_name * TABLES * out_treeinfo = it_out_treeinfo * perftyperc = it_perftyperc * smestyperc = it_smestyperc * link_txt_attr_rc = it_link_txt_attr_rc EXCEPTIONS C_CALL_FAILED = 1 INVALID_TID = 2 UNKNOWN_MC = 3 UNKNOWN_MO = 4 UNKNOWN_MA = 5 . " SALS_INFO_GET_TREE
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 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_tid TYPE ALGLOBTID ,
it_out_treeinfo TYPE STANDARD TABLE OF ALMTTRE40B ,
wa_out_treeinfo LIKE LINE OF it_out_treeinfo,
ld_sysid TYPE SY-SYSID ,
it_perftyperc TYPE STANDARD TABLE OF ALPERFTYPE ,
wa_perftyperc LIKE LINE OF it_perftyperc,
ld_mc_name TYPE ALMTTRE40B-MTMCNAME ,
it_smestyperc TYPE STANDARD TABLE OF ALSMSGRAWT ,
wa_smestyperc LIKE LINE OF it_smestyperc,
ld_mo_name TYPE ALMTTRE40B-OBJECTNAME ,
it_link_txt_attr_rc TYPE STANDARD TABLE OF ALTXTLNKAT ,
wa_link_txt_attr_rc LIKE LINE OF it_link_txt_attr_rc,
ld_ma_name TYPE ALMTTRE40B-MTNAMESHRT .

ld_tid = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_out_treeinfo to it_out_treeinfo.
ld_sysid = 'some text here'.

"populate fields of struture and append to itab
append wa_perftyperc to it_perftyperc.

DATA(ld_mc_name). = 'some text here'

"populate fields of struture and append to itab
append wa_smestyperc to it_smestyperc.

DATA(ld_mo_name). = 'some text here'

"populate fields of struture and append to itab
append wa_link_txt_attr_rc to it_link_txt_attr_rc.

DATA(ld_ma_name). = 'some text here'.