on 03-07-2006 7:54 AM
Is there any reference about how to populate items in Itemlistbox? I have tried to bind a context node with cardinality 1..n and Selection 0..n to the datasource of a itemlistbox element. The node contains two attributes jy and jy_text representing value and text repectively. I assign some sets of data to the attributes and finally bind the table to the node. But it doesn't display anything in the itemlistbox at runtime. Does anyone have idea?
My code is like this:
=====================
DATA:
NODE_HEAD TYPE REF TO IF_WD_CONTEXT_NODE,
NODE_JY_LIST TYPE REF TO IF_WD_CONTEXT_NODE,
ELEM_JY_LIST TYPE REF TO IF_WD_CONTEXT_ELEMENT,
STRU_JY_LIST TYPE IF_MAIN=>ELEMENT_JY_LIST,
tb_jy_list like table of STRU_JY_LIST,
tb_is type table of v_tb038a_std,
st_is type v_tb038a_std.
* navigate from <CONTEXT> to <HEAD> via lead selection
NODE_HEAD = WD_CONTEXT->GET_CHILD_NODE( NAME = `HEAD` ).
* navigate from <HEAD> to <JY_LIST> via lead selection
NODE_JY_LIST = NODE_HEAD->GET_CHILD_NODE( NAME = `JY_LIST` ).
select ind_sector text into CORRESPONDING FIELDS OF TABLE tb_is from V_TB038A_STD where SPRAS = '1'.
LOOP AT tb_is into st_is.
STRU_JY_LIST-jy = st_is-ind_sector.
STRU_JY_LIST-jy_text = st_is-text.
insert STRU_JY_LIST into TABLE tb_jy_list.
ENDLOOP.
NODE_JY_LIST->bind_table( tb_jy_list ).
Message was edited by: Fred Zhou
Hi Fred,
You should check the following:
The text property of the listbox should bind to the text attribute of your context node.
Regina
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.