Skip to Content

Dynamic dataSource for table

Hi,

I'm trying to change the dataSource of a table dynamically by using the method SET_DATA_SOURCE of the class CL_WD_TABLE.

A strange thing is that the parameter for this method is type ref to object... so what is this method expecting?

I always receive the same error:

"The following error text was processed in the system: Attribut NODE konnte nicht gefunden werden"

Even when I try the following, I receive that error:

lv_node_table = lr_table->get_data_source( ).

lr_table->set_data_source( value = lv_node_table ).

It seems pretty irrational to me that the result of the getter method seems to be the wrong parameter for the setter method...

I hope someone of you can figure out what went wrong here

Kind regards,

Maximilian.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jan 10, 2007 at 03:02 PM

    Hi,

    to ask a more specific question:

    Has anyone ever successfully used the method "table->set_data_source( value = ... )."

    If so, please post code examples!

    Kind regards,

    Maximilian

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Maximilian,

      That's intended. A developer is not enforced to bind all properties of aggregated view elements of a table to context attributes that reside below the dataSource. Some might be constant for all rows (like enabled, readOnly, etc) and hence are bound to other context attributes. Furthermore, the runtime is not able to determine which TableCellEditor should bind to which context attribute of the new dataSource. My advise it get the columns and to adjust the binding path of the table cell editors manually in your coding.

      Best regards,

      Thomas

  • Posted on Jan 10, 2007 at 03:29 PM

    Thanks a lot : )

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.