cancel
Showing results for 
Search instead for 
Did you mean: 

Create and display roadmap steps dynamically

siongchao_ng
Contributor
0 Kudos

Hi all,

Can anyone shows a quick guide how I can create and display roadmap steps dynamically? Thanks alot .

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

dear team

can i write the action method for the above roadmap programme dynamically?

if it is possible how can i write the code?

regards

sathya

siongchao_ng
Contributor
0 Kudos

The roadmap can be created and displayed dynamically. Steps and sub steps can be added. assign action cannot be implemented

Former Member
0 Kudos

HI Siong Chao ,

the runtime class for Road map is CL_WD_ROAD_MAP

you can creat a new road map dynamically method new_road_map_step

CALL METHOD cl_wd_road_map_step=>new_road_map_step
      EXPORTING
*        bind_enabled        = lv_bind_enabled
        description         = lv_descr
        enabled             = lv_enabled
        id                  = lv_id
        name                = lv_number_str
*          TEXT_DIRECTION      = E_TEXT_DIRECTION-INHERIT
*          TOOLTIP             =
*          TYPE                = E_TYPE-STANDARD
*          VIEW                =
*          VISIBLE             = ABAP_TRUE
      RECEIVING
        control             = lo_rm_step.

For adding steps dynamically

CALL METHOD lo_rm->add_step
      EXPORTING
        the_step = lo_rm_step.

Regards

chinnaiya P

siongchao_ng
Contributor
0 Kudos

Hi Chinniaya,

Thanks for your reply. I can create the roadmap and add the steps dynamically now. How do I create the action tied to the step? For example my roadmap have 3 steps. If I click on step 1, it should display view 1, step 2 to display view 2 and so on.

My current layout looks like this:

Roadmap

View UI Container --> I embed 3 views here.

Rgds,

Siong Chao

ChrisPaine
Active Contributor
0 Kudos

Hi Siong Chao,

sounds like you are trying to replicate the FPM GAF application...

Why not just use the FPM GAF instead - is there some reason to do this work yourself?

I can think of some reasons, but am interested in your particular use case and why it would not work with the FPM.

Cheers,

Chris

siongchao_ng
Contributor
0 Kudos

Hi there,

What is FPM GAF? I need to create the roadmap dynamically for my project reason. The requirement is to allow user to customize number of steps and sub steps and display the roadmap. I need the action for each step as well. It is to create navigation to the necessary view according to the roadmap step selected. Anyone have the codes?

ChrisPaine
Active Contributor
0 Kudos

FPM GAF - Floorplan Manager Guided Activity Floorplan

Please have a look at the [FLOORPLAN MANAGER FOR ABAP - DEVELOPER'S GUIDE|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90f3cfd2-46d0-2b10-b3ab-eabf3452cc50]

It may well do everything you need - or at least give you an API to do it more easily than coding everything yourself.

Former Member
0 Kudos

Hi Siong Chao ,

for assigning the action .. create a action with a parameter STEP type string in action tab . and pass the action name while creating the road map dynamically ..

CALL METHOD cl_wd_road_map_step=>new_road_map_step
      EXPORTING
*        bind_enabled        = lv_bind_enabled
        description         = lv_descr
        enabled             = lv_enabled
        id                  = lv_id
        name                = lv_number_str
*          TEXT_DIRECTION      = E_TEXT_DIRECTION-INHERIT
*          TOOLTIP             =
*          TYPE                = E_TYPE-STANDARD
*          VIEW                =
*          VISIBLE             = ABAP_TRUE
       ON_SELECT       =  'SELECT'     " Action name 
      RECEIVING
        control             = lo_rm_step.

write your logic for displaying the view base on the click in road map by passing the parameter STEP

sample code


   method onselect.
    DATA: l_ref_componentcontroller TYPE REF TO ig_componentcontroller.
    l_ref_componentcontroller =   wd_this->get_componentcontroller_ctr( ).
    l_ref_componentcontroller->set_step( step ).
   endmethod .
   

Regards

Chinnaiya P

siongchao_ng
Contributor
0 Kudos

HI Chinnaiya,

Thanks for your reply. You seem to used the wrong class.

The cl_wd_road_map_step do not have param on_select. I used the cl_wd_road_map instead.

The question remains on how do you add action? I created empty action "on_navigate". Inside I have import param "step" typed string.

How do I completed the add action to the step from this point? Thanks.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Instead of using the WDDOMODIFYVIEW and programtically adding roadmap steps, you should really use the MultipleRoadMapStep instead:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/79/da8b412bb5b35fe10000000a1550b0/frameset.htm

This way you bind your steps to a context node. There is one step created for each element in the context. If you want to dynamically add/remove steps you need only manipulate the context. Context based dynamic UI element manipulation is highly recommended over the used of API based manipulation in WDDOMODIFYVIEW.

Former Member
0 Kudos

Hello Siong,

I would suggest you to limit things which you do dynamicallly as it makes a difference in performance.

if you are certain that you would have a road map then atleast add the ui element and then you could dynamically add more steps to it.

Thanks

Anurag Chopra