cancel
Showing results for 
Search instead for 
Did you mean: 

issue on web Dynpro ALV

Former Member
0 Kudos

Hi,

I am currently working on web dynpro alv. my issue is when i press the push button  i need to insert one new row in web dynpro alv .

actually i updating the data into data base table  through web dynpro alv , once i select and press the push button(i.e submit) the selected record will updated into data base table , here my requirement is after the submitted the record then automatically new row need to insert in web dynpro alv.

please suggest me.

Regards,

Venkat.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You need to get the current content of the node and assign to an internal table.

Then append the new row to this internal table and bind the new internal table.

Former Member
0 Kudos

In your submit button action you need to code to bind your new internal table with new row added

Answers (2)

Answers (2)

former_member186055
Active Participant
0 Kudos

Hi Thandlam,

Read Context node of the ALV data internal table, add one empty record to that internal table then again bind same internal table to the same context node.

I hope this will works.

Regards,

SuryaPraveen

former_member199126
Participant
0 Kudos

Can you post the code of how to insert a row to an ALV table upon the button click event ?

Former Member
0 Kudos

These are the steps:

1. Get the data in the node in Component Controller bound to DATA node of ALV in internal table.

     lo_node = wd_context->get_child_node( 'NODE' ).

     lo_node->get_static_attributes_table( IMPORTING table = lt_data ).

2. Now insert an empty row to this internal table.

     CLEAR: wa_data.

     APPEND wa_data TO lt_data.

3. Bind this table again to the node.

     lo_node->bind_table( lt_data ).

former_member199126
Participant
0 Kudos

Oh... I thoug there was an event handler in ALV which does that job.

Former Member
0 Kudos

There is an another way.

You may want to read this article. It gives Standard button to insert a new row.

http://wiki.sdn.sap.com/wiki/display/Snippets/Web+Dynpro+ABAP+-+ALV+Controlling+Standard+Buttons

Former Member
0 Kudos

The point of focus should be IF_SALV_WD_STD_FUNCTIONS~SET_EDIT_INSERT_ROW_ALLOWED( ).

Former Member
0 Kudos

Hi,

Actually above mentioned alternate way is not applicable for my issue , because when i press submit button( for data base table update) then only new row need to add but above alternate way applicable only when we press the append or insert button ... these are standard alv button.

Regards,

Venkat.

Former Member
0 Kudos

Hi,

yes, we have Event handler ON_DATA_CHECK for append new row or insert new row. but my issue is some what different .when i press submit button( for data base table update) then only new row need to add.

Regards,

Venkat.

Former Member
0 Kudos

Ok.

Then you can follow the approach in my previous post.

Former Member
0 Kudos

Hi,

Thanks for your suggestion .

Regards,

Venkat.