cancel
Showing results for 
Search instead for 
Did you mean: 

Forbiding Entry of Future Basic Start date in Breakdown order type

Former Member
0 Kudos

Team,

How can I go about forbidding a user from entering a future date when creating a breakdown PM order as a breakdown would always occur in the past when ever the user is creating an order?

Accepted Solutions (1)

Accepted Solutions (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Hello Mutale,

Put this simple code in the include ZXWOCU07 user-exit IWO10009.

IF caufvd_imp-auart = 'PM02' AND caufvd_imp-gstrp > sy-datum.
MESSAGE: 'For Order type ''PM02'' Basic Start date can not be in future.' TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.

After this no Order of type 'PM02' (Breakdown) will be able to be created with future date in Basic Start date field. It will throw the following error pop-up during such attempts.

Regards

KJogeswaraRao

Answers (1)

Answers (1)

jogeswararao_kavala
Active Contributor
0 Kudos

Improvising the above code, if you want to prevent such Orders for present date but the time in future, then use the following code, which gives the error pop-up shown below.

IF caufvd_imp-auart = 'PM02'.
IF ( caufvd_imp-gstrp > sy-datum ) OR
     ( caufvd_imp-gstrp = sy-datum AND caufvd_imp-gsuzp > sy-uzeit ).
MESSAGE: 'For Ord.type ''PM02'' BasicStDate/Time can not be in future.' TYPE 'E' DISPLAY LIKE 'I'.
ENDIF.
ENDIF.

Regards

KJogeswaraRao