on 2014 Jun 07 4:46 PM
Hi Experts,
My requirement is,when the page is load then only one row should be generate in the Webdynpro ABAP table.There have a button "Add Row",after clicking on that button another row will be created and also there have a "Delete Row" button,after click on that the present will be deleted.Please refer the image.
This is done by in Webdynpro JAVA.Is there any way to create in ABAP. If possible please help me.
Thanks and Regards,
Amit Basak
Hi Amit,
There are many threads available on SCN similar to your requirement.
To add an empty row initially, you need write logic in WDDOINIT( ) method of VIEW i.e
Sample:
DATA lt_material TYPE wd_this->Elements_material.
DATA lo_nd_material TYPE REF TO if_wd_context_node.
lo_nd_material = wd_context->get_child_node( name = wd_this->wdctx_material ).
append initial line to lt_material.
lo_nd_material->bind_table( new_items = lt_material
set_initial_elements = abap_true ).
Please refer the below document for add row & delete row functionality.
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramakrishna,
I hope you are well.
Just came across this thread and we have a similar requirement. Although it has been very long time since the last answer, trying to reach out and hope this will be answered.
The requirement is that we need to add and delete rows in a table which has a dropdown and an input field.
I followed the example provided in the link below as it matches our requirement. I am currently working on adding and deleting rows using two buttons above the table.
While I tried to do it as usual, it has created blank row but when I scroll down, it results in a short dump possibly because there are input elements involved and I haven't handled creating them before binding. I have also searched and been through several links on SDN but couldn't find a suitable solution.
I created a node with a sub node having the following fields:
Node: TRAVEL
Cardinality 0..n
Selection 0..1
Subnode: CITY_LIST
Cardinality 0..n
Selection 0..1
I worked on adding and deleting rows to regular tables previously i.e. with no input fields or dropdowns but this time it is somewhat different as it has different input elements involved.
Could you please help with how to append and delete rows in the table.
Thank you.
Regards,
Chaitanya
You can create an ALV and set the "read only mode" to false and the buttons "Append row", "Insert row" and "Delete row" will show up automatically in the toolbar of the ALV.
Check this document or this wiki for more information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.