on 02-14-2007 11:58 AM
Hello All,
I ahve dynpro SALV_WD_TABLE which display few buttons in toolbar.
I want to add one more new button to that toolbar.
I have got sample code which says it will create a function assign it toolbar.
In that code there is reference to interface contrroller and code has to be placed in wddoinit.
I have placed below code in wddoinit of a view it but gives me error
wd_cpuse_alv is unknown or its private or protected. .
Pl can you suggest on this.
DATA lr_buttonui type REF TO CL_SALV_WD_FE_BUTTON.
DATA button1 TYPE REF TO CL_SALV_WD_FUNCTION.
data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
data: l_value type ref to cl_salv_wd_config_table.
data: lr_table_settings type ref to if_salv_wd_table_settings.
data: lr_header type ref to CL_SALV_WD_HEADER.
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage ?= wd_this->wd_cpuse_alv( ).
*l_ref_cmp_usage ?= wd_comp_controller->GET_CONTROL_VIEW_USAGE( ).
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
**
l_ref_interfacecontroller ?= wd_this->wd_cpifc_alv( ).
l_value = l_ref_interfacecontroller->get_model( ).
lr_table_settings ?= l_value.
lr_header = lr_table_settings->get_header( ).
lr_header->set_text( 'FLIGHT LIST SEARCH' ).
CREATE OBJECT lr_buttonui.
lr_buttonui->SET_TEXT( 'Search Flights' ).
button1 = l_VALUE->IF_SALV_WD_FUNCTION_SETTINGS~create_function( id = 'LBUTTON' ).
button1->SET_EDITOR( lr_buttonui ).
thanks,
Sharada
I think you would have specified the used component in your WDP component level properties. Please check if you ALV component usage is added in the Properties tab of your view also. This error occurs if it is not added.
Check this and let me know if your error is solved.
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hI,
I am facing this issue. I have added the ALV component in the properties tab of the view also. But still i am getting this syntax error. Can anyone please advise?
The ALV table i have just created in not editable. i want to make it editable. So i am trying to add the below code which is failing.
create an instance of ALV component
DATA:
lr_salv_wd_table_usage TYPE REF TO if_wd_component_usage.
lr_salv_wd_table_usage = wd_this->wd_cpuse_alv( ).
IF lr_salv_wd_table_usage->has_active_component( ) IS INITIAL.
lr_salv_wd_table_usage->create_component( ).
ENDIF.
get ALV component
DATA:
lr_salv_wd_table TYPE REF TO iwci_salv_wd_table.
lr_salv_wd_table = wd_this->wd_cpifc_alv( ).
wd_this->alv_config_table = lr_salv_wd_table->get_model( ).
set visible row count
DATA:
lr_table_settings TYPE REF TO if_salv_wd_table_settings.
lr_table_settings ?= wd_this->alv_config_table.
lr_table_settings->set_read_only( abap_false ).
Did you name your component usage ALV? In wd_this->wd_cpuse_alv( ) the last part of the method name is dynamic based upon the name of the component usage (so you can have more than one ALV usage within one component).
It would be wd_this->wd_cpuse_<name>() where name is the component usage name. Therefore the method wd_this->wd_cpuse_alv( ) is only used when the component usage name is ALV. If you named the usage XYZ, then the method call would be wd_this->wd_cpuse_xyz( ).
You set the READ_ONLY flag, but did you change any of the cell editors from textView to textEdit?
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/7e/ce322aa1684aafaad4acdeadb5660b/frameset.htm
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/33/bef978c71b4b899bf52c6effd07336/frameset.htm
Pl can anyone suggest on this.
thanks,
Sharada
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.