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

Nth Level

Former Member
0 Likes
1,066

Hi,

I have a product which has child Products .These Child Product inturn are parent to some Products.I need a logic to find out all the levels.

supose a product is 1001565 has childs 1000565

1000566

Inturn these have child products which in turn are parent to other products.I want to go to the nth level.How can i go about it.

thanks and regards

Ahasan

Hi,

I have a product which has child Products .These Child Product inturn are parent to some Products.I need a logic to find out all the levels.

supose a product is 1001565 has childs 1000565

1000566

Inturn these have child products which in turn are parent to other products.I want to go to the nth level.How can i go about it.

thanks and regards

Ahasan

8 REPLIES 8
Read only

Former Member
0 Likes
994

Hi,

Did your tey this FM CS_BOM_EXPL_MAT_V2 to explode the parts to the nth level.

I hope you are referring to Material BOM relationship.

Cheers

VJ

Message was edited by: Vijayendra Rao

Read only

0 Likes
994

Hi,

I am working in APO-4.0.Do u know any function module at pegging level(In R/3 its BOM level)

Thanks and regards

Ahasan

Read only

Former Member
0 Likes
994

Hi Ahasan,

can you explane it a little more in detail.

I had the same Problem in Tables STKO and STPO.

I solve it by using a Form and call it rekursiv.

When i get more detail, perhaps i can give

you a Code-Example.

Regards, Dieter

Read only

0 Likes
994

hi Dieter,

i have the same problem.I want to have a recursive call.Can u give me the example of the perform You used .

thanks and regards

Ahasan

Read only

athavanraja
Active Contributor
0 Likes
994

sorry. ignore this

Regards

Raja

Message was edited by: Durairaj Athavan Raja

Read only

Former Member
0 Likes
994

HI

GOOD

HOW DO YOU WANT TO DEVELOP THIS REQUIREMENT ,USING ALV OR SIMPLE REPORT.

THANKS

MRUTYUN

Read only

0 Likes
994

Hi,

I am updating a Ztable .Simple Report

Regards

Ahasan

Read only

0 Likes
994

Hi Ahasan,

here my example:

PROGRAM Z_TEST1 MESSAGE-ID ZZ.

*

TABLES: MAST,

STAS,

STPO.

*

PARAMETERS: P_MATNR LIKE MAST-MATNR.

*

  • interne Tabelle der Stücklistenpositionen

DATA: BEGIN OF ITAB OCCURS 100,

STUFE(10) TYPE C,

POSNR LIKE STPO-POSNR,

IDNRK LIKE STPO-IDNRK,

END OF ITAB.

*

DATA: STUFE TYPE I.

************************************************************************

*

START-OF-SELECTION.

*

SELECT SINGLE * FROM MAST WHERE MATNR = P_MATNR

AND WERKS = '2000'

AND STLAN = '1'

AND STLAL = '01'.

*

IF SY-SUBRC = 0.

PERFORM LESEN_STAS_STPO USING MAST-STLNR.

ENDIF.

*

LOOP AT ITAB.

WRITE: / ITAB-STUFE, ITAB-POSNR, ITAB-IDNRK.

ENDLOOP.

*

************************************************************************

FORM LESEN_STAS_STPO USING MAST-STLNR.

*

STUFE = STUFE + 1.

*

SELECT * FROM STAS WHERE STLNR = MAST-STLNR

AND STLAL = '01'.

*

CLEAR: ITAB.

*

SELECT SINGLE * FROM STPO WHERE STLNR = STAS-STLNR

AND STLKN = STAS-STLKN.

*

*

ITAB-STUFE+STUFE = STUFE.

ITAB-IDNRK = STPO-IDNRK.

ITAB-POSNR = STPO-POSNR.

*

*

APPEND ITAB.

*

SELECT SINGLE * FROM MAST WHERE MATNR = STPO-IDNRK

AND WERKS = '2000'

AND STLAN = '1'

AND STLAL = '01'.

  • rekursiver Stüklistenpositionsaufruf

IF SY-SUBRC = 0.

PERFORM LESEN_STAS_STPO USING MAST-STLNR.

ENDIF.

*

ENDSELECT.

*

STUFE = STUFE - 1.

*

ENDFORM.

************************************************************************

Hope it can help you.

Regards, Dieter