Skip to Content
0
Former Member
Jul 01, 2015 at 10:11 AM

How to fetch the related suborders for a superior order

504 Views

Hi,

Kindly help me out,

I have created an order through IW31 . Let it be 'A'

I have created a suborder for 'A' . Let it be 'B'

Now another one for 'A' itself . Let it be 'E'

And another for 'B'. Let it be 'C'

And another for 'C' . Let it be 'D'

Now I need any table or FM which fetches all the superior orders which are created for the suborder 'D'

i.e. I am expecting C, B,A as output when I check for 'D' and 'E' shouldn't be picked

There is a table 'AFKO' which gives me the immediate superior order (MAUFNR) ('C') and the master order (LEAD_AUFNR) ('A') values but I need the whole set of orders.

Not suggestible to hit the table 'N' number of times

Thanks in advance

Regards,

Naresh.