cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding Bill of Material in maintenance order

Former Member
0 Kudos

Hi Experts,

i have mentioned below my requirement which is related to Bill of material in PM module.

I have created BOM equipment wise in SAP PM & now my requirement is during maintenance order creation with equipment (equipment mandatory in MO) than system by default proposed  bill of material list means system not allow to user to add new item in component tab which is available in equipment BOM.

if user want to issue the new item against MO  than first material code add in equipment BOM & than system allow.

means i want to restrict MO component tab through Equipment BOM

please suggest as soon as possible

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Ratan,

Here is the solution through user-exit PPCO0023. Put the following code in the include ZXCO1U23 and the job is done.


IF IS_HEADER-AUART = 'PM01' OR
    IS_HEADER-AUART = 'PM02' OR
   IS_HEADER-AUART = 'PM03'.

   TYPES: BEGIN OF TY_BOM,
     IDNRK TYPE STPO-IDNRK,
     END OF TY_BOM.

   DATA: IT_BOM TYPE TABLE OF TY_BOM,
          WA_BOM LIKE LINE OF IT_BOM,
          V_IND TYPE CHAR1,
          V_STLNR TYPE EQST-STLNR.

   SELECT SINGLE STLNR INTO V_STLNR FROM EQST

WHERE EQUNR = IS_HEADER-EQUNR.


   SELECT IDNRK FROM STPO INTO TABLE IT_BOM

WHERE STLNR = V_STLNR AND STLTY = 'E'.

   LOOP AT IT_BOM INTO WA_BOM.
     IF IS_COMPONENT-MATNR = WA_BOM-IDNRK.
       V_IND = 'X'.
     ENDIF.
   ENDLOOP.

   IF V_IND = ''.
     MESSAGE: 'Component has to be from Equipment BOM list only.'
     TYPE 'I'.
     RAISE NO_CHANGES_ALLOWED.
   ENDIF.

ENDIF.

What happens after you implement

When you select the components (in the Order) from the List push button (takes you to EqBOM), there won't be any problem. The moment you put any material from outside this list and press Enter button, this code identifies and throws this error pop-up.

Hope you would make use of this work.

Good luck

KJogeswaraRao

Former Member
0 Kudos

Rao ji Are u Magician......u have the answer of every question. Thanks to god that u r with us for help...

You are really a gentle man.

Regards,

Peter

jogeswararao_kavala
Active Contributor
0 Kudos

Answers (3)

Answers (3)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Ratan,

Give feedback on how you settled and then Close the thread. Also go through this:

KJogeswaraRao

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Ratan,

This can be done with IWO10009 or with PPCO0023 user-exits. We need to develop the syntax.

KJogeswaraRao

Former Member
0 Kudos

Hi,

plz check COZF0002 Change purchase req. for externally procured component