cancel
Showing results for 
Search instead for 
Did you mean: 

calling other view from the popup of other view-problem in Navigation

Former Member
0 Kudos

Hi All,

I have a problem in navigation.

In the view upon button click I'm showing a Popup for Component Usage which has a button 'OK'.

In the OK button I'm validating some data and if there are errors Im showing them on the Popup otherwise I'm firing a plug of other view.

Eventhough there are no errors, the control is still on popup for first time. When I click the 'OK' for the second time, It is showing this error.. 'Error while navigation'.

Eventhough there is no error, 1st time it's calling the HANDLER method of the other view and 2nd time

it is giving this error.

Please find the snapshot of the error.

Controller for View, Window, Interface, and Configuration Cannot Be Created
                                                                                What happened?                                                                                
The exception 'CX_WDR_RT_EXCEPTION' was raised, but it was not caught anywhere                
     along                                                                                
the call hierarchy.                                                                                
Since exceptions represent error situations and this error was not                            
    adequately responded to, the running ABAP program                                             
     'CL_WDR_CLIENT_APPLICATION=====CP' has to be                                                 
    terminated.                                                                                
* SOURCE VIEW IS 'NORMAL' VIEW                                                      
    when if_wdr_rr_view=>co_view.                                                   
      l_component = source->component->component_info->definition-component_name.   
      if source->view_usage_info is not bound.                                      
        raise exception type cx_wdr_rt_exception                                    
              exporting                                                             
                textid = cx_wdr_rt_exception=>view_not_visible                      
                msgv1  = source->name                                               
                msgv2  = l_component.

How can we avoid this error or is there any other way for proper navigation.

Regards,

Lekha.

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi Lekha

is the Second View is in the popup window? and navigation link is defined ?

in the validation, if there are any errors how u r populating.. through Message Manager ?

Abhi

Former Member
0 Kudos

Hi Abhi,

The 2nd view is a normal view of the same component.

If there are errors I'm displaying them using the REPORT_ERROR_MESSAGE otherwise I'm firing the plug.

Here eventhough there are are no errors the plgu id called 1st time and displaying the same popup. If I click the button on popup again then it's throwing the error.

I tried with the 2 buttons on Popup and still the same error and I tried with a button on ALV also stil it is giving me the same error.

Im paassing a string parameter to this plug. Eventhat value is passed perfectly.

Navigation link is working fine.

Any workaround for this.

Regards,

Lekha

abhimanyu_lagishetti7
Active Contributor
0 Kudos

> The 2nd view is a normal view of the same component.

>

I understand 2nd view is part of the component, is it placed in the window( which is shown as popup ) & navigation link created ?

Former Member
0 Kudos

Hi Abhi,

Only one window is there in the component. But this Popup is a component usage one.

Upon clicking on some link I'm calling this popup and making navigation to other view.

I didnt embed this component usage popup in the window of the component as that is not requried.

The 2nd view is a differnet view entirely. This 2nd view is embeded in the window.

Regards,

Lekha.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

try to handle the OK button cick in the Main component and if there are no errors navigate to 2nd View else open the same window popup.

I am not sure of using navigation plugs when popups are used.

Abhi

Former Member
0 Kudos

Hi Abhi,

You mean to say that I need to code those handling of plugs in the main view then proceed further to next view. I applied the same approach because thee user needs to be shown the same Main view again.

But the problem is that I dont want the user to be shown the MAIN view again if there are no errors, directly from the Popup I wanted to navigate.

Is this not possible.

Or Do I need to use another view and embed this ALV inside that view with a button which inturn is inside another window. So that I need to show this Window as a Modal Popup. then this would ba a window to window navigation right.

Or any other workaround.

Regards,

Lekha.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

>But the problem is that I dont want the user to be shown the MAIN view again if there are no errors, >directly from the Popup I wanted to navigate.

No, user will not see the MAIN View again...

in the OK handler, Check for Errors if there are again Open the same Window Popup Instance.

here user will not see the Main View...

If tehre are no errors then in the OK handler navigate to View2.

Though the Main View Event Handler gets execute on OK user will not see that..

Former Member
0 Kudos

Hi,

But internally everytime the plug of the MAIN view is called from where the popup button is clicked. Eventhough the user is not shown the MAIN view.

No Navigation to 2nd view is made from the Popup.

Regards,

Lekha.

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Popup is window is just a popup you simply Close it to show the main view from where it is called, no need to call navigation.

your popup window is of type IF_WD_WINDOW..

you can use lr_window->close( ). to close a window

Abhi

Former Member
0 Kudos

Hi Abhi,

I will get back to you once I try to handle the navigation from the MAIN view and not from the popup.

Thanks Much.

Regards,

Lekha.

Former Member
0 Kudos

Hi Abhi,

The issue is stil not resolved.

As per my requirement - I have 2 views.

One some condition I'm calling 1st popup with YESNO buttons. Up on this 'NO' handler of 1st popup, I need to call the 2nd Popup with 'OK' button based on some condition which inturn triggers another view as mentioned in earlier posts on same.

Is this causing the problem..As per my analysis the handler method of MAIN view is called for 1st time when cliked on 2nd time on OK it was throwing that error.

From a MAIN view, 1st popup is called successfully only in this case for 2nd popup which is dependent on 1st popup might be causing problem.

Any views on this.

Thomas: Can you raise your views on this.

Regards,

Lekha.

Former Member
0 Kudos

Hi Abhi,

Thanks Much for your help.

I resolved the issue.

I did this way , In then 2nd popup close method I had to close the 1st popup window then navigate the

next view.

Earlier I was not handling the close window of the 1st popup rather I was directly navigating to the next view where it was thrwoing the error.

Regards,

Lekha.