cancel
Showing results for 
Search instead for 
Did you mean: 

From same Button how to navigate to different Views in WEBDYNPRO

Former Member
0 Kudos

Hi,

In WEBDYNPRO i am trying to generate this but not able to..i have three views in which i have a NEXT button in the 1st view and BACK button in 2nd and 3rd view.

first time click NEXT button should go to 2nd View and then BACK button with back to 1st view.

again when i click on the NEXT button it should navigate to 3rd VIEW.

program flow:

1st VIEW-(next)--->2nd VIEW-(back) ->1st view-(next)->3rd VIEW

hope i can find the solution here.

thanks in advance

ashique

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hey Ashique,

Just think about it.

1st VIEW-(next)--->2nd VIEW-(back) ->1st view-(next)->3rd VIEW

If you already have a flow in hand, you can implement it different ways:.

1. As Thomas Said, a flag has to be checked if a button event is clicked.

2. Use of two different buttons, and hiding one button at one point of time.

3. If you navigation is complex, store your navigation in a context node/global table.

You can also use the ViewContainer UI Element and play with visibility. On a similar requirement, where i had to display 6 dynamic reports on screen, i had to use VCUIElement, to achieve this, i created a context node which will store attributes like display, visibility, texts etc., your requirement should be simple though.

Regards,

Santosh Verma.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

It seems like you need to keep an attribute in your component controller so that once you have navigated to view #2, you can set a flag in this atttribute. Then when the button event fires for next in View #1, you check the status of this flag. Depending upon the value of this attribute you fire one of the two navigation plugs - either for View #2 or View #3.

Former Member
0 Kudos

hi,

thnx for reply, actully i had an idea of counter and flags but not able to implement it properly.so if u can explain in details it will be helpfull to me.

ashique

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

hi,

> thnx for reply, actully i had an idea of counter and flags but not able to implement it properly.so if u can explain in details it will be helpfull to me.

>

> ashique

What exactly are you having problems with? What I described is pretty straight forward. Basically an IF check on a variable that controls which navigation plug you fire. You would place this code in the event handler of your button in View 1.

IF wd_comp_controller->lv_view2 = abap_true.
  wd_this->fire_goto3( ).
ELSE
  wd_this->fire_goto2( ).
ENDIF.

Former Member
0 Kudos

IF wd_comp_controller->lv_view2 = abap_true.

wd_this->fire_goto3( ).

ELSE

wd_this->fire_goto2( ).

ENDIF.

in view 1 i m not able to call both the outbound plug i.e. wd_this->fire_goto2( ). & wd_this->fire_goto3( ).

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>in view 1 i m not able to call both the outbound plug i.e. wd_this->fire_goto2( ). & wd_this->fire_goto3( ).

Why not? I see no reason why you wouldn't be able to according to the design you describe.