*----- cost elements hierarchy ----------------------------------------- data: begin of ivalues occurs 0. include structure setvalues. data: end of ivalues. data: begin of itree occurs 1. include structure sethier. data: end of itree. parameters: p_kstar like sethier-setid, "Cost Element Group hp_kstar like sethier-setid no-display, p_kokrs like tka01-kokrs obligatory. "Controlling Area ************************************************************************ form select_cost_element_hierarchy. call function 'G_SET_GET_ID_FROM_NAME' exporting shortname = p_kstar tabname = 'CCSS ' kokrs = p_kokrs importing new_setid = hp_kstar exceptions no_set_found = 1 no_set_picked_from_popup = 2 wrong_class = 3 wrong_subclass = 4 table_field_not_found = 5 fields_dont_match = 6 set_is_empty = 7 formula_in_set = 8 set_is_dynamic = 9 others = 10. if sy-subrc = 0. call function 'G_SET_TREE_IMPORT' exporting setid = hp_kstar tabname = 'CCSS ' tables set_hierarchy = itree set_values = ivalues exceptions set_not_found = 1 illegal_field_replacement = 2 illegal_table_replacement = 3 others = 4. endif. endform. ************************************************************************