cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict Manuel creation of PM work order.

Former Member
0 Kudos
887

Dear all,

I have requirement to restrict Manuel creation of Preventive Maintenance work order [Eg : PM02].

Initially it was : User can create PM02 work orders manuelly. and also through maintenance plans with background creation of Notification M2.

Now user don't want to create PM02 work orders manuelly. Need to restrict it. Only through maintenance plans order should get created with Notification.

I have solution by creating user status with users status set forbidden to create order ,  so system throw error "User status active ...." if we try to create order directly.

By doing this 50% problem solved, however, while generating orders through auto scheduling [ IP30] system throw error "User status active...".

Is there any alternate solution to handle this type scenerio?  Please suggest.

Regards

Anand

Accepted Solutions (0)

Answers (3)

Answers (3)

jogeswararao_kavala
Active Contributor
0 Kudos

You might have to slightly correct the above code as under :


IF sy-tcode = 'IW31' AND aktyp = 'H' AND status = 'A1H' AND bldgr = 'A1' AND caufvd_imp-auart = 'PM02'.

   MESSAGE 'PM02 Order Type Creation is Restricted Through IW31. Generation is only possible through Maint.Plan Scheduling' TYPE 'E'.

ENDIF.

Former Member
0 Kudos

Thank you sir,

Let me test this with ABAPer.

Regards

Anand

jogeswararao_kavala
Active Contributor
0 Kudos

Ananda

I have just tested the first code fully. It is sufficient for your requirement. You can ignore my yesterday post adding ' sy-tcode = 'IW31' AND ' in the beginning, though it does not harm.

jogeswararao_kavala
Active Contributor
0 Kudos

Ananda babu

Take help of an ABAPer and put this simple code below, in include ZXWO1U04  of user-exit IWO10006.


IF aktyp = 'H' AND status = 'A1H' AND bldgr = 'A1' AND caufvd_imp-auart = 'PM02'.

   MESSAGE 'PM02 Order Type Creation is Restricted Through IW31. Generation is only possible through Maint.Plan Scheduling' TYPE 'E'.

ENDIF.

After this you will get an error popup shown below in the initial screen of IW31, when attempt to create an Order of type 'ZM03'.

Test well in Development servers and take to PRD system.

Good luck

KJogeswaraRao

Former Member
0 Kudos

Thanks lot Sir,

I will try this with ABAPer in Dev server.

Regards

Anand

jogeswararao_kavala
Active Contributor
0 Kudos

Please read 'ZM03'  at one place in my reply text as 'PM02' . That was a typo.

Code is perfect, just copy and paste.

Former Member
0 Kudos

Yes, I understood that sir.

Thanks

Anand

MTerence
Active Contributor
0 Kudos

Hi Anand,

This has been discussed multiple times in the forum, a quick search will give different approach for your solution.

You can restrict through order type, or through enhancement.

Restrict the Preventive Maintenance Order creat... | SCN

Regards

Terence