cancel
Showing results for 
Search instead for 
Did you mean: 

Window (if_wd_window_manager->create_window_for_cmp_usage) does not works

former_member425121
Participant
0 Kudos

Hi experts

I need some help, i'm going to try to explain :

I have a WebdynproAbap A wich calls other WDA B

A calls B in this way:

DATA lo_api_component TYPE REF TO if_wd_component.

DATA lo_window_manager TYPE REF TO if_wd_window_manager.

DATA lo_window TYPE REF TO if_wd_window.

lo_api_component = wd_comp_controller->wd_get_api( ).

lo_window_manager = lo_api_component->get_window_manager( ).

lo_window = lo_window_manager->create_window_for_cmp_usage(

interface_view_name = 'WIN_B'

component_usage_name = 'COMP_B'

title = 'B'

close_in_any_case = abap_true

message_display_mode = if_wd_window=>co_msg_display_mode_selected ).

lo_window->open( ).

lo_window->set_window_size( width = '100%' height = '200px' ).

When i go to program A and i call B (with button) , it works ok just the first time, but if i close B window (then it returns to A) and i call again B , it does not works , B program open just a small window with only the SelectionScreen area without the table detail area wich does not appears.

A calls others programs (C, D) just in same way (all these are reports) , and the other called programs works ok when these are called one or more times, just B programm does not works for 2,3... and more calls.

The difference between the called programs C, D and B are :

C and D programs uses a program S for data selection area , and the resulting table is created directly in programs .

B program uses the same program S for data selection area but the resulting table is created using the ALV component SALV_WD_TABLE.

I check and the problem when A calls B the second time is:

CL_WDR_CLIENT_COMPONENT:if_wd_window_manager~create_window_for_cmp_usage

CL_WDR_CLIENT_COMPONENT:create_internal_window

CL_WDR_COMPONENT: get_component_usage

read table me->component_usages[] <-- the first time program B does not exists in this table, it works ok

but the second time program B already exists in this table and it does not works.

I do not find some method for reset the COMPONENT_SAGES table for make the call to B program works ok all the time

I try using ' lo_window->set_remove_on_close( remove_on_close = abap_true ) ' but it's the same, does somebody knows how can i do this ?

Please help, any orientation will be useful. Excuse me for the long thread.

Regards

Frank

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Frank,

When the button is pressed , try to create the component B every time . So it is like (check if there is a active component for B, destroy/delete it and create once again and create the window.

former_member425121
Participant
0 Kudos

Hi Baskaran

I did something like this:

if lo_c_usage_B->has_active_component( ) eq abap_true.

lo_c_usage_B->delete_component( ).

endif.

lo_c_usage_B->create_component( ).

And it works, thanks a lot.

Regads

Frank

Answers (0)