cancel
Showing results for 
Search instead for 
Did you mean: 

Reg ALV

Former Member
0 Kudos

Hi all,

The following is my requirement.

In My ALV when i click Insert Row, then a new line should get inserted with few fields auto populated with some default values and remain ineditable. The rest all fields are input enabled.

Is there any way with which i can change the Functionality of The Insert Button.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos
0 Kudos

Hi Tripathy,

your links refer to the ALV Grid in ABAP.

I think Sravan should then reply, and first tell us if his question is concerning:

- ALV ABAP Grid Control or

- ALV WD ABAP

As mentioned above this should be no problem within WebDynpro for ABAP. Solution as described in previos ansewer.

In ABAP Grid Control:

register to the onDataChangedEvent after any kind of modification has been performed on the frontend:

data: gt_outtab type g_ty_t_outtab,

gr_grid_d0100 type ref to cl_gui_alv_grid,

gr_events_d0100 type ref to lcl_events_d0100.

call method gr_grid_d0100->register_edit_event

exporting

i_event_id = cl_gui_alv_grid=>mc_evt_modified.

next register to the event OnDataChanged:

create object gr_events_d0100.

set handler gr_events_d0100->data_changed

for gr_grid_d0100.

after row has been inserted you will receive the event dataChanged from ALV. You can now change the data in your table --> editability of cells etc.

However do not call the method REFRESH!!!!!

- Michelle

0 Kudos

Hi Kumar,

the insert row functionality can remain.

The WebDynpro context node holding your data ("DATA") allows per attribute the setting of a default value. When a row is inserted in the ALV the default value is taken.

Using this technique you can bind the editable flag of your cell editor to an attribute of your context node with the default value "notEnabled". Since the default values are taken when the ALV inserts a row the cell will automatically be enabled since it is bound to this attribute.

- Michelle

Former Member
0 Kudos

Hi,

did you have a look at this? http://help.sap.com/saphelp_nw2004s/helpdata/en/7f/849e6d796d4fe49221609ffcbc357d/frameset.htm (see also <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/74/fd4142646ab46be10000000a155106/frameset.htm">SAP List Viewer in Web Dynpro ABAP</a>).

Regards, Heidi

Former Member
0 Kudos

Hi sravan

where do u want to implement this functionality,

i mean in Web Dynpro or ABAP ?

Regards

Kapil S. Kamble