on 07-13-2006 12:11 AM
Hello,
I need to set attribute of a context to some values that come from a database table. It is not a single value but a set of values.
When I call a set_attribute method one of the parameters that it takes is VALUE of type DATA (values that set the attribute). When I pass a single value everything works out fine but I need to pas a table into it. I get an error when I try to pass a table to it.
How can I pass a set of data and not just a single value?
Thank you.
Hi Georgy,
What is the type of your 'SOME_ATTR' attribute? Table or simple type?
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim,
Here are couple of things that I did.
I have a database table that has some data, let's call it /SCA/ABC
Context has one node TABLE_OVERVIEW which is mapped to Dictionary Structure /SCA/ABC with Cardinality 0...n
On the screen there is a table that is bound to this context node.
In WDDOINIT I set this node this way (so the user can see the data):
DATA: lt TYPE TABLE OF /sca/abc.
SELECT *
INTO CORRESPONDING FIELDS OF TABLE lt
FROM /sca/abc.
wd_context->bind_table( new_items = lt ).
When WDDOINIT method is executed I get the following error message: Number of Elements of the Collection of Node ... Violates the Cardinality.
I am not exactly sure if this line of code wd_context->bind_table( new_items = lt ) binds my context node to the table.
Could you comment?
Thank you.
Georgy
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.