cancel
Showing results for 
Search instead for 
Did you mean: 

extract Context to itab

Former Member
0 Kudos

Hi All,

On my Component Init I have extracted some value from DB table and store in a context,

Inthe program at several place i need to compare the value user give against the table.

Is it best if i loop thourgh the context and read every value or extract it to a internal table and then run the validation.

I dont know how to extract the whole context at once. i only know how to read by index. Please guide me on how i can extract them at once and the loop them....

Thank you.

Vinod

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vinod,

this method returns the content of the context as an internal table.

IF_WD_CONTEXT_NODE->GET_STATIC_ATTRIBUTES_TABLE( )

Silke

Former Member
0 Kudos

Thanks Silke,

I manage to find it. Sorry for the late reply.

: : Another problem FIXED!! : :

Answers (1)

Answers (1)

former_member182190
Active Participant
0 Kudos

Hi Vinodman,

As you just need an internal table to store data and compare it at some other places.

Create an Internal table as a public attribute in your component controller.

Fill it in the Wddoinit method as you are fetching your data there.

Acess this internal table anywhere you want using wd_comp_controller->lt_itab

where lt_itab is the name of your internal table.

you can just loop on it saying

loop at wd_comp_controller->lt_itab into ls_itab.

...

...

..

endloop.

Hope this solves your problem.

Regards,

Ismail.