Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module to fetch data from table SETLEAVES

Former Member
0 Likes
2,513

Hi All,

We have a requirement to fetch the data from table SETLEAVES based on the setclass,subclass and group. As the table holds hierarchical data, Please let me know a FM which fetches all the hierarchical data from the table SETLEAVES.

Regards

Shiva

5 REPLIES 5
Read only

Former Member
0 Likes
1,259

Hi,

Sorry the table name is SETLEAF

Read only

Former Member
0 Likes
1,259

I think FM K_HIERARCHY_TABLES_READ.

rob

Read only

0 Likes
1,259

Hi,

Could you let me know the data to be passed.

I have the following data:

Group

Setclass

Subclass as input.

No other fields are avaible for me

Regards

Shiva

Read only

0 Likes
1,259

Try:

    exporting
      e_class                     = '0102'
      e_setid                     = setid
      e_kokrs                     = my_kokrs
      e_mandt                     = sy-mandt
      e_master_data               = 'XXX'
      e_structure                 = 'X  X0200'
      e_replace_class             = space
      e_replace_unit              = space
      e_suffix                    = space
      e_old_line_level            = 1  "l_ol_level
    tables
      t_nodes                     = it_ceg_nodes
      t_values                    = it_ceg_values
    changing
      c_info                      = c_info
      c_overwrite                 = c_overwrite
    exceptions
      no_controlling_area         = 1
      no_chart_of_account         = 2
      different_controlling_areas = 3
      different_chart_of_accounts = 4
      set_not_found               = 5
      illegal_field_replacement   = 6
      illegal_table_replacement   = 7
      fm_raise                    = 8
      convert_error               = 9
      no_overwrite_standard_hier  = 10
      no_bukrs_for_kokrs          = 11
      others                      = 12.

Rob

Read only

Former Member
0 Likes
1,259

Hi

use the fun module

<b>G_SET_TREE_IMPORT</b>

pass the class and subclass to set id correctly depending on PC's or CC's or CE's

concatenate the Class, Subclass and Cost center(CE or PC )Group together and pass to SETID.

or use the tables SETNODE and SETLEAF in the recursive select statement

Regards

Anji

Message was edited by:

Anji Reddy Vangala

Message was edited by:

Anji Reddy Vangala