09-15-2005 11:00 AM
Hi All,
I have a simple report in which several fields are in internal table from which the first field i dont want to display. I am setting the value for NO_OUT = 'X'. Still it is displaying the field.
Code I used:
DATA : int_fcat TYPE slis_t_fieldcat_alv,
wa_fcat type slis_fieldcat_alv.
loop at int_fcat into wa_fcat.
CASE wa_fcat-col_pos.
when 1.
wa_fcat-no_out = 'X'.
endcase.
modify int_fcat from wa_fcat.
endloop.
Can anyone suggest me?? It would be very much helpful.
Thanks,
Jignesh
09-15-2005 11:17 AM
Hi,
Do you fill the <b>col_pos</b> field in your code ? At what point do you want to hide the colunm - before the first display or you want to refresh the list ?
Svetlin
09-15-2005 11:17 AM
Hi,
Do you fill the <b>col_pos</b> field in your code ? At what point do you want to hide the colunm - before the first display or you want to refresh the list ?
Svetlin
09-15-2005 11:18 AM
See if the KEY is on for that field. KEY fields cannot be hidden.
Regards,
Ravi
Note : Please reward, if the answer is helpful.
09-15-2005 11:24 AM
Hi,
try this
DATA : int_fcat TYPE slis_t_fieldcat_alv,
wa_fcat type slis_fieldcat_alv.
loop at int_fcat into wa_fcat.
<b>*instead of col_pos put fieldname</b>
CASE wa_fcat-fieldname.
<b>" here give the fieldname which you dont want to show</b>
when 'fieldname'.
wa_fcat-no_out = 'X'.
endcase.
modify int_fcat from wa_fcat.
endloop.
what ever fields you dont want to display do this way
when 'fieldname1'.
wa_fcat-no_out = 'X'.
when 'fieldname2'.
wa_fcat-no_out = 'X'.
when 'fieldname3'.
wa_fcat-no_out = 'X'.
col_pos is used to show the position of the field in grid
to change the position........
when 'fieldname3'.
wa_fcat-col_pos = 2.
here fieldname3 displays second position in the grid.
hope this helps you
reward with points and close the thread if your question is solved
regards,
venu.
09-15-2005 11:44 AM
try 'tech' attribute of fieldcatalog.
wa_fcat-tech = 'X'.
Regards,
suresh
09-15-2005 12:04 PM
Thank All,
Your answers were helpful.
Thanks Again !!!!!!!!!!!
- Jignesh