cancel
Showing results for 
Search instead for 
Did you mean: 

Context with deep structures.

Former Member
0 Kudos

Hello guys. I have the following problem. I'm making a test application, which consist of 6 tables connected with foreign keys, displayed in one webdynpro view. The problem is that, i want to make the context with deep structures, one of the elements of one of tables is table of one of the others. The only way, that i know, to get data from last table is connected to writing a lot of code, only to get 1 field. This is the structure

Vehicles has brand_id, which is connected to table brand- field id. Brands has model_id, which is connected to table models- field id. So, if i want to get some fields from the models table... it getting messy... I hope someone will understand my idiotic explanation and help me. Thanks in advance!

Best regards,

Kiril

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I think the only possible way is to create child nodes and using supply functions..

In the supply function you will get the immediate parent selected so you wont have to go the top level.

Say strucutre is NODE1 -> NODE2 -> NODE3-> NODE 4.

Now say you select one row from NODE1.

In the supply function of NODE2 you will get the detail of the row selected in NODE1 (parameter - parent ).

Similarly in Supply function of NODE 3 you will get the detail of row selected in NODE2.

This is the only way to dril down. Only good thing is you dont need to code for getting the row selected in parent node.

Lukas_Weigelt
Active Contributor
0 Kudos

Hi Kiril,

I see what approach you are thinking about and your explanation is not idiotic at all

What I understand is that you have 6 Tables with loads of foreign keys and you want to avoid heaps of "loop at" or "select" coding-nestings. What I don't understand is, why would you want to reproduce the logic of your tables, which you already have, upon your context? I'm not seeing through what your application works like for an end user yet, maybe that's why I'm confused.

In my opinion you won't have many options to avoid some coding which contains a bit of complex Loop-At or Join-Clauses. But if you build a class and outsource the code in some public static methods, this won't be as much work as you think, assuming you make the methods a bit dynamic and reusable.

Cheers, Lukas

Former Member
0 Kudos

I have one table with data from the data table advertisements, when i select one row it gets me all the information, from all the tables. I've already done it, by making subnodes, binding them to data tables and getting their elements and attributes, using 2 methods. But i think it is ... in web dynpro java there is a model and everything is perfect, here, if i have 50 tables, every table with deep structures on 10 levels deep, how many months will i write the code...