on 01-17-2012 7:51 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.