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

CL_GUI_ALV_GRID: Inserting Lines

Former Member
0 Likes
1,398

Hi,

I want pass the event, when the user insert (add) a new line within the CL_GUI_ALV_GRID-Grid Control.

Up to now I have registred the Events

'ENTER'

'DATA_CHANGED'

'DATA_CHANGED_FINSHED'

But I would also like to write a method, when the user adds a line.

Up to now I have programmed some work-around using the

registred events, but it does'nt seem a very elegant way...

I found some Attributes:

MC_FC_LOC_INSERT_ROW

MC_FC_LOC_APPEND_ROW ...

How can I use these attributes to solve may problem?

Tahnks a lot

Michael

1 ACCEPTED SOLUTION
Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
894

Hi Michael

You should implement the event <b>"data_changed"</b> for this even you do not think it is not so elegant. This method has a parameter of a protocol class type whose instance will have <i>modified cells, inserted lines, deleted lines</i>, etc... And you can operate on them. Afterwards, after errorless data change the event <b>"data_change_finished"</b> will be triggered.

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Hi Michael

You should implement the event <b>"data_changed"</b> for this even you do not think it is not so elegant. This method has a parameter of a protocol class type whose instance will have <i>modified cells, inserted lines, deleted lines</i>, etc... And you can operate on them. Afterwards, after errorless data change the event <b>"data_change_finished"</b> will be triggered.

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

3 REPLIES 3
Read only

Former Member
0 Likes
894

Hi,

GET_ROW_INSERT_ALLOWED

SET_ROW_INSERT_ALLOWED

Check this also.

BCALV_EDIT_04 This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to

implement the saving of the new data.

Thanks & Regards,

Judith.

Message was edited by: Judith Jessie Selvi

Read only

ssimsekler
Product and Topic Expert
Product and Topic Expert
0 Likes
895

Hi Michael

You should implement the event <b>"data_changed"</b> for this even you do not think it is not so elegant. This method has a parameter of a protocol class type whose instance will have <i>modified cells, inserted lines, deleted lines</i>, etc... And you can operate on them. Afterwards, after errorless data change the event <b>"data_change_finished"</b> will be triggered.

Regards

*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

Read only

Former Member
0 Likes
894

Thanks a lot Judith and Sedar!

i assumed, that it works in this way, but now i am sure

Michael