Skip to Content
Author's profile photo Gowtham Arunachalam

Dynamic Progress Bar Creation in Web Dynpro ABAP

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

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Informative document , thanks for sharing.

      Thanks & Regards,

      JM

      Author's profile photo Rita Grace
      Rita Grace

      Thanks for the useful document Gowtham 🙂