cancel
Showing results for 
Search instead for 
Did you mean: 

Add row to ALV in WebDynpro

Former Member
0 Kudos

Hey,


Because I'm a newbie to WD I got this question.

I implemented a ALV which gets one row of data by clicking my first button.

Now I want it to add a second row by clicking my second button. But what it does is just overwriting my first row. 😕

The ALV gets his data like this:

- a internal table gets the data via a "SELECT" from a database table

- the internal table is bind to the context node with "bind_table"

- the ALV gets his data from the context node

So I'm not really sure what the node exactly stores (a table or just a row)?

AND

I thought about just append a row to the "existiting" ALV, but don't know where exactly so that the old data is not overwritten. 😕

Thanks for any hints!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

So I found something on the net which come close to what I thought.

https://scn.sap.com/thread/1124819

The data from the context node is transfered into a internal table. After that I also append the new row to the internal table and bind it to the node again.

Feel free to comment wether this is a good or bad solution for my problem

Former Member
0 Kudos

Hi Dominic,

You don't have to get the data and append, if you check the method BIND_TABLE of IF_WD_CONTEXT_NODE it has one more parameter SET_INITIAL_ELEMENTS which is 'X' (ABAP_TRUE) by default, you need to pass it as' '(ABAP_FALSE) to make your table added in append mode.

Former Member
0 Kudos

Ok thanks that looks way better.

Works fine!

Answers (0)