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

set_ready_for_input and insert row.

Former Member
4,216

hy guys, i having an issue with an alv oo.

i have created a button on my toolbar to make my alv editable by using

if grid->is_ready_for_input( ) EQ 0. 
CALL METHOD grid->set_ready_for_input 
    EXPORTING i_ready_for_input = 1.

and that works fine.

all the editable fields are in edit mode (all non keywords fields).

the issue is this, i want the user to be able to insert a new row.

When the alv switches to the edit mode, 2 buttons add row and delete row are automatically add to the toolbar.

But when you have a new row, that row should completely be editable, but in my case the row is non editable.

so where does the event add rows is triggered? when i'm trying to debug the adding row action, the program never stop, add immediately the row.

I try to see if the handle data changed was trigged but neither this was triggered.

How can i make the added to be immediately editable?

Edited by: EBONGUE ANDRE on May 27, 2010 4:08 PM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,061

Did you set the edit-flag in the field-catalog for each column, or do you use styles for this?

In the first case, i have no idea at the moment, but in second case you should then insert the styles also to the new created row.

4 REPLIES 4
Read only

naimesh_patel
Active Contributor
0 Likes
2,061

You should also set the EDIT option in your Layout.


    gs_layout-edit = 'X'.
    CALL METHOD g_grid->set_table_for_first_display
         EXPORTING i_structure_name = 'SFLIGHT'
                   is_layout        = gs_layout   " <
         CHANGING  it_outtab        = gt_outtab.

Check program BCALV_EDIT_01.

Regards,

Naimesh Patel

Read only

0 Likes
2,061

i already use it. the edit function works well, the only issue is the addition of the new row, the row is added but it's not editable.

Regards.

Read only

Former Member
0 Likes
2,062

Did you set the edit-flag in the field-catalog for each column, or do you use styles for this?

In the first case, i have no idea at the moment, but in second case you should then insert the styles also to the new created row.

Read only

0 Likes
2,061

solve by adding:

gs_layout-edit = 'X'.

Thanx.