‎2008 Dec 02 10:39 AM
Hi all,
I did some code like when invalid combinations....then need to raise a request,at that time it showing the error message, but after that error message...when press enter....that work order starts genrating(means start processing).So i need to stop the processing after error message displays even click on enter or save...need to show the same error message.Could u plz help me on this.
Plz check the code below:
IF VIQMEL-QMART = ZCL_CONSTANTS=>C_QMART_M1.
IF VIQMEL-PRIOK = ZCL_CONSTANTS=>C_PRIOK_1 OR
VIQMEL-PRIOK = ZCL_CONSTANTS=>C_PRIOK_2.
IF RIWO00-AUART <> ZCL_CONSTANTS=>C_AUART_PM03.
MESSAGE e208(ZPM).
ENDIF.
ELSEIF RIWO00-AUART = ZCL_CONSTANTS=>C_AUART_PM03.
MESSAGE e208(ZPM).
ENDIF.
ENDIF.
‎2008 Dec 02 11:03 AM
hi..
i think you are using module screen then you will have to use stop after the error message and clear the sy-ucomm or ok_code before stop statement.
MESSAGE e208(ZPM).
clear ok_code.
stop.
but if it were a report then also it depends on ur code.
in report if your code contains an end-of-selection and u are throwing an error message in start-of-selection , then below error message statement if you write stop then end-of-selection still will get executed ..
but if you write an EXIt then end-of-selection wont get executed. it will show directly output screen if there is an write statement to display on screen in start-of-selction.
and if you are throwing an error message at selection screen then no need to use any of the above.
but if you are using an information message then u need to use stop after the i message..
hope this will help u
‎2008 Dec 02 10:42 AM
‎2008 Dec 02 10:44 AM
Hi
to the best of my knowledge once you issue ERROR message system becomes standstill, how can you proceed further????
anyhow------>>>>>>
Use EXIT key word after the error message
Regards
Ramchander Rao.K
Edited by: ramchander krishnamraju on Dec 2, 2008 11:44 AM
‎2008 Dec 02 10:51 AM
Hi,
Is there any Typing error in your code or is it right?
because the code which you have mentoned here i find the IF.....ENDIF's order to be incorrect,because if you have given Message of type E it should not allow you to process further.
like
IF RIWO00-AUART ZCL_CONSTANTS=>C_AUART_PM03.
MESSAGE e208(ZPM).
ENDIF.
ELSEIF RIWO00-AUART = ZCL_CONSTANTS=>C_AUART_PM03.
MESSAGE e208(ZPM).
ENDIF.
the same condition is tested twice and same message is raised,even the IF's and ENDIF's are not clear.
Regards,
Neha
Edited by: Neha Shukla on Dec 2, 2008 4:21 PM
‎2008 Dec 02 10:52 AM
after the error msg immediately use this statement.
LEAVE TO SCREEN SY-DYNNR.
‎2008 Dec 02 11:03 AM
hi..
i think you are using module screen then you will have to use stop after the error message and clear the sy-ucomm or ok_code before stop statement.
MESSAGE e208(ZPM).
clear ok_code.
stop.
but if it were a report then also it depends on ur code.
in report if your code contains an end-of-selection and u are throwing an error message in start-of-selection , then below error message statement if you write stop then end-of-selection still will get executed ..
but if you write an EXIt then end-of-selection wont get executed. it will show directly output screen if there is an write statement to display on screen in start-of-selction.
and if you are throwing an error message at selection screen then no need to use any of the above.
but if you are using an information message then u need to use stop after the i message..
hope this will help u