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
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
Hello Ratan,
Give feedback on how you settled and then Close the thread. Also go through this:How to close a discussion and why
KJogeswaraRao
Hello Ratan,
This can be done with IWO10009 or with PPCO0023 user-exits. We need to develop the syntax.
KJogeswaraRao
Add a comment