cancel
Showing results for 
Search instead for 
Did you mean: 

Control manual creation of maintenance order

Former Member
0 Kudos

Hi

I really appreciate your help. I'm challenging the following situation.

I need to control the manual creation of a maintenance order (preventive maintenance order type) at the IW31 transaction, to avoid the user to create manually and just let it be created by the maintenance plan.

There is a way to customize this? Without using roles & authorizations.

Thanks!!

Regards

Francisco Oyarzo

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Francisco,

This can be easily controlled through user-exit IWO10009. Only thing is it stops at Save event.

Put this code in the include ZXWOCU07.



IF CAUFVD_IMP-AUART = 'PM03'.

IF SY-TCODE = 'IW31'.

MESSAGE: 'Order can not be created through IW31' TYPE 'E' DISPLAY LIKE 'I'.

ENDIF.

ENDIF.

Line 1 and 5 are meant to limit this effect to certain Order type. If you want to apply to all Orders then Line1 and 5 can be removed. This code at the event of Saving an Order through IW31, throws an error pop-up saying 'Order can not be created through IW31'.

After this nobody would be able to create Orders (PM03) through IW31..

Good luck

KJogeswaraRao

gaurav_solanki2
Participant
0 Kudos

Dear Rao Sir,

Can u tell me difference between user exit and function exit because when I use IWO10009 the system show me that it is function exit.

Thanks

Regrads

Gaurav Solanki

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Gaurav,

Though it is not proper to encourage discussions in closed threads, I'll be brief.

User-exit is a label given to a particular enhancement. like 'Checks before Saving a Notification' or 'Checks before Saving Order'  etc, which opens with a Tcode SMOD. Inside this you'll find the function-exit. Inside the Function exit you will find a Z include where you'll be allowed to write the code. So practically you do not have anything to do with the Function Exit. By writing your code in the Z include you are writing your code in the F/Exit. Last but not the least, every User-exit should be assigned to a project created through CMOD tcode. Then only its code works. Expect you not to continue here.

Regards

KJogeswaraRao

gaurav_solanki2
Participant
0 Kudos

Thanks Rao sir,

Thank you so  much. I have cleared this concept.

Thanks

Regards

Gaurav Solanki

Answers (0)