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

editable field in alv data format

Former Member
0 Likes
555

i have a editable field on ALV which is of date format and i need when user enter a date the value will be updated in the database table .

note that i am using alv list and the field catalog is of date format dat 8

the update is not done pleaseee helppp urgent

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
528

Hi,

You need to use the USER_COMMAND in the ALV function module

{CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = gd_repid

i_callback_user_command = 'USER_COMMAND'

i_callback_pf_status_set = 'GUI_STAT'

*i_grid_title = outtext

is_layout = gd_layout

it_fieldcat = fieldcatalog[]

*it_special_groups = gd_tabgroup

*it_events = it_events

i_save = 'X'

*is_variant = z_template

TABLES

t_outtab = i_final

EXCEPTIONS

program_error = 1

OTHERS = 2.

}

then you need to write the below FORM

{

*----


*• FORM USER_COMMAND *

*----


*• ........ *

*----


*• --> U_COMM *

*• --> RS_SELFIELD *

*----


FORM user_command USING u_comm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.}

Here in the Form, Write the UPDATE statment to update the database table

Regards

Sudheer

3 REPLIES 3
Read only

Former Member
0 Likes
528

Hi,

could u plzz explain ur problem clearly.

u want to update the databese from alv or regarding problem in alv.

Read only

0 Likes
528

sorry

i have an editable field on my list ALV and it's date

when user enter a date it won't save in my database i think there is problem with date format

Read only

Former Member
0 Likes
529

Hi,

You need to use the USER_COMMAND in the ALV function module

{CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_callback_program = gd_repid

i_callback_user_command = 'USER_COMMAND'

i_callback_pf_status_set = 'GUI_STAT'

*i_grid_title = outtext

is_layout = gd_layout

it_fieldcat = fieldcatalog[]

*it_special_groups = gd_tabgroup

*it_events = it_events

i_save = 'X'

*is_variant = z_template

TABLES

t_outtab = i_final

EXCEPTIONS

program_error = 1

OTHERS = 2.

}

then you need to write the below FORM

{

*----


*• FORM USER_COMMAND *

*----


*• ........ *

*----


*• --> U_COMM *

*• --> RS_SELFIELD *

*----


FORM user_command USING u_comm LIKE sy-ucomm

rs_selfield TYPE slis_selfield.}

Here in the Form, Write the UPDATE statment to update the database table

Regards

Sudheer