cancel
Showing results for 
Search instead for 
Did you mean: 

Read table context data into Internal table

Former Member
0 Kudos

Hi ,

is it possible to read the context data into internal table.

I have a table with data and displaying it in the view, I have a input field on the screen, depending on the data entered in the input field I need to change the table data and re display the table.

1: is it possible to read the context data into internal table. i can read one table line with get_static_attributes method.

how to get all the data into the internal table.

i have used on action method for input field, 2:is it possible to pass the table data when this event is triggered.

after displaying the data for different actions how to get all the data (which is binded to context) do we need to read the read the required data into method using get-attribute? is here way get all the displayed data into my method.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

To read the context data into an internal table, you can consider any one of the following methods Of IF_WD_CONTEXT_NODE:

GET_STATIC_ATTRIBUTES_TABLE: This method gets all the static attributes of all elements.

GET_ELEMENTS: This method retrieves an internal table with all element references.

I didnt get your second question. Can you please explain once again?

Hope this helps!

Regards,

Srilatha

Former Member
0 Kudos

Thanks,

I'l try those two methods,

my question is : when the data is displayed in the outut, and when we trigger any action (in my case i need to change the table content based on the input given in the input field, just need to change the percentages) when this action triggered a method will be triggered right, can we pass the table data to method using Expot/mport parameters or in any other way. what i am doing right now is i am reading all the attributes once again and getting the data from SAp one more time and changing the percentages.

is there any way when an action is triggered can we pass the context data to method?

let me know if didnt get my question.

Former Member
0 Kudos

Hello,

May be you can store an internal table of context elements as an attribute of comp controller and access that attribute in your action handler.

But am not sure how far its a right way to do this. You can give a try.

And to pass paramters to action handlers, have a look at the following documentation:

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/33/b11042705a5533e10000000a155106/content.htm

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/eb/ed6f4169e25858e10000000a1550b0/content.htm

i hadnt tried before so i cant explain how to do that. have a look at the documentation and try.

Regards,

Srilatha

Edited by: Srilatha M on Aug 4, 2010 1:53 PM

Edited by: Srilatha M on Aug 4, 2010 1:54 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

correctly said .. u can use the get_static_attributes_table to get the internal table contents, and for your second question ..

u pass the parameter of the same TABLE type ( data dictionary table type) as you can use the "TABLE OF" statement within the Associated Type column.

it will be the importing parameter in one method where u wish to get the changed values based on ur input field.

regards,

Amit