cancel
Showing results for 
Search instead for 
Did you mean: 

Internal table as an attribute of component controller

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member182190
Active Participant
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Regards

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