2006 Jun 19 5:24 PM
Hi friends,
I am creating an exploded bom disply report. the problem is User want to to see the expanded list in orde rlike
1 Bom element of main material
1.1 bom element of 1
1.1.2 bom element od 1.1
1.1.......
1.2 bom element of 1
2 bom element of ain material
2.1 and so on...
I had made this order manually just thinking if there is any functional module available in Sap to have List order like above.
thanks in advance for suggestions.
Lakhbir
Hi friends,
I am creating an exploded bom disply report. the problem is User want to to see the expanded list in orde rlike
1 Bom element of main material
1.1 bom element of 1
1.1.2 bom element od 1.1
1.1.......
1.2 bom element of 1
2 bom element of ain material
2.1 and so on...
I had made this order manually just thinking if there is any functional module available in Sap to have List order like above.
thanks in advance for suggestions.
Lakhbir
2006 Jun 19 5:32 PM
Hi,
Have you looked this FM <b>CS_BOM_EXPL_MAT_V2 or CS_WHERE_USED_MAT</b>?
Regards,
Ferry Lianto
2006 Jun 19 5:36 PM
Hi Lakhbir,
i did it with an abap.
Here a short 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 i can help you
Regards, Dieter
2006 Jun 19 5:44 PM
Hi Dieter,
i used same fields to get that seqeunce generated, I was thinking if we have some readliy available instead of manully making the logic,anyway thanks alot.
2006 Aug 02 9:13 PM
In above program I am not able to understand the followeing statement. What it is doing.
ITAB-STUFE+STUFE = STUFE.
Can any one please clarify.
Thank you.
2006 Aug 02 9:15 PM
In above program I am not able to understand the followeing statement. What it is doing.
ITAB-STUFE+STUFE = STUFE.
Can any one please clarify.
Thank you.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |