on 03-14-2008 5:38 AM
hello all,
How to remove a blank columm from the ALV grid..
With Regard,
PARUL
Hi parul,
sorry for late reply but i jus want to tell you that log_handle is nothing but the attribute name. so replace the 'LOG_HANDLE' with your attribute name what ever you have created in the context menu or the attribute name of the column which is binded.
eg : ihave created an attribute A B C and i wanted to hide A then use the code whatever i have given previous by replacing Log_handle with 'A'
Sathish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
not working
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
DATA lr_column TYPE REF TO cl_salv_wd_column.
if column is empty (check by some condition).........
lr_column = lv_value->if_salv_wd_column_settings~get_column( 'LOG_HANDLE' ).
CALL METHOD lr_column->set_visible
EXPORTING
value = '01'.
endif.
sathish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sorry bt till nw i m unable to do that....
i did like this :
DATA: lr_column TYPE REF TO cl_salv_wd_column.
then
FORM blank_cell USING p_i_heading.
IF lr_column IS INITIAL.
lr_column = lv_value->if_salv_wd_column_settings~get_column( 'LOG_HANDLE' ).
CALL METHOD lr_column->set_visible
EXPORTING
value = '01'.
ENDIF.
ENDFORM.
here the error is :
Field "LR_COLUMN" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement . . . . . . . . . .
please tell me what is : lv_value and 'LOG_HANDLE'
in this code.
still not able to perform...
please correct me...
FORM blank_cell USING p_i_heading.
lv_value = wdyn_interface_controller_name->get_model( ).
IF i_display2-v1_ktp IS NOT INITIAL.
lr_column = lv_value->if_salv_wd_column_settings~get_column( 'v1_ktp' ).
CALL METHOD lr_column->set_visible
EXPORTING
value = '01'.
ENDIF.
ENDFORM.
where i_display2 is internal table from which check field v1_ktp should be initial.
The table u r passing to alv has to be checked whether it has any empty colums.
only those columns has to be set invisible.
Logic for checking empty columns
u define one structure with flags. for each column in the data table u have to define one flag in the structure.
suppose my table is having columns A B C
then i will define structure
types begin of str_flags,
A_f type c ,
B_f type c,
C_f type c,
end of str_flags.
loop on the internal table and check each column whether it is empty or not
if it is not empty set the flag as 'X'.
finally after the end of loop u will come to know which columns r empty.
Regards,
janakiram.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.