‎2009 Sep 07 3:39 PM
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
‎2009 Sep 07 4:05 PM
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.
‎2009 Sep 07 8:14 PM
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.