on 12-30-2008 11:33 AM
Hi experts
Scenario is while doing TECO for maintenance order system should pop up error massage End date and Time is mandatory.
I checked with T code OIAL in influencing, here I am getting malfunction end date mandatory in change mode i.e in IW32. but scenario is, if user want to change order that time again system will ask to fill End date and Time mandatory so it wonu2019t work.
I have checked with user exit IWOC0001 now system pop up error massage end date and time mandatory but do not allow to save order. Whenever I enter end date and time and try to save system again pop up error massage end date and time is mandatory.
Please advice if anything I need to do in config or in code.
Many Thanks
Yogesh
hi
Are you referring to the Order basic finish date or Malfunction end date in the notification .you can use IWO10004 Maintenance order: Customer check for order completion where you can write the logic for checking the Malfunction end date as mandatory .
kindly consult with the technical team ,if you have activated the user exit ,while saving it will prompt the error as per your program ,if you have specified the same then system will allow you to TECO the order , if not then check your logic once again ,may be you have specified some other fields
regards
thyagarajan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thyagarajan,
My purpose is getting solved by using User exit IWOC0001. Only thing is I am not able to save order. While saving system is again pop up massage start and end date is mandatory.
Do I still need to check with IWO10004 user exit or I am missing with some coding/logic in IWOC0001. Please advice.
Many Thanks
Yogesh
hi
Are you sure you have achieved using the user exit IWOC001 , if so then check the logic you have entered ,may be it has referenced the wrong field .since as per your thread after entering the value still system is asking again
kindly check the field entered and cross check with technical team
regards
thyagarajan
Dear Mr.Pete, Mr. Thyagarajan, Mr.sunil,
Thank you for your advice
The User Exit IWO10004 is working however it have some issues.
1) System pop up error massage malfunction end date and time mandatory when I click on TECO tab but donu2019t show the pop up window like in normal scenario of TECO.( I am using order type PM02 i.e Breakdown order)
I accept that I will enter malfunction end date and time in order header data tab but after saving order it wonu2019t TECO. It gets saved only. I have to reopen (IW32) the order and again need to TECO the order.
When I reopen the order (IW32) and again click on TECO tab system pop up the window like in normal scenario if I click continue/Enter button, system do TECO however if I remove the end date and time still system save TECO order but in IW33 I donu2019t get the malfunction end date and time that filed remain empty.
2) I have a scenario whenever User create order type PM02 (Breakdown maintenance order) system create N2 type notification in background. I checked notification created in background before TECO, I observed that system take Required End Date and time by default same as required Start Date and Time and it remain same after order TECO where my notification get completed.
If I remove user exit IWO10004 system behave normally. I mean it donu2019t take Required End date and Time in notification. Both filed remain empty.
However if I use User Exit IWOC0001 the scenario remain normal but I am not able to save the order.
Please advice what could be best solution in this case.
Many Thanks
Yogesh
hi
After system gives the error message kindly specify the same and then press again the TECO button ,i think system will TECO the order and then it will be saved.kindly check
for the second instance since the Required end date and time are mandatory it will copied in the notification automatically ,whether are you facing any problem
regards
thyagarajan
HI Pete,
I am not using RAISE COMPLETION_REJECTED.
u201CRaiseu201D is used for exception handling,
If I am not wrong u201CRaiseu201D is use for exception handling.
For your reference please find code I am using,
*break-point.
DATA : AUSBS TYPE AUSBS,
AUZTB TYPE AUZTB,
QMART TYPE QMART.
*DATA : WA_AFIH LIKE AFIH .
SELECT SINGLE AUSBS AUZTB QMART
INTO (AUSBS,AUZTB,QMART)
FROM VIQMEL
WHERE QMNUM = CAUFVD_IMP-QMNUM .
IF CAUFVD_IMP-IPHAS = 2.
IF AUSBS = '00000000' OR AUZTB = '000000' .
MESSAGE 'Malfunction end date and End time is mandatory ' TYPE 'E'.
EXIT.
ENDIF.
ENDIF.
Many Thanks
Yogesh
Hi pete,
I am not getting you.
I am not rejecting TECO. Secondly I am not doing any changes in Notification.
The only problem I am facing is
System pop up error massage malfunction end date and time mandatory when I click on TECO tab but donu2019t show the pop up window like in normal scenario of TECO.( I am using order type PM02 i.e Breakdown order)
I accept that I will enter malfunction end date and time in order header data tab but after saving order it wonu2019t TECO. It gets saved only. I have to reopen (IW32) the order and again need to TECO the order.
When I reopen the order (IW32) and again click on TECO tab system pop up the window like in normal scenario if I click continue/Enter button, system do TECO however if I remove the end date and time still system save TECO order but in IW33 I donu2019t get the malfunction end date and time that filed remain empty.
Please suggest what code I have to write.
Many Thanks
Yogesh
Hi Pete,
I tried find
_*lv_reject = 'X'*_in the system, however I couldnu2019t found that.
Could you please elaborate where to add
RAISE COMPLETION_REJECTED syntax in the code.
Please find current code in the system.
*break-point.
DATA : AUSBS TYPE AUSBS,
AUZTB TYPE AUZTB,
QMART TYPE QMART.
*DATA : WA_AFIH LIKE AFIH .
SELECT SINGLE AUSBS AUZTB QMART
INTO (AUSBS,AUZTB,QMART)
FROM VIQMEL
WHERE QMNUM = CAUFVD_IMP-QMNUM .
IF CAUFVD_IMP-IPHAS = 2.
IF AUSBS = '00000000' OR AUZTB = '000000' .
MESSAGE 'Malfunction end date and End time is mandatory ' TYPE 'E'.
EXIT.
ENDIF.
ENDIF.Many Thanks
Yogesh
Try this:
* Data definitions
DATA : AUSBS TYPE AUSBS, AUZTB TYPE AUZTB, QMART TYPE QMART.
* Released order only
CHECK CAUFVD_IMP-IPHAS = 2.
* Get notification
SELECT SINGLE AUSBS AUZTB QMART
INTO (AUSBS,AUZTB,QMART)
FROM VIQMEL
WHERE QMNUM = CAUFVD_IMP-QMNUM .
IF SY-SUBRC = 0. " Notification found
IF AUSBS = '00000000' OR AUZTB = '000000' .
RAISE COMPLETION_REJECTED. "<<<<---------- Reject TECO
MESSAGE 'Malfunction end date and End time is mandatory ' TYPE 'E'.
ENDIF.
ENDIF
Hi Pete,
There is no change post applying this code.
In fact I am not getting error massage end date and time mandatory when I click on TECO tab without entering end date and time, and TECO tab donu2019t work.
When I enter date and time again I have to save order first. Then reopen and DO TECO this I was achieved by previous codes.
Hope I have clear concern,
Many Thanks
Yogesh
I've swapped two lines of code around, so try this:
* Data definitions
DATA : AUSBS TYPE AUSBS, AUZTB TYPE AUZTB, QMART TYPE QMART.
* Released order only
CHECK CAUFVD_IMP-IPHAS = 2.
* Get notification
SELECT SINGLE AUSBS AUZTB QMART
INTO (AUSBS,AUZTB,QMART)
FROM VIQMEL
WHERE QMNUM = CAUFVD_IMP-QMNUM .
IF SY-SUBRC = 0. " Notification found
IF AUSBS = '00000000' OR AUZTB = '000000' .
MESSAGE 'Malfunction end date and End time is mandatory ' TYPE 'E'.
RAISE COMPLETION_REJECTED. "<<<<---------- Reject TECO
ENDIF.
ENDIF
I've no way of knowing your experience level...
Try this:
* Data definitions
DATA : AUSBS TYPE AUSBS, AUZTB TYPE AUZTB, QMART TYPE QMART.
* Released order only
CHECK CAUFVD_IMP-IPHAS = 2.
* Get notification
SELECT SINGLE AUSBS AUZTB QMART
INTO (AUSBS,AUZTB,QMART)
FROM VIQMEL
WHERE QMNUM = CAUFVD_IMP-QMNUM .
IF SY-SUBRC = 0. " Notification found
IF AUSBS = '00000000' OR AUZTB = '000000' .
MESSAGE I398(00) WITH 'Malfunction end date and End time is mandatory'.
MESSAGE I398(00) RAISING COMPLETION_REJECTED.
ENDIF.
ENDIF.
PeteA
Hi Yogesh,
The code which you/your developers had written will never work....
Reason being that you can trying to check(atleast 2nd time) the malfunction end date and end time which is still not stored in database (view viqmel.. table QMEL)....
So, you will always get blank date and time when you try to read from database....
The structure which you should access is (SAPLIQS0)VIQMEL. This is a dialog structure and it will have all the data whatever you have entered on the screeen w.r.t notification.
Probably you can try this code... (with some more proper checks)
FIELD-SYMBOLS <ls_ausbs> TYPE any.
FIELD-SYMBOLS <ls_auztb> TYPE any.
Released order only
CHECK CAUFVD_IMP-IPHAS = 2.
ASSIGN ('(SAPLIQS0)VIQMEL-AUSBS') TO <ls_ausbs>.
ASSIGN ('(SAPLIQS0)VIQMEL-AUZTB') TO <ls_auztb>.
IF SY-SUBRC = 0. " Notification data found
IF <ls_ausbs> = '00000000' OR <ls_auztb> = '000000' .
MESSAGE I398(00) WITH 'Malfunction end date and End time is mandatory'.
MESSAGE I398(00) RAISING COMPLETION_REJECTED.
ENDIF.
ENDIF.
Hope this helps....
Best Regards,
Subhakanth
Sorry Team,
I was forgot to copy the codes here
Here are the code.
CHECK CAUFVD_IMP-AUART = 'PM20'.
FIELD-SYMBOLS <A> TYPE ANY.
FIELD-SYMBOLS <B> TYPE ANY.
* Released order only
CHECK CAUFVD_IMP-IPHAS = 2.
ASSIGN ('(SAPLIQS0)VIQMEL-AUSBS') TO <A>.
ASSIGN ('(SAPLIQS0)VIQMEL-AUZTB') TO <B>.
IF SY-SUBRC = 0. " Notification data found
IF <A> = '00000000' OR <B> = '000000' .
MESSAGE I398(00) WITH 'Malfunction end date and End time is mandatory'.
MESSAGE I398(00) RAISING COMPLETION_REJECTED.
ENDIF.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.