cancel
Showing results for 
Search instead for 
Did you mean: 

nested tables in context

Former Member
0 Kudos

Hello All,

Ithe context looks like this

main item

|___subitem

| |____st1

| |____st2

|___at1

|___at2

main item is table and sub item is also table.

i will enter the values for main and sub items in my screen. after entering all the values. at final i have to check the values. for eg: price at main item = sum of prices of subitems under that main item.

i dont have main item key valus in subitem.

is there any way, by reading the contexts i can read the subitems, for each main item.

Thanks a lot in advance.

Best Regards,

Amarender Reddy B

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Depending upon the element of main node you have to get the instance of sub node and then get elements all the elements of child node.

n1 = wd_context->get_chil_node( <name> ).

e1 = n1->get_element( ).

n2 = e1->get_child_node( <name> ).

data element_table type wdr_context_element_set.

element_table = n2->get_elements( ).

Thanks,

Rahul

former_member230839
Participant
0 Kudos

Hi Amarendar,

So for the main item there can be more than one number of subitems as records in subitem so you can get all the elements under the subitem by the method GET_ELEMENTS of the context node so that you can read all the records and calculate as usual.

Regards,

Anil kumar G