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: 

Editable ALV (CL_GUI_ALV_GRID) Pasting add new rows

Former Member
0 Kudos

Hi all,

I have a problem with OO ALV.

I'm using class CL_GUI_ALV_GRID as I need to have a couple of editable columns.

Let's say that we have columns Material and Quantity. And Quantity is editable.

Toolbar buttons for adding new rows, paste, copy, are all disabled.

Suppose I have 2 rows in the ALV.

If I copy to clipboard from, for example, Excel, more than 2 rows, and paste them in Quantity column of the ALV, the result is that new rows are inserted till all the information in the clipboard is pasted. The new rows have all blank values except for the column I'm pasting.

I do not want this rows inserted. I supposed that this wounldn't happened, as there are no buttons for inserting rows.

Anybody knows how to change this behaviour?

Thanks a lot.

Alejandro Galliano.

1 ACCEPTED SOLUTION

roberto_vacca2
Active Contributor
0 Kudos

Hi...

you have to realize the same behaviour of "rapid" modify, as in me22n transaction for example,when you copy the order position..

You must create a custom functionality for the "PASTE" command in your ALV. Adding a button for this. Standard one doesn't accomplish your request..

Standard Paste Function creates always new records..

Hope to help , bye...

5 REPLIES 5

roberto_vacca2
Active Contributor
0 Kudos

Hi...

you have to realize the same behaviour of "rapid" modify, as in me22n transaction for example,when you copy the order position..

You must create a custom functionality for the "PASTE" command in your ALV. Adding a button for this. Standard one doesn't accomplish your request..

Standard Paste Function creates always new records..

Hope to help , bye...

Former Member
0 Kudos

Hi Alejandro,

You can implement your own functionality to create new row.You can add your own button in ALV for New row creation. In another simple way is you place the button in the screen which display the ALV and implement the logic in PAI of the screen.

the logic is simple add new row in the internal table which you are using to display ALV and refresh the ALV.Then your new row will appear in the Grid.

Regards,

Mike

Former Member
0 Kudos

Hi Alejandro,

I am getting the same issue in OO ALV.

Can you please guide me to resolve the problem.

Thanks In Advance..

Regards,

Manish

Michaelis
Explorer

Within the argument IS_LAYOUT of the class CL_GUI_ALV_GRID's method SET_TABLE_FOR_FIRST_DISPLAY or SET_FRONTEND_LAYOUT, set the component NO_ROWINS to 'X', e.g. like

go_my_alv_grid->set_table_for_first_display(
...
is_layout = VALUE #( ... no_rowins = 'X' ... )
...
).

0 Kudos

simple solutions that works , top ....