Skip to Content
avatar image
Former Member

Dynamically create reference attribute

Hi,

My current requirement is to create dynamically context attributes. I used the followings :

DATA: ls_attribute TYPE wdr_context_attribute_info.

ls_attribute-name = 'ATTR_1' .

ls_attribute-default_value = ''.

ls_attribute-type_name = 'STRING'.

node_info->add_attribute( EXPORTING attribute_info = ls_attribute ).

And it works fine. But I also need to create a Ref To type dynamic attribute as reference to a class object and nothing seems to work. Any suggestions ?

Thank you in advance,

Horea.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 01, 2008 at 12:43 PM
    Add comment
    10|10000 characters needed characters exceeded

  • Jul 01, 2008 at 02:44 PM

    >

    > Hi,

    >

    > My current requirement is to create dynamically context attributes. I used the followings :

    >

    > And it works fine. But I also need to create a Ref To type dynamic attribute as reference to a class object and nothing seems to work. Any suggestions ?

    >

    > Thank you in advance,

    > Horea.

    I don't believe that this possible. You can't be object references into the context. Normally you would store object references as attributes of the Controller.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Thomas Jung

      Hi,

      I think I was too cheap in words. I have a table and the user adds dynamically columns to the table depending on another table selection. And for each column I also create dynamically a context node and the needed attributes according to the needed table cell editor, also for each column I need an attribute that stores an object ( its configuration object ). I will try to build a component table of objects and see if it works.

      Thanks,

      Horea.

  • avatar image
    Former Member
    Jul 01, 2008 at 01:20 PM

    Hi David,

    Thanks for the hints. I don't think that using data descriptors would help me because I don't want to create the attributes from internal tables or DDIC. The only thing I want to do is change the type assignment for the attribute to Ref To. Is RTTI the only way?

    Regards,

    Horea.

    Add comment
    10|10000 characters needed characters exceeded