on 11-17-2011 9:29 AM
Hi,
I am developing a webdynpro application.am creating pop-up window for that when am trying to declare a attribute called WD_COMP_Controller type ig_componentcontroller for a view, It s throwing an error like "Field Wd_comp_controller is unknown". its neither in one of the specified tables nor defined by a data statement."
In this line *lo_api_component = wd_comp_controller->wd_get_api( )*. am getting syntax error
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
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(
window_name = 'MAIN'
title =
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
).
lo_window->open( ).
please help me out.
Thanks and Regards.
Vijay
Hi,
From where are you trying to create the popup?
wd_comp_controller is an attribute that exits in the views or in windows... This attribute refers to the component controller of your WebDynpro.
If you are trying to create it directly from the component controller you must to use wd_this.
But, better use the code wizard to generate the code in order to create a popup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Refer steps mentioned in http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynproapplicationtodisplayaPop-upwindowonthebrowser
Thanks,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
wd_comp_controller will be default and check in your view with properties tab
Try The following code.for popup
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
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(
window_name = 'xxxx' "-->window name
title =
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
).
lo_window->open( ).
Hope it helps.
Regards,
Basuvaraj.P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone,
By mistake i have deleted that component.
In VIEW attributes tab i want to add it again.
1.I tried to declare it but its showing an error wd_comp_controller should not start with wd is not defined.
2. I tried to define implicitly in a method also , its giving an error like getapi is private or public...
so please guide me in this process.
Thanks and regards,
Vijay Vikram
Hi Vijay
The code written to open a pop up is right.
wd_comp_controller is a DEFAULT reference to the COMPONENT CONTROLLER which will be declared by default in the attributes tab of every View. If you are not already having this attribute then check in properties tab of the view if the component is added to this view and add if not added under component usage.
If the current component is added then there will be a default reference to the compcontroller in the view and there is no need to explicitly declare/create an attribute.
Thanks & Regards,
Gayathri Shanbhag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check with attributes it is already declared and why you going to declare it .check with attributes tab.
Regards,
Basuvaraj.P
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.