Skip to Content

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’


Untitled.png

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.

Untitled1.png

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.

Untitled2.png

– Gowtham

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply