Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Logic required

Former Member
0 Likes
639

HI all,

I am looking out for a logic for the following scenario.

A table contains the following data as like

Sample1 Sample2 Sample3 Sample4 Sample5

MATNR 1001 1002 1003 1004 1005

Material Type MPMF MPMP MPMP MPMI MPMI

ISM-FAM NA 1001 1001 1001 1001

ISM-PROD NA NA NA 1002 1003

If you see here 1001 is the grand parent and 1002 and 1003 are the sons to it.

and 1004 and 1005 are the sons to 1002 and 1003 respectively.

I want his report to be generated in a heirarchical way.i want the output ot be look like this.

output.

family product material

1001 1002 1004

1001 1003 1005

Can anybody help me in solving this .

thanks

madhavi

2 REPLIES 2
Read only

Former Member
0 Likes
557

There's a definition problem here. The data types seem to indicate relationships, but they don't indicate whothe parent is. So, it's easy to tell when there's only one parent, but it get's difficult when there is more than one possible parent. It could be said that position tells that, but it doesn't, because 1001 has two childs it becomes unclear how many childs can one parent have. So there's no way of telling if 1004 and 1005 are both 1002 childs or both 1003 childs or one of each.

You'll need to either refine the rules that define parenting or have more data that tells exactly wich one is the parent.

Read only

Former Member
0 Likes
557

Rather than simply asking the forum to write your report, please try coding yourself. If you have specific questions or problems, then get back to the forum.

Thread locked.