cancel
Showing results for 
Search instead for 
Did you mean: 

type of static attribute table

Kartik2
Contributor
0 Kudos

Dear developers,

I have a situation where i have two views, each have the same context mapping from the component controller context.

When in view1 the data in context is set to val1.

Now navigation is done from view1 to view2.

When in view2 the data in context is set to val2.

Now navigation is done from view2 to view1.

It is obvious that the data which is contained in context will be only of view2, that is val2. but i want the data val1 along with val2 in view1.

first question: Is there any global definition kind of a thing so that the static attribute table of node in view1 can be stored and after the manupulation in view2 the second static attribute table can be added to the first one??

second question: If i try to pass the static attribute table through plugs, what should be the type of sucha table, In the implementation the type is of ANY TABLE. But i am unable to set this type in outbound plug parameters for the internal table that i want to pass??

I tried to make the situation as clear as possible, for further information please feel free to revert. Awaiting for your valuable suggestions. Thank you.

Regards

p kartik kumar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kartik,

For your requirement create a local node(node2) of same type as in component controller also another node which is mapped to node of view 1 through component controller. After filling values to node2 , now you will have both the value of node1 and node2 seperately.

Regards

Karthiheyan M

Kartik2
Contributor
0 Kudos

Hi Karthiheyan,

Thak you, you have given me the exact requirement i wanted, now i do not have to manupulate the same internal table, i can do it using two nodes. But i still have the doubt if at all i have to declare an export parameter for the table it_flight what should be the type of it??

As suggested by sarvanan wd_this->elements_<CONTEXT_NODE_NAME> is also not working, the system is throwing an error saying generic types are not accepted.

looking forward for your suggestion. Thank you.

Regards,

kartik

Kartik2
Contributor
0 Kudos

Dear developers,

when i gave the type of the table as the table name, that is SFLIGHT, the system throwed some compatibility error, But when i used a standard table type for the same table, i.e. FLIGHTTAB, it accepted it.

Thank you all for your help. I am closing the question.

Regards,

kartik

Edited by: kartikp on Aug 1, 2011 11:02 AM

Answers (1)

Answers (1)

shahid
Product and Topic Expert
Product and Topic Expert
0 Kudos

It will be good, if you define two nodes for two different views when both the views can have different data.

You can create a global table @ attributes of component, and push the data to the global table when navigating from one view to other view.

I am not sure why do you want to pass the table thru plugs, when you can define a table @ component level which can be accessed across the components/views.

Kartik2
Contributor
0 Kudos

Dear ssm,

Thank you for your reply, your answer was helpful, here i am willing to declare a table in component controller attributes but i am not sure what type to use for the table because in the implementation the type of table in :

lo_nd_flight->get_static_attributes_table(

importing

table = lt_flight ).

is ANY TABLE.

and i am unable to declare a table with type as any table in component controller attribute, it is throwing an error saying, Generic types cannot be used. Could you please suggest how to find out the appropriate type for the table. Looking forward for your suggestions. Thank you.

Regards,

kartik

saravanan_narayanan
Active Contributor
0 Kudos

Hello Karthik,

the data type of table should be table element of your context.

eg.

data lt_flight type wd_this->elements_<CONTEXT_NODE_NAME>. "you should replace the <CONTEXT_NODE_NAME> with the actual name of your context node.

BR, Saravanan