Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with function module 'REUSE_ALV_POPUP_TO_SELECT'

Former Member
0 Likes
706

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

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

3 REPLIES 3
Read only

vinod_vemuru2
Active Contributor
0 Likes
588

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.

Read only

Former Member
0 Likes
588

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.

Read only

Former Member
0 Likes
588

This message was moderated.