on 09-05-2007 10:34 AM
hello,
the code
DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_usage_alv( ).
IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
l_ref_cmp_usage->create_component( ).
ENDIF.
* Holen des ALV Configuration Model
DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table .
* referenz auf alv component interface
l_ref_interfacecontroller = wd_this->wd_cpifc_usage_alv( ).
DATA:
l_value TYPE REF TO cl_salv_wd_config_table.
* get ConfigurationModel from ALV Component
l_value = l_ref_interfacecontroller->get_model(
).
DATA: myHEADER type ref to CL_SALV_WD_HEADER.
CALL METHOD l_value->if_salv_wd_table_settings~delete_header( ).
CALL METHOD l_value->if_salv_wd_table_settings~CREATE_HEADER
receiving
value = myHEADER
.
CALL METHOD myHEADER->set_image_source(
value = '/sap/public/xy/logo.png' ).
myHEADER->set_text( 'test' ).
doesn´t show the image and my set text in the title when I test my application.
whats wrong?
I found my fault. I started the set_data-method (binding context node to alv) at last and so the settings and changes of my alv-configuration-model become deleted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
The same code works for me as is. Can you just debug and see whether the control comes to the statements provided by you?
Regards,
Neha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for your answers.
DATA: myHEADER type ref to CL_SALV_WD_HEADER.
CALL METHOD l_value->if_salv_wd_table_settings~get_header
receiving
value = myHEADER .
CALL METHOD myHEADER->set_image_source(
value = '/sap/public/xy/logo.png' ).
myHEADER->set_text( 'test' ).
I debugged it. the text is written in myHEADER and the graphic is set but it´s not shown in internet explorer.
should I enable my changed header or something? what´s my fault?
Neha that doesn´t reach my aim.
hmm I try additionally
CALL METHOD l_value->if_salv_wd_table_settings~set_visible_row_count
EXPORTING
value = 4.
but it´s ignored too. All my settings are ignored.
I placed my code in the wddoinit of my componentcontroller and not in a view method. could this be a fault?
Hi,
could you try to use the function get_header instead of delete_header
and use that instance to set text and image?
grtz,
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.