on 07-20-2012 3:32 PM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you post the code of how to insert a row to an ALV table upon the button click event ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ).
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
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.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.