cancel
Showing results for 
Search instead for 
Did you mean: 

how to create a roadmap ui element dynamically in webdynpro abap?

0 Kudos

Dear team

iam new for webdynpro my question is how to create the road map programme dynamically using webdynpro

could you tell me what are the steps i have to take, what are the elements i have to bind?

and what code & where i have to write the code?

regards

sathya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sathya,

Write the follwing code in WDDOMODIFYVIEW method to create a Dynamic ROADMAP and also create an attribute of

type string to control the selection of steps in road map.


method WDDOMODIFYVIEW .

  data : lr_ele type ref to if_wd_view_element.
  data : lr_rm type ref to cl_wd_road_map.
  data : lr_step type ref to cl_wd_road_map_step.
  data: lr_container type ref to cl_wd_transparent_container.
  data : lr_flowdata type ref to cl_wd_flow_data.

  CALL METHOD view->get_root_element
    receiving
      root_view_element = lr_ele.

  lr_container ?= lr_ele.


 CALL METHOD cl_wd_road_map=>new_road_map
  EXPORTING
    id                       = 'ROADMAP'
  receiving
    control                  = lr_rm.

CALL METHOD lr_rm->bind_selected_step
  EXPORTING
    path   = 'VALUE'.

CALL METHOD cl_wd_flow_data=>new_flow_data
  EXPORTING
    element     = lr_rm
  receiving
    control     = lr_flowdata.


CALL METHOD lr_container->add_child
  EXPORTING
    index     = 1
    the_child = lr_rm.

CALL METHOD cl_wd_road_map_step=>new_road_map_step
  EXPORTING
    id                  = 'ONE'
    name                = '1'
  receiving
    control             = lr_step.


CALL METHOD lr_rm->add_step
  EXPORTING
    index    = 1
    the_step = lr_step.

CALL METHOD cl_wd_road_map_step=>new_road_map_step
  EXPORTING
    id                  = 'TWO'
    name                = '2'
  receiving
    control             = lr_step.

CALL METHOD lr_rm->add_step
  EXPORTING
    index    = 2
    the_step = lr_step.

CALL METHOD cl_wd_road_map_step=>new_road_map_step
  EXPORTING
    id                  = 'THREE'
    name                = '3'
  receiving
    control             = lr_step.

CALL METHOD lr_rm->add_step
  EXPORTING
    index    = 3
    the_step = lr_step.
endmethod.
               

Then you can use the context attribute to navigate between the steps and do respective actions.

0 Kudos

hi

harshid

thank you for valuble answer but i have the doubt regarding for this i.e where i have to create the node roadmap and i'l take the attribute type string?

pls answer the steps of that?

thank you

rgs

sathya

Former Member
0 Kudos

Hi sathya,

Create an attribute in your view context.

Goto CONTEXT tab in the view and Right click on context and create an attribute with name VALUE of type STRING.

The above code is to be used directly in wddomodify method of the view. This code is used to generate a

ROADMAP dynamically by coding.

If you want to create roadmap element normally in View Layout then follow the link:

http://www.saptechnical.com/Tutorials/WebDynproABAP/Roadmap/Page2.htm

0 Kudos

Dear team

thank you for providing the solution for my problem, can i know how to create the action elements dynamically?

Former Member
0 Kudos

Hi sathya,

Which action elements are you talking about??

Actions under roadmap or elements like Buttons?

0 Kudos

Dear team

actions means like buttons for the which step we have to be selected.i.e

user wants to which step have to selected that step only be highlated and display tthe perticular content,

automatically the remaining steps are to be not highlated (disabled).

regards

sathya

Former Member
0 Kudos

Hi Sathya,

You can get the selected step in the roadmap by giving ONSELECT action under roadmap properties and give the

following code into that method.


call method wdevent->get_string
  exporting
    name   = 'STEP'
  receiving
    value  = lv_value.

Lv_value contains the selected step and accordingly you can show your respective values.

Answers (0)