1 1 1 1 1 Rating 0% (0 Votes)
We got all needed functions, so I'll give you an example how to call the methods correctly to get characteristics update window like this:
 
Program bellow is reading firstly the info about stored values in given characteristic and then throws an update screen. After exiting from the screen it's saving data to database.
 

program  zab_classifications_popup.
*--------------------------------------------------------------------*
* This program was prepared by Łukasz Pęgiel for presentation purpose
* at http://abapblog.com .
* You can use it in your SAP instance without any warranty
* for non-commercial and commercial  use but you cannot sell it as
* a full program or a part of it.
*
* If you'd like to use it on your own site please contact me before to
* get the agreement before.
*
*--------------------------------------------------------------------*
databegin of fs_class ,
        object type objnum,
        class type klasse_d,
        klart type klassenart,
        data type ref to data,
      end of fs_class.

select-optionss_object for fs_class-object no intervals .
parametersp_class type klah-class obligatory .
parametersp_clty type klah-klart obligatory .
parametersp_atnam type api_value-atnam obligatory .
parametersp_table type tcla-obtab.


loop at s_object.

  fs_class-object s_object-low.
  fs_class-class  p_class.
  fs_class-klart  p_clty.

  zcl_abapblog_com_classific=>get_object_details(
    exporting
      i_object           fs_class-object
      i_class            
fs_class-class
      i_classtype        fs_class-klart
*    i_objecttable      = i_objecttable
*    i_key_date         = SY-DATUM
*    i_structure        = i_structure
  importing
*    et_objvaluesnum    = et_objvaluesnum
*    et_objvalueschar   = et_objvalueschar
*    et_objvaluescurr   = et_objvaluescurr
    e_data             fs_class-data
  exceptions
    fetch_values_error 1
    structure_error    2
    others             3
         ).
  if sy-subrc eq 0.

    zcl_abapblog_com_classific=>show_charact_values_screen(
      exporting
        i_display                 space
        i_class                   
fs_class-class
        i_klart                   fs_class-klart
        i_atnam                   
p_atnam
*    it_values                 = it_values
        i_set_val_from_object     space
        i_object                  
fs_class-object
        i_table                   
p_table
*    i_date                    = SY-DATUM
*    i_structure               = i_structure
*  importing
*    et_values                 = et_values
      changing
        c_data        fs_class-data
      exceptions
        characteristic_unknown    1
        error_setting_char_values 2
        no_values_found           3
        error_creating_table      4
        others                    5
           ).
    if sy-subrc eq 0.
      zcl_abapblog_com_classific=>save_charact_from_ref_data(
      exporting
      i_data          fs_class-data
*    i_change_number = i_change_number
      exceptions
        no_data         1
        others          2
        ).
      if sy-subrc <> 0.
* Implement suitable error handling here
      endif.
    endif.
  endif.



endloop.

Enjoy!