Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Gowtham
Contributor

This document will help you to understand the concept of Dynamic Progress Bar in Web Dynpro ABAP.


Create Web Dynpro Component and create a node with the cardinality of 1.1 and add an attribute with the type of ‘I’


In the View Create two UI elements Timed trigger and Progress indicator and create an action for timed trigger and set the delay how much ever you want here I am setting as 1 and bind the same attribute(here BAR) in progress bar's Display and percent Value.

The event that we are declaring here will get called once the delay time is reached.

Code in the trigger event:


METHOD onactiontrigger .

  DATA lo_nd_progress TYPE REF TO if_wd_context_node.

  DATA lo_el_progress  TYPE REF TO if_wd_context_element.

  DATA ls_progress      TYPE        wd_this->element_progress.

  DATA lv_timer           TYPE        wd_this->element_progress-bar.

  lo_nd_progress = wd_context->get_child_node( name = wd_this->wdctx_progress ).

  lo_el_progress = lo_nd_progress->get_element( ).

lo_el_progress->get_attribute(

  EXPORTING

    name =  `BAR`

  IMPORTING

    value = lv_timer ).

  lv_timer = lv_timer + 3. "Incrementing the value after each delay set as 1.

  lo_nd_progress = wd_context->get_child_node( name = wd_this->wdctx_progress ).

  lo_el_progress = lo_nd_progress->get_element( ).

lo_el_progress->set_attribute(

  name =  `BAR`

  value = lv_timer ).

  IF lv_timer = 100.

       wd_this->fire_to_next_plg( ).

  ENDIF.

ENDMETHOD.


Create an application and activate the whole component.

- Gowtham

2 Comments
Labels in this area