Имеем набор значений, созданный в транзакции GS01.
* Importing: * iv_setname TYPE c " Set name * Exporting: * et_range TYPE TABLE " Range with values DATA: lv_setid TYPE sethier-setid, lt_set_values TYPE TABLE OF rgsb4. FIELD-SYMBOLS: <lfs_set_values> LIKE LINE OF lt_set_values, <lfs_range> TYPE any, <lfs_value> TYPE any. * Чтение набора CALL FUNCTION 'G_SET_GET_ID_FROM_NAME' EXPORTING shortname = iv_setname IMPORTING new_setid = lv_setid * set_info = * TABLES * t_sets = 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 . CHECK sy-subrc EQ 0. CALL FUNCTION 'G_SET_GET_ALL_VALUES' EXPORTING setnr = lv_setid TABLES set_values = lt_set_values EXCEPTIONS set_not_found = 1 OTHERS = 2. CHECK sy-subrc EQ 0. LOOP AT lt_set_values ASSIGNING <lfs_set_values>. INSERT INITIAL LINE INTO TABLE et_range ASSIGNING <lfs_range>. ASSIGN COMPONENT 'SIGN' OF STRUCTURE <lfs_range> TO <lfs_value>. IF sy-subrc EQ 0. <lfs_value> = 'I'. ENDIF. ASSIGN COMPONENT 'OPTION' OF STRUCTURE <lfs_range> TO <lfs_value>. IF sy-subrc EQ 0. IF <lfs_set_values>-to IS NOT INITIAL. <lfs_value> = 'BT'. ELSE. <lfs_value> = 'EQ'. ENDIF. ENDIF. ASSIGN COMPONENT 'LOW' OF STRUCTURE <lfs_range> TO <lfs_value>. IF sy-subrc EQ 0. <lfs_value> = <lfs_set_values>-from. ENDIF. ASSIGN COMPONENT 'HIGH' OF STRUCTURE <lfs_range> TO <lfs_value>. IF sy-subrc EQ 0. <lfs_value> = <lfs_set_values>-to. ENDIF. ENDLOOP.