on 10-26-2009 12:11 PM
Goal:
The ALV uses the data element LFDAT in the structure. And because of that the labels that are defined for LFDAT.
However, instead of using LFDAT labels, I want to use the labels of a different data element: VEBDT.
Now I have seen a lot of posts about changing the header with the SET_TEXT method, but I do not want to use that. The reason is simple: if I can use VEBDT, then all the translations are already there.
According to the documentation (http://help.sap.com/saphelp_nw04s/helpdata/en/f7/924a3de0384c2c893ca867cb936551/frameset.htm) it should be simple.
-
Specifying the Wording of the Column Header
● You can enter a separate DDIC data element whose field label is to be used as the column header.
For a DDIC relationship, you first of all enter the DDIC data element that returns the wording of the column header. You do this using method SET_PROP_DDIC_BINDING_ELEMENT. You make the following entries:
● Column header or tooltip
The text from the DDIC is to be used here as the column header.
● Name of the DDIC data element
-
The code I use:
DATA: l_column TYPE REF TO cl_salv_wd_column,
l_column_header TYPE REF TO cl_salv_wd_column_header.
DATA: ltp_text TYPE string.
ltp_text = wd_assist->if_wd_component_assistance~get_text( key = value ).
l_column = wd_this->m_alv_config_table->if_salv_wd_column_settings~get_column( column_id ).
l_column_header = l_column->get_header( ).
CALL METHOD l_column_header->set_prop_ddic_binding_element
EXPORTING
property = if_salv_wd_c_ddic_binding=>bind_prop_text
value = 'VEBDT'.
CALL METHOD l_column_header->set_prop_ddic_binding_element
EXPORTING
property = if_salv_wd_c_ddic_binding=>bind_prop_tooltip
value = 'VEBDT'.
l_column_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind ).
But, after this, the column header are empty... Anyone done this before?
Hi,
I found them...Have you checked it in debugging..
Try doing this- first set the normal DDIC binding as none then use the above method....
lr_colheader->set_ddic_binding_field( if_salv_wd_c_ddic_binding=>ddic_bind_none ).
Then use yuor method..
I havenot tried it..
Regards,
Lekha.
Edited by: Lekha on Oct 26, 2009 5:59 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You are in which version ..
I m using the latest one, I donot find any l_column_header->set_prop_ddic_binding_element mehtod on this name.
Regards,
Lekha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.