Application Development 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: 

A question about editing ALV fields

Former Member
0 Kudos

Hello Expert,

In my project, we need to read data from DB and display in the ALV. In the ALV output, we should be able to edit the records, and after user clicks the "Save" button in the applicaiton toolbar, the program should be able to save the changed data into DB.

Currently, I can display the data in ALV and all fields are editable. After I change some data and click "Save", the program will go into subroutine 'F_ALV_USER_COMMAND', but the data in the internal table GT_OUTTAB is not changed.

I generate the ALV output by the following calling:

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = wf_pgm

is_layout = gs_layout

it_fieldcat = gt_fieldcat[]

i_callback_pf_status_set = 'F_PF_STATUS_SET'

i_callback_user_command = 'F_ALV_USER_COMMAND'

is_variant = g_variant

tables

t_outtab = gt_outtab

exceptions

program_error = 1

others = 2.

In the subroutine 'F_PF_STATUS_SET', I call a GUI Status defined by myself.

But if I call as below

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = wf_pgm

is_layout = gs_layout

it_fieldcat = gt_fieldcat[]

  • i_callback_pf_status_set = 'F_PF_STATUS_SET'

i_callback_user_command = 'F_ALV_USER_COMMAND'

is_variant = g_variant

tables

t_outtab = gt_outtab

exceptions

program_error = 1

others = 2.

GT_OUTTAB is changed accordingly after clicking the "Save".

Can any expert tell me why Internal table is not changed in the case I use user-defined GUI Status?

Thanks & Regards, Johnny

Edited by: Yongbo Wu on Jun 10, 2011 10:51 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

After updation of the Ztable try to write one more select query To change the ITAB and pass the ITAB to Grid.

Regards,

Dhina..

2 REPLIES 2

former_member212713
Contributor
0 Kudos

Hi Yongbo;

Unfortunately REUSE_ALV_GRID_DISPLAY has update problem.

REUSE_ALV_LIST_DISPLAY FM is making automatic update/change itab.

You can change REUSE_ALV_GRID_DISPLAY FM with REUSE_ALV_LIST_DISPLAY FM.

Best Regards.


call function 'REUSE_ALV_LIST_DISPLAY' "'REUSE_ALV_GRID_DISPLAY'

Former Member
0 Kudos

Hi,

After updation of the Ztable try to write one more select query To change the ITAB and pass the ITAB to Grid.

Regards,

Dhina..