cancel
Showing results for 
Search instead for 
Did you mean: 

Make Production Version mandatory on a Process Order

spinellll
Participant
0 Kudos

I have an ABAP requirement to make the Production Version field mandatory when creating or changing a Process Order. Currently, the system (ECC) only displays an informational message via MODULE CALC_SHEET_COPY when this condition is met. For example:

IF AFPOD-VERID IS INITIAL.
MESSAGE S345(40).
EXIT.
ENDIF.

I was able to place code in EXIT_SAPLCOBT_001 (SMOD PPCO0001) and issue an appropriate error message upon SAVE when VERID is empty, but that customer function is called in a form that's performed "ON COMMIT", so any user keystroke that's pressed after the new message is displayed, results in an ST22 due to the COMMIT interruption. I checked the other PPCO000* SMOD functions but they only import header data.

I also looked to insert an implicit enhancement but the program has most of the code embedded in modules and not in forms.

Suggestions welcomed.

Leo

Accepted Solutions (0)

Answers (1)

Answers (1)

Caetano
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

If you want to trigger any error message during the order creation, you should use BAdI WORKORDER_UPDATE and method AT_SAVE.

Also, I have tested the creation of a process order without production version in my system and error message C2 025 was triggered in form READ_ROUTING_FORM of program LCOKOF6I, so you shouldn't have to implement an exit to control that.

Check message C2 025 in transaction OPJB and make sure it is set to error. Also check the order type dependent parameters and make sure that the BOM selection method is set to "Selection only by production version" in tab MRP4 of the material master.

Regards,
Caetano

spinellll
Participant
0 Kudos

Thank you Caetano.

I will check that out.