on 08-15-2015 2:33 PM
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?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.