Skip to Content
author's profile photo Former Member
Former Member

Internal table as an attribute of component controller

How do I define an attribute in the component controller's attribute tab, if the attribute is a table?

suppose I need to define an attribute it_my_table which is of type table of struct_my_table. it_my_table cannot be linked to any table directly.

how do I define this attribute?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 15, 2007 at 08:35 PM

    I think you can do that using Table Types. Please check that out.

    Regards

    <i><b>Raja sekhar</b></i>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 16, 2007 at 08:15 AM

    hi malvika........

    you can create your own global structure for it_my_table and use it in the attributes tab...... the better way is to create a node and corresponding attributes that defines your structure, in hte context.

    ---regards,

    alex b justin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 08:01 PM

    How do we read the table that in the attribute of the component controller in another form in the same application.

    i tried:

    DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .

    lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).

    data: lt_itab type lo_componentcontroller=>itab.

    but can;t

    Please help.

    Vinod

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 29, 2008 at 02:19 AM

    Hi malvika,

    To create a table as an attribute in the component controller, you need a

    table type present in the data dictionary to which you can take as a reference.

    You cannot just create a table attribute in the component controller when you

    have a structure with you.

    There are 2 ways for this

    1) You can create a table type in SE11 with your structure as its line type and then

    use that table type as associated type while declaring your internal table as a

    public attribute in your component controller.

    2) You can create a node of that structure with cardinality 0: N and use it.

    Hope this solves your problem.

    Regards,

    Ismail.

    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.