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

Alv grid Editable field

Former Member
0 Likes
853

Hai friends,

I am displaying data in ALV Grid, in this 2-fields are editable,so i have to change existing values and input our own values ,but here trouble is i unable to catch new values ,can any one help me that how to catch these input values.

Thanks in Advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
806

Hi,

Please check the demo program BCALV_EDIT_03

and follow this link..

http://joyjitghosh.blogspot.com/2009/05/alv-with-edit-and-save-functionality.html

hope this solve this problem.

thanks & regards.

Hai friends,

I am displaying data in ALV Grid, in this 2-fields are editable,so i have to change existing values and input our own values ,but here trouble is i unable to catch new values ,can any one help me that how to catch these input values.

Thanks in Advance

6 REPLIES 6
Read only

lijisusan_mathews
Active Contributor
0 Likes
806

Are you using Class or REuse_alv?

Read only

0 Likes
806

Thanku for reply..please see the below code.

fieldcatalog-fieldname = 'NEWA'.

fieldcatalog-just = 'C'.

fieldcatalog-key = 'X'.

fieldcatalog-input = 'X'.

fieldcatalog-edit = 'X'.

fieldcatalog-seltext_m = 'New Aggrement'.

fieldcatalog-outputlen = 15.

append fieldcatalog to fieldcatalog.

clear fieldcatalog.

fieldcatalog-fieldname = 'NEWI'.

fieldcatalog-just = 'C'.

fieldcatalog-key = 'X'.

fieldcatalog-edit = 'X'.

fieldcatalog-seltext_m = 'New Item'.

fieldcatalog-outputlen = 15.

append fieldcatalog to fieldcatalog.

clear fieldcatalog.

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = gd_repid

i_callback_pf_status_set = 'PFSTATUS'

i_callback_user_command = 'USER'

is_layout = gd_layout

it_fieldcat = fieldcatalog[]

it_events = gi_events

  • i_save = 'X'

tables

t_outtab = gt_final

exceptions

program_error = 1

others = 2.

Read only

0 Likes
806

In your USer command "USER' write teh following code


DATA: o_object TYPE REF TO cl_gui_alv_grid.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = o_object.
IF o_object IS NOT INITIAL.
CALL METHOD o_object->check_changed_data.

Note that this should be the initial lines in your user command.

Read only

0 Likes
806

Thanku for reply Suzie.Solved by me..

Read only

Former Member
0 Likes
807

Hi,

Please check the demo program BCALV_EDIT_03

and follow this link..

http://joyjitghosh.blogspot.com/2009/05/alv-with-edit-and-save-functionality.html

hope this solve this problem.

thanks & regards.

Read only

Former Member
0 Likes
806

Data: gc_alvgd TYPE REF TO cl_gui_alv_grid,

stable TYPE lvc_s_stbl.

*Call after Reuse ALVgrid function module

form REDISPLAY .

CALL METHOD gc_alvgd->set_ready_for_input

EXPORTING

i_ready_for_input = 0.

stable-row = 'X'.

stable-col = 'X'.

CALL METHOD gc_alvgd->refresh_table_display

EXPORTING

is_stable = stable

EXCEPTIONS

finished = 1

OTHERS = 2.

endform. " REDISPLAY