cancel
Showing results for 
Search instead for 
Did you mean: 

regarding Global data declaration.

Former Member
0 Kudos

Hi Gurus,

I am new to webdynpro Abap....

I have an internal table in which im getting data in one method ONACTIONACTION_DISPLAY .

i want to know how to store the internal table with global variables so as to use the same internal table in

another method .. For Eg: method ONACTIONEXPORT_TO_EXCEL .

I declared a variable in the attributes tab of Component Controller..

Its still giving error saying variable does not exsist when the activate the

second method:ONACTIONEXPORT_TO_EXCEL ( Both Method in same View )

Thanking you.

Best Regards,

Navin Fernandes.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First create a table type for that table in se11,

In the component controller attributes tab, decalre a variable of this table type and check the PUBLIC flag...

Now, you can access this variable using

wd_comp_controller->lt_table = lt_table1....

check in ST22 for the error and paste it here...

Regards,

Lekha.

Edited by: Lekha on Nov 20, 2009 5:47 PM

Former Member
0 Kudos

Hi Lekha,

Thanks a lot for your inputs .. Problem solved..!

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi navin,

to declare ur global variables , u can make use of the component controller , u create attributes under the attribute tab of ur component controller and check the Public checkbox there.

as you have to createstore the internal table as variable, so for that first of all you create a table of the required table you want in se11.

then u create variable of the table type which you have created in se11 under the attribute tab of ur component controller and check the Public checkbox there.

Note- attributes or variables created in this way wud be accessible across all the views in the component

u can acess the global attribute like this :

wd_comp_controller->attr( )

but as you want to transfer the data in the same view the for this you can create the variable in attribute tab of the respective view, but this varialbe is accesable only the view in which it has been declared.

so i think you shuld go for making a variable in component controller.

Former Member
0 Kudos

If you want to transfer data between same views then you can define attributes in View' Attributes Tab.

Now in your case , you have to transfer internal table <itab>. here in Attriubtes Tab , the type of your table should be a Table Type.

Table Type is created in SE11 > data type. Give the type of Table type as a Table there.

Now use this table type in your attributes tab while declaring <itab>.