on 11-05-2007 8:18 PM
Hi,
I am very new to WDA, and am having difficulty populating an ItemListBox at runtime. I have bound the table to a node (COUNTRY, 0..n), and the text property to an element of that node (ZCOUNTRY_TEXT), and nothing appears on screen.
I have searched this forum, and I think I need to add code to populate it. I have looked at these 3 threads:
However, it still doesn't solve my issue. Do I need to add code? Or do I have the properties setup wrong?
I would very much appreciate help, and as always, will reward points.
On the INIT method of the view, small code needs to be added:
*Define local node and local table
data: node_country TYPE REF TO IF_WD_CONTEXT_NODE,
lt_texts type TABLE OF zcountries.
*Assign local node to context node
NODE_country = WD_CONTEXT->GET_CHILD_NODE( NAME = `COUNTRY` ).
*Put entries into local table
SELECT ZCOUNTRY_TEXT into CORRESPONDING FIELDS OF TABLE lt_texts
from zcountries.
*Bind the local table to the context
node_country->BIND_TABLE( EXPORTING NEW_ITEMS = lt_texts SET_INITIAL_ELEMENTS = ABAP_TRUE ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I have a text element (which contains the country name), and a value element. Both of these are under my node.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
stupid question:
did you supply the node with elements?
Cheers,
Sascha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.