Skip to end of metadata
Go to start of metadata

This article explains the usage of UI element Business Graph. Following are the steps to implement the Business graph using the WebDynpro ABAP application.

Follow the steps to create the application and usage of Business Graph UI element.

1. First create the WebDynpro Component


2. Go to the View "Main" and define the context with the name as series_cont. add four attributes attributes to the context as Title, Value1, Value2 and Value3.


3. Go the View layout and add the UI element Business graphics from the context menu using the option "Insert Element".



4.Now right click on the Business Graphic from Root UI element Container context and add the Category ( X axis )


5. Definie the Y axis for the different categories


6. Bind the Business graphic Series attribute with the view context node "series_con"


7. Bind the X and Y axis attributes with the context attributes as shows below.


8. Populate the data using the WDDOINT method

method WDDOINIT .

data: lt_series type if_main=>elements_series_con,

wa_series like line of lt_Series.

DATA lo_nd_series_con TYPE REF TO if_wd_context_node.

DATA lo_el_series_con TYPE REF TO if_wd_context_element.

DATA ls_series_con TYPE wd_this->element_series_con.

* navigate from <CONTEXT> to <SERIES_CON> via lead selection

lo_nd_series_con = wd_context->get_child_node( name = wd_this->wdctx_series_con ).

wa_series-title = 'Student1'.

wa_series-value1 = '100'.

wa_series-value2 = '98'.

wa_series-value3 = '95'.

append wa_Series to lt_Series.

wa_series-title = 'Student2'.

wa_series-value1 = '99'.

wa_series-value2 = '97'.

wa_series-value3 = '95'.

append wa_Series to lt_Series.

wa_series-title = 'Student3'.

wa_series-value1 = '98'.

wa_series-value2 = '94'.

wa_series-value3 = '99'.

append wa_Series to lt_Series.

wa_series-title = 'Student4'.

wa_series-value1 = '100'.

wa_series-value2 = '100'.

wa_series-value3 = '96'.

append wa_Series to lt_Series.

lo_nd_series_con->bind_table( new_items = lt_series set_initial_elements = abap_false ).

endmethod.

9. Active the Entire component and create a webdynpro application for the component.

10. Test the application.

  • No labels