04-13-2010 5:53 PM
Hi ,
I want to put one of the field as editable when dispolay alv output by calling function module REUSE_ALV_POPUP_TO_SELECT.
i
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'Zsd_structure_alv'
CHANGING
ct_fieldcat = lfieldcat[].
LOOP AT lfieldcat ASSIGNING <fs_fcat>.
CASE <fs_fcat>-fieldname.
WHEN 'menge'.
<lfs_fcat>-edit = 'X'.
<lfs_fcat>-outputlen = '13'.
WHEN OTHERS.
<lfs_fcat>-no_out ='X'..
ENDCASE.
ENDLOOP.
CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
EXPORTING
i_selection = 'X'
i_zebra = 'X'
i_screen_start_column = 10
i_screen_start_line = 5
i_screen_end_column = 70
i_screen_end_line = lv_lines
i_checkbox_fieldname = 'CHECKBOX'
i_scroll_to_sel_line = 'X'
i_tabname = '1'
it_fieldcat = fieldcat[]
I_CALLBACK_USER_COMMAND =
is_private = ls_private
IMPORTING
es_selfield = ls_selfield
e_exit = lv_exit
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2
but i am unable to see menge field as editable?
please suggest what is wrong in the code?
but i have to put menge field as editable on Output . right now not showing
04-13-2010 5:57 PM
Hi,
Field name should be in CAPS.
LOOP AT lfieldcat ASSIGNING <fs_fcat>.
CASE <fs_fcat>-fieldname.
WHEN 'MENGE'. "Corrected
<lfs_fcat>-edit = 'X'.
<lfs_fcat>-outputlen = '13'.
WHEN OTHERS.
<lfs_fcat>-no_out ='X'..
ENDCASE.
ENDLOOP.
Thanks,
Vinod.
04-14-2010 12:04 AM
Debug is a really great tool; suggest you make frequent use of it... As Vinod correctly points out, field names are supplied in CAPS, and I'll bet that if you had watched this in debug you would have seen that the edit field was not set ON (X) at the end of the loop.
No intent to chew you out....just a suggestion. Sometimes a few minutes with debug will show you what a post with multiple replies will not.
07-10-2010 10:07 AM