Skip to Content

Create an easy Chart with FPM_CHART_UIBB

According to this blog ** TEAM FPM ** – A new Chart UIBB is easy to create an application with a Chart.

Create a FPM Application

Create an empty FPM Application with transaction FPM_WB.

Create the feeder class

Create a feeder class like this.


CLASS zcl_fdr_chart DEFINITION
  PUBLIC
  FINAL
  CREATE PUBLIC .
  PUBLIC SECTION.
    INTERFACES if_fpm_guibb_chart.
    TYPES: BEGIN OF ty_chart_data,
             kind  TYPE string,
             value TYPE i,
           END OF ty_chart_data.
  PROTECTED SECTION.
  PRIVATE SECTION.
ENDCLASS.
CLASS zcl_fdr_chart IMPLEMENTATION.
  METHOD if_fpm_guibb_chart~flush.
  ENDMETHOD.
  METHOD if_fpm_guibb_chart~process_event.
  ENDMETHOD.
  METHOD if_fpm_guibb_chart~get_data.
    DATA lt_chart_data TYPE STANDARD TABLE OF ty_chart_data.
    DATA(lo_table_model_chip) = io_chart_data->get_table_model( ).
    lt_chart_data = VALUE #(
                      ( kind = 'kind_one'       value = 12 )
                      ( kind = 'kind_two'       value = 16  )
                      ( kind = 'kind_three'     value = 9  )
                      ).
    lo_table_model_chip->set_data(
                EXPORTING
                  it_data          = lt_chart_data
*            iv_check_changed =
              ).
  ENDMETHOD.
  METHOD if_fpm_guibb_chart~get_definition.
    DATA lt_chart_data TYPE STANDARD TABLE OF ty_chart_data.
    io_chart_model->get_table_model( )->set_definition(
       io_field_catalog  =  CAST #( cl_abap_typedescr=>describe_by_data( lt_chart_data ) ) ).
  ENDMETHOD.
  METHOD if_fpm_guibb_chart~get_default_config.
  ENDMETHOD.
  METHOD if_fpm_guibb_chart~check_config.
  ENDMETHOD.
  METHOD if_fpm_guibb~initialize.
  ENDMETHOD.
  METHOD if_fpm_guibb~get_parameter_list.
  ENDMETHOD.
ENDCLASS.



Create a CHART GUIBB

Now create the Chart GUIBB.

Result

After this short steps the Chart will be shown.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.