Skip to Content
author's profile photo Former Member
Former Member

bom explosion how to restrict the item level posnr

Hi friends

TABLES : MAST.

DATA: BEGIN OF ISTPO OCCURS 1000.

INCLUDE STRUCTURE STPOX.

DATA: END OF ISTPO.

DATA: W_TOPMAT LIKE CSTMAT.

SELECT-OPTIONS : P_MATNR FOR MAST-MATNR.

PARAMETERS : P_WERKS TYPE MAST-WERKS.

DATA : BEGIN OF ITAB OCCURS 0,

MATNR LIKE MAST-MATNR,

WERKS LIKE MAST-WERKS,

END OF ITAB.

DATA: IT_STB LIKE ISTPO OCCURS 0 WITH HEADER LINE.

*DATA : ITAB_STB LIKE ISTPO1 OCCURS 0 WITH HEADER LINE.

START-OF-SELECTION.

CLEAR ISTPO. REFRESH ISTPO.

SELECT MATNR WERKS FROM MAST INTO CORRESPONDING FIELDS OF TABLE ITAB

WHERE MATNR IN

P_MATNR AND WERKS = P_WERKS.

LOOP AT ITAB.

CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'

EXPORTING

CAPID = 'PP01'

MEHRS = 'X'

MMAPS = 'X'

  • BREMS = 'X'

DATUV = SY-DATUM

MTNRV = ITAB-MATNR

WERKS = P_WERKS

EMENG = '1'

FBSTP = ' '

FTREL = ' '

IMPORTING

TOPMAT = W_TOPMAT

TABLES

STB = ISTPO

EXCEPTIONS

ALT_NOT_FOUND = 1

CALL_INVALID = 2

MATERIAL_NOT_FOUND = 3

MISSING_AUTHORIZATION = 4

NO_BOM_FOUND = 5

NO_PLANT_DATA = 6

NO_SUITABLE_BOM_FOUND = 7

OTHERS = 8.

IF SY-SUBRC = 0.

WRITE:/ 'MaterialNumber' ,21 'Description'.

SKIP 1.

WRITE: / W_TOPMAT-MATNR UNDER TEXT-H00 COLOR COL_HEADING,

W_TOPMAT-MAKTX UNDER TEXT-H01 COLOR COL_HEADING.

*

LOOP AT ISTPO .

WRITE :/ ISTPO-POSNR,

ISTPO-IDNRK,

ISTPO-OJTXP,

ISTPO-MENGE,

ISTPO-MEINS.

ENDLOOP.

ENDIF.

*ENDLOOP.

SKIP 5.

ENDLOOP.

here i gave the material no , it gave the bom of that materials.

i restricted posnr itemnumber.

postnr component number complonentdesct u

010 sfg

010

020

020 sfg

030 sfg

010

020

i want to get only sfg component how to use this logic in above coding.

very urgent. give me a solutions

Regards

ds

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2007 at 10:01 AM

    before looping to istpo.

    delete istpo where idnrk np 'SFG*'.

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      HI,

      i tried to before loop, but how can i know that mateials is sfg.

      pl give me a solution

      bcs

      itemnumber

      010

      010

      020 20+10 = 010

      020 020 = 020

      i want to get only 010 ,020, not inbetween materials

      Regards

      ds

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2007 at 10:16 AM

    sorry i cant get your requirement . as per my code it will delete all the rows which does not have idnrk like sfg. can you give some clear idea about your requirement?

    regards

    shiba dutta

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi,

      i want to get the cs13 tcode ouput,

      but i got the cs12 tcode ouput,

      if we give the materials to the select-option it ll give the bom

      1

      ..2

      ...3 - i need to get this one

      2

      ..1 - i need to get this one

      ..2 - i need to get this one

      3 - i need to get this one

      regards

      ds

      how can i restrict it.

      Regards

      ds

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.