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 ALV - editable fields after copying row

Former Member
0 Likes
1,248

Hi all!

I've got a (simple?) problem. I created an editable ALV (by using class CL_GUI_ALV_GRID). There it is possible to add, delte or change entries. That's work!

The problem is, when the user copies an entry, the fields are not ready for input. It's the default function of the ALV. My questions is, how can I make the new line editable (including the key fields). I tried to replace the "copy line" function of the ALV with my own function code (on event TOOLBAR) and process it on event BEFORE_USER_COMMAND.

In my own copy routine I read the selected line to create a new one with the same values, set the attributes (field table type LVC_T_STYL) for the new line and append it to my internal table. After that, I make a refresh of the ALV. Unfortunately the DATA_CHANGED event does not work anymore. So it is not possible for me to check for double entries and validitiy. It doesn't help to call method CHECK_CHANGED_DATA on the grid instance.

Does anybody has an idea or an example??

Thank you a lot!

Best regards,

Florian

PS: I used the report BCALV_EDIT_04 as example, but unfortunatley there is no copy functionality implemented!

Hi all!

I've got a (simple?) problem. I created an editable ALV (by using class CL_GUI_ALV_GRID). There it is possible to add, delte or change entries. That's work!

The problem is, when the user copies an entry, the fields are not ready for input. It's the default function of the ALV. My questions is, how can I make the new line editable (including the key fields). I tried to replace the "copy line" function of the ALV with my own function code (on event TOOLBAR) and process it on event BEFORE_USER_COMMAND.

In my own copy routine I read the selected line to create a new one with the same values, set the attributes (field table type LVC_T_STYL) for the new line and append it to my internal table. After that, I make a refresh of the ALV. Unfortunately the DATA_CHANGED event does not work anymore. So it is not possible for me to check for double entries and validitiy. It doesn't help to call method CHECK_CHANGED_DATA on the grid instance.

Does anybody has an idea or an example??

Thank you a lot!

Best regards,

Florian

PS: I used the report BCALV_EDIT_04 as example, but unfortunatley there is no copy functionality implemented!

2 REPLIES 2
Read only

Former Member
0 Likes
676

Hi,

Please check this [thread|;.

Hope this helps.

Regards,

Chandravadan

Read only

0 Likes
676

Hi!

Unfortunetely I couldn't find any information in the refered thread about how to make the copied row completely editable! The copy functoin itself works - but if some fields of the original row are not editable, the fields in the new row are not editable too!

Best regards,

Florian